I really need help with this issue. I'm generating the EMF files to create a PDF in different machines but I can see that the resulting EMF file are different.
I upload the resulting EMF files and the rvf original file. You can download from https://uploadfiles.io/baf23
Why the EMFs are different if they were created from the same rvf document with the same source code but in different PCs?
The source code that I'm using is:
Code: Select all
SRichViewEdit1.RichViewEdit.ClearLiveSpellingResults;
SRichViewEdit1.RichViewEdit.LiveSpellingMode := rvlspManualStart;
rve := SRichViewEdit1.ActiveEditor;
rve.SetSelectionBounds(rve.CurItemNo, rve.OffsetInCurItem, rve.CurItemNo, rve.OffsetInCurItem);
rve.Invalidate;
SRichViewEdit1.ViewProperty.ZoomPercent := 100;
TempFile := GenerateTempFilename;
WPPDFPrinter1.FileName := TempFile;
WPPDFPrinter1.CompressStreamMethod := TWPCompressStreamMethod.wpCompressFlate;
WPPDFPrinter1.FontMode := TWPPDFFontMode.wpEmbedSymbolTrueTypeFonts; //solamente incrusta los Fonts symbol como el codigo de barra
WPPDFPrinter1.Info.Title := IntToStr(_idTexto);
WPPDFPrinter1.BeginDoc;
Impares := 1;
try
for LI := 1 to SRichViewEdit1.PageCount do
begin
a := TMetafile.Create;
a.Width := SRichViewEdit1.PageWidthPix;
a.Height := SRichViewEdit1.PageHeightPix;
SRichViewEdit1.DrawMetafile(LI, a ,SRichViewEdit1.PageProperty.PageNoVisible,true,false);
a.SaveToFile('C:\Users\mandres\AppData\Roaming\SimpCivil\' + IntToStr(LI) + '.emf');
Impares := Impares * -1;
WPPDFPrinter1.DrawMetafile(0, 0, a.Handle);
a.Free;
end;
finally
WPPDFPrinter1.EndDoc;
end;
I really appreciate your help in this issue.
Thanks and regards,
Martin