AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Fast report, *.pdf via code erstellen

Ein Thema von bernhard_LA · begonnen am 25. Sep 2023 · letzter Beitrag vom 25. Sep 2023
Antwort Antwort
bernhard_LA

Registriert seit: 8. Jun 2009
Ort: Bayern
1.123 Beiträge
 
Delphi 11 Alexandria
 
#1

Fast report, *.pdf via code erstellen

  Alt 25. Sep 2023, 12:09
welche unit muss ich einbinden für die Konstanten psNone, pv17 die ich in meiner Funktion verwende
(siehe auch https://www.fast-report.com/en/blog/...elphi-lazarus/ )



Delphi-Quellcode:
procedure TTestForm.Save_asPDF (MyReport: TfrxReport);
begin

  MyReport.PrepareReport();
  { Set the range of pages to export. By default, all pages of the generated report are exported. }
  frxPDFExport1.PageNumbers := '2-3';
  { Set the PDF standard
    TPDFStandard = (psNone, psPDFA_1a, psPDFA_1b, psPDFA_2a, psPDFA_2b, psPDFA_3a, psPDFA_3b);
    It is required to add the frxExportPDFHelpers module to the uses list:
    uses frxExportPDFHelpers; }

  frxPDFExport1.PDFStandard := psNone;
  { You can set the PDF standard version for PDFStandard = psNone
    TPDFVersion = (pv14, pv15, pv16, pv17);
    It is required to add the frxExportPDFHelpers module to the uses list:
    uses frxExportPDFHelpers; }

  frxPDFExport1.PDFVersion := pv17;
  { To get smaller file size, you can set the compression }
  frxPDFExport1.Compressed := true;
  { Set whether to embed fonts in the resulting document.
    Embedding fonts significantly increases the size of the resulting document }

  frxPDFExport1.EmbeddedFonts := False;
  { Set whether we need to export the background image }
  frxPDFExport1.Background := true;
  { Disable export of objects with optimization for printing. With option enabled images will be high-quality but 9 times larger in volume }
  frxPDFExport1.PrintOptimized := False;
  { Set whether the resulting PDF will contain an external table of contents, as in the original report }
  frxPDFExport1.Outline := False;
  { Set whether to export images with transparency }
  frxPDFExport1.Transparency := true;
  { You can set the desired DPI of images. Enabling this option disables SaveOriginalImages option, which allows you to save images in their
    original form }

  frxPDFExport1.PictureDPI := 150;
  { Set the compression ratio of bitmap images }
  frxPDFExport1.Quality := 95;
  { Set whether to open the resulting file after export }
  frxPDFExport1.OpenAfterExport := False;
  { Set whether to display export progress
    (show which page is currently being exported) }

  frxPDFExport1.ShowProgress := False;
  { Set whether to display a dialog box with export filter settings }
  frxPDFExport1.ShowDialog := False;
  { Set the name of the resulting file. Please note that if you do not set the file name and disable the export filter dialog box, the file name selection dialog will still be displayed }
  frxPDFExport1.FileName := FReportfilenamePDF;
  { Fill in the corresponding fields of the Information tab }
  frxPDFExport1.Title := 'Your Title';
  frxPDFExport1.Author := 'Your Name';
  frxPDFExport1.Subject := 'Your Subject';
  frxPDFExport1.Keywords := 'Your Keywords';
  frxPDFExport1.Creator := 'Creator Name';
  frxPDFExport1.Producer := 'Producer Name';
  { Fill in the corresponding fields of the Security tab }
  frxPDFExport1.UserPassword := 'User Password';
  frxPDFExport1.OwnerPassword := 'Owner Password';
  frxPDFExport1.ProtectionFlags := [ePrint, eModify, eCopy, eAnnot];
  { Set the Viewer settings (Viewer tab) }
  frxPDFExport1.HideToolbar := False;
  frxPDFExport1.HideMenubar := False;
  frxPDFExport1.HideWindowUI := False;
  frxPDFExport1.FitWindow := False;
  frxPDFExport1.CenterWindow := False;
  frxPDFExport1.PrintScaling := False;
  { Export the report }
  MyReport.Export(frxPDFExport1);

end;
  Mit Zitat antworten Zitat
shebang

Registriert seit: 7. Feb 2020
97 Beiträge
 
Delphi 11 Alexandria
 
#2

AW: Fast report, *.pdf via code erstellen

  Alt 25. Sep 2023, 12:33
welche unit muss ich einbinden für die Konstanten psNone, pv17
Ich zitiere mal deinen eigenen Post.
Delphi-Quellcode:
  { Set the PDF standard
    TPDFStandard = (psNone, psPDFA_1a, psPDFA_1b, psPDFA_2a, psPDFA_2b, psPDFA_3a, psPDFA_3b);
    It is required to add the frxExportPDFHelpers module to the uses list:
    uses frxExportPDFHelpers; }

  frxPDFExport1.PDFStandard := psNone;
Delphi-Quellcode:
  { You can set the PDF standard version for PDFStandard = psNone
    TPDFVersion = (pv14, pv15, pv16, pv17);
    It is required to add the frxExportPDFHelpers module to the uses list:
    uses frxExportPDFHelpers; }

  frxPDFExport1.PDFVersion := pv17;
  Mit Zitat antworten Zitat
bernhard_LA

Registriert seit: 8. Jun 2009
Ort: Bayern
1.123 Beiträge
 
Delphi 11 Alexandria
 
#3

AW: Fast report, *.pdf via code erstellen

  Alt 25. Sep 2023, 13:23
Danke ....
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:07 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz