Hi!
The program saves the texts to the EMF file using the DrawDriverString function.
[Blockierte Grafik: https://www.dobry.pl/pliki/Testy/wPDF/DrawDriverString.png]
The finished EMF file is displayed correctly in Paint.exe.
Unfortunately, in the PDF file generated by the wPDF4 component, some lines do not retain the position of the letters.
in paint
[Blockierte Grafik: https://www.dobry.pl/pliki/Testy/wPDF/paint.png]
in PDF
[Blockierte Grafik: https://www.dobry.pl/pliki/Testy/wPDF/pdf_wPDF.png]
Code to generate a PDF from an EMF file.
With TWPPDFPrinter.Create(Self) do
try
DLLName:=ExtractFilePath(GetModuleName(HInstance))+'WPDF400W.DLL';
CompressStreamMethod:=wpCompressFlate;
Options:=Options+[wpCreateAutoLinks, wpAllSymbolFontsAsGlyph];
CidFontMode:=wpCIDOff;
CompressStreamMethod:=wpCompressFastFlate;
FontMode:=wpEmbedType3;
Modes:=Modes+[wpMetaIsDOTNETEMF];
ModesEx:=ModesEx+[wpPrintTextWordByWord];
Filename:=vFileName;
BeginDoc;
try
SetRoundMode(rmUp);
StartPage(3000,Round(3000*vMetaFile.Height/vMetaFile.Width),300,300,0);
try
PlayEnhMetaFile(Canvas.Handle, vMetaFile.Handle, Rect(0,0,3000,Round(3000*vMetaFile.Height/vMetaFile.Width)))
finally
EndPage;
end;
finally
EndDoc;
end;
finally
Free;
end;
How to solve this problem?
greetings
Marcin Konopka