You are not logged in.
Pages: 1
Hello all
MtwStark solved all the above clipping problems with his SynPDF.pas unit enhancements.
He posted the unit in the topic: PDFEngine Clipping Implementation + Output stream optimizations
Thanks for the great work MtwStark.
Best regards
Tom
Hello MtwStark
Thank you for your work! I tested your version of SynPDF.pas and it works with all my EMFs very well!!
Unfortunately I never could use the original SynPDF.pas for EMF export, because about 90% of my EMFs contain clippings.
As a workaround I converted all EMF to BMP to create the PDF file, with the result that all graphics where correct but the size of the PDF file was gigantic!
With your version I could reduce the size of my biggest PDF file by factor 25 and the quality is even better!
I just can encourage other users to test this unit and hopefully Arnaud will merge this genius clipping enhancements into the original SynPDF.pas
Best regards
Tom
Hello Marsh
Thanks for your patch.
I tried it but unfortunately the changes in EnumEMFFunc leads to a corrupt PDF.
Please see the EMF and the resulting PDF:
http://sharesend.com/3yijqymn - EMF-File
http://sharesend.com/y1b91w22 - corrupt PDFFile
Best regards
Tom
After digging into the EnumEMFFunc I see at least two problem areas concerning the emf conversion:
1. Clipping of geometric objects is not implemented (only rectangular clipping of a text is supported).
2. Rendering of chord/arc is not implemented.
http://sharesend.com/qummwept - EMF-File
http://sharesend.com/npm7mf9k - converted PDF with synopse
I used the following code to generate the PDF:
procedure TForm1.Button1Click(Sender: TObject);
var
oPDF: TPdfDocumentGDI;
oMeta: TMetaFile;
begin
oPDF:= TPdfDocumentGDI.Create;
oMeta:= TMetaFile.Create;
try
oMeta.LoadFromFile('c:\temp\test.emf');
oPDF.AddPage;
oPDF.Canvas.RenderMetaFile(oMeta, 1, 0, 0, tpExactTextCharacterPositining);
oPDF.SaveToFile('c:\temp\test.pdf');
finally
oPDF.Free;
oMeta.Free;
end;
end;
Is this correct and are there plans to enhance these areas?
Best regards
Tom
Hello
I started using this great library and it works really good.
But when converting a small EMF file to PDF I encountered a clipping problem, and I don't know how to solve it.
http://sharesend.com/thr2lv3k - EMF-File
http://sharesend.com/w79yhbu8 - converted PDF with synopse
http://sharesend.com/69xdiuvm - converted PDF with Adobe
Are there any settings I can use to adjust the clipping behavior in the PDF Engine?
Best regards
Tom
Pages: 1