AGB  ·  Datenschutz  ·  Impressum  







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

FastReports PDF Größe

Ein Thema von TurboMagic · begonnen am 8. Dez 2023 · letzter Beitrag vom 12. Dez 2023
Antwort Antwort
Seite 1 von 2  1 2      
TurboMagic

Registriert seit: 28. Feb 2016
Ort: Nordost Baden-Württemberg
2.827 Beiträge
 
Delphi 12 Athens
 
#1

FastReports PDF Größe

  Alt 8. Dez 2023, 22:21
Hallo,

ich arbeite an einem Report. Vor Hinzufügen eines (zur Laufzeit geladenen) Logos
war die erzeugte PDF immer ca. 360-400 KB groß. frxPDFExport.Compressed ist true.

Jetzt habe ich ein TfrxPicture hinzugefügt (3x3 cm), Stretched, KeepAspectRatio.
Dort lade ich eine Datei logo.jpg rein, die hat 500x155 Pixel Auflösung (96 DPI
sagt Window Explorer). Gebe ich den Report mit ansonsten soweit identischen Daten
aus, braucht er ca. 1,2 MB auf der Platte.

Die jpg braucht ca. 22 KB, speichert man das als 24 bit BMP braucht es ca. 224 KB.
Das würde aber nicht die Verdreifachung der PDF Größe erklären.

Hat da irgendwer eine Idee dazu?
Das Ändern von HighQuality der TfrxPicture Komponente machte übrigens keinen Unterschied!

Grüße
TurboMagic
  Mit Zitat antworten Zitat
mytbo

Registriert seit: 8. Jan 2007
461 Beiträge
 
#2

AW: FastReports PDF Größe

  Alt 8. Dez 2023, 23:18
Hat da irgendwer eine Idee dazu?
Kann ich mit FastReport Version 2022.2.10 in einem Beispiel nicht nachvollziehen. Lade mal das JPG Image hier hoch.

Bis bald...
Thomas
  Mit Zitat antworten Zitat
TurboMagic

Registriert seit: 28. Feb 2016
Ort: Nordost Baden-Württemberg
2.827 Beiträge
 
Delphi 12 Athens
 
#3

AW: FastReports PDF Größe

  Alt 9. Dez 2023, 15:24
Hallo,

anbei die Grafik.

Und hier der relevante Code mit meinen PDF Einstellungen:

Delphi-Quellcode:
  DMReceipt.frxPDFExport.Compressed := true;
  DMReceipt.frxPDFExport.PrintOptimized := true;
  DMReceipt.frxPDFExport.OverwritePrompt := true;
  DMReceipt.frxPDFExport.PdfA := true;
Grüße

TurboMagic
Miniaturansicht angehängter Grafiken
logo.jpg  
  Mit Zitat antworten Zitat
mytbo

Registriert seit: 8. Jan 2007
461 Beiträge
 
#4

AW: FastReports PDF Größe

  Alt 9. Dez 2023, 19:47
Und hier der relevante Code mit meinen PDF Einstellungen
In meinem Beispiel vergrößert sich die PDF-Datei durch das Einbinden deiner Grafik um ca. 160KB. Welche FastReport Version verwendest du? Versionen kleiner 6 haben keine gute PDF-Export-Funktion. Als Abhilfe konnte man SynPDF mit FastReport verwenden.

Bis bald...
Thomas
  Mit Zitat antworten Zitat
TurboMagic

Registriert seit: 28. Feb 2016
Ort: Nordost Baden-Württemberg
2.827 Beiträge
 
Delphi 12 Athens
 
#5

AW: FastReports PDF Größe

  Alt 9. Dez 2023, 21:40
Ich benutze die damals in 11.3 über GetIt installierte Embarcadero Edition...
Wie würde das mit SynPDF ggf. aussehen?
  Mit Zitat antworten Zitat
mytbo

Registriert seit: 8. Jan 2007
461 Beiträge
 
#6

AW: FastReports PDF Größe

  Alt 9. Dez 2023, 22:27
Wie würde das mit SynPDF ggf. aussehen?
In der FR3-Datei steht die Version. Informationen zu FastReport mit SynPDF findest du hier folgend.

Bis bald...
Thomas
  Mit Zitat antworten Zitat
TurboMagic

Registriert seit: 28. Feb 2016
Ort: Nordost Baden-Württemberg
2.827 Beiträge
 
Delphi 12 Athens
 
#7

AW: FastReports PDF Größe

  Alt 10. Dez 2023, 12:03
Hallo,

ich lese in meiner FR3 Datei Version="2022.2.7".
Danke für den Link.

Grüße
TurboMagic
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
214 Beiträge
 
#8

AW: FastReports PDF Größe

  Alt 10. Dez 2023, 12:33
Hi,

I wish i could be more precise about this, but my memory is failing me here.

See, PDF format is complex yet the the structure is very simple, and you can build a parser for it in minutes, but the details for these objects are hard and very complex to parse and handle, sound silly, yes it is, but i think the best approach for such cases which will give you deeper understanding for the PDF, by not reading the format specification itself but by using any already parser there, and here my memory failure, i used a software few years back and couldn't find it or even remember its name or location on my disks !!! shame

Anyway if you visit https://en.wikipedia.org/wiki/List_of_PDF_software there is punch of software (none reminded me too), and there is one from that list https://blog.didierstevens.com/programs/pdf-tools/ , here an example what parsing the objects should like with GUI from that page
20100902-225943.png

You can see the objects and paths ...., and their sizes !

There is in the Wikipedia page and punch of other software that can help you detect what have changed and in what size each.

Hope that isn't wasting you time but give some insight.

PS: i didn't used PDF parsing or handling in Delphi, except i added PDF Signature verification using SecureBlackBox with my own custom simplified PAdES as my license didn't cover that part, yet i can't find that project folder and the accessories tools with it on my drives, (may be i am losing it), anyway, i think there is an existing Delphi/Pascal libraries that will help you do what that parser/analyzer does, it is essential to add objects right, i mean getting list of the PDF objects, so if it is for me i would start with SynPDF and see what it offer in the matter of getting the PDF internal objects and their sizes.
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
214 Beiträge
 
#9

AW: FastReports PDF Größe

  Alt 10. Dez 2023, 12:37
I forgot one thing, (damm't ), the image could be encoded or handled as readable string or an equivalent, simply and wrongfully went through few encoding process causing this size increase, as PDF specifications allow such stream encapsulation, so binary converted into base64 then binary again then base64 again !
  Mit Zitat antworten Zitat
mytbo

Registriert seit: 8. Jan 2007
461 Beiträge
 
#10

AW: FastReports PDF Größe

  Alt 10. Dez 2023, 13:13
ich lese in meiner FR3 Datei Version="2022.2.7".
In dieser Version ist ein ordentlicher PDF-Export vorhanden. Im Quelltext-Verzeichnis ist die alte Version der Unit unter dem Namen frxExportPDF_old noch zu finden. Die Umsetzung im neuen umfasst ca. 220KB, die alte Version wurde mit ca. 15KB realisiert. Was in der Embarcadero Edition zum Einsatz kommt, ist mir nicht bekannt. Du kannst aber einen PDF-Editor, z.B. FlexiPDF oder PDF-XChange, nehmen und selbst nachschauen. Die Unterschiede sind nicht zu übersehen.

Bis bald...
Thomas
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2      


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 19:38 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