#1 Re: PDF Engine » FastReport PDF export using SynPDF » 2013-06-03 15:08:12

update
-I have also encountered the following issues or did not know how to make work, which I corrected, or got to work by slight code changes.
--I will post solutions later.

1. PaperSize from FR Report not coming through to the synPDF doc
2. Paper Orientation (Landscape or portrait) was not getting updated (was always portrait)

hope this helps others

#2 Re: PDF Engine » FastReport PDF export using SynPDF » 2013-05-31 14:49:56

I think I figured it out by looking at general posts in this forum in regards to "info." and the base unit-see code below
regards all

function TfrxSynPDFExport.Start: Boolean;
var
  vPdfViewerPreferences: TPdfViewerPreferences;
begin
  result := true;
  PdfDocument.NewDoc;
  PdfDocument.PDFA1 := PDFA;//<<<new location
  PdfDocument.Info.CreationDate := CreationTime;
  PdfDocument.Info.ModDate := CreationTime;
  PdfDocument.Info.Author := Author;
  PdfDocument.Info.Subject := Subject;
  PdfDocument.Info.Keywords := Keywords;
  PdfDocument.Info.Creator := Creator;

  vPdfViewerPreferences := [];
  if FitWindow then Include(vPdfViewerPreferences, vpFitWindow);
  if HideMenubar then Include(vPdfViewerPreferences, vpHideMenubar);
  if CenterWindow then Include(vPdfViewerPreferences, vpCenterWindow);
  if HideWindowUI then Include(vPdfViewerPreferences, vpHideWindowUI);
  if HideToolbar then Include(vPdfViewerPreferences, vpHideToolbar);
  if vPdfViewerPreferences <> PdfDocument.Root.ViewerPreference then
    PdfDocument.Root.ViewerPreference := vPdfViewerPreferences;

  if Compressed then  
    PdfDocument.CompressionMethod := cmFlateDecode
  else
    PdfDocument.CompressionMethod := cmNone;

  PdfDocument.UseOutlines := Outline;
  //PdfDocument.PDFA1 := PDFA;//old location
  PdfDocument.EmbeddedTTF := EmbeddedFonts;
end;

#3 Re: PDF Engine » FastReport PDF export using SynPDF » 2013-05-28 20:03:31

Thank you for this excellent tool / add on for Fast Reports. it did not take me too long to get it working as desired - the PDFs are much smaller in file size and some of the graphics seem crisper.

I could have missed something -
One question - i noticed that the PDF properties (Information) exposed in the UI (DFM) - Author, Title etc. do not get embedded in the
final PDF document. (That part works with the Fastreports PDF exporter). **Did I miss something or can someone provide an example
on how to make that work.

Thanks in advance smile

Board footer

Powered by FluxBB