Export FastReport to Pdf File Format

Hi everybody.
My program develop in Delphi 2010 with FastReport Pro.
I latterly upgraded FastReport Pro from ver 4.15 to 5.1 and have a problem with the new version.
I use "Code128-NarrowTT-Regular" (true font type) to display a Barcode and I also use the frxPDFExport component to export the
FastReport file to pdf format. When I do an export to Pdf file , I got a problem:
1) The function TrueTypeFont.CheckTablesChecksum raises the following exceptions:
- "Font table checksum error" message dialog form
* Table Id 'OS/2' checksum error.21888856397 1998750072
* Table Id 'PCLT' checksum error.21888345397 1945750023
* Table Id 'cmap' checksum error.76263833535 3576343033
* Table Id 'cvt' checksum error.762638346362 45343678104
* Table Id 'fpgm' checksum error.8795633459855 48277304357
* Table Id 'glyf' checksum error.75663831224 3877342356
* Table Id 'head' checksum error.74463843632 323557655743
* Table Id 'hhea' checksum error.712634557235 3267343288
* Table Id 'post' checksum error.1234545485 37748842459
* Table Id 'prep' checksum error.5461844145 43389114982
* Table Id 'hmtx' checksum error.65288289192 64181847175
If I ignore all these exceptions, I got an exported pdf file.
Could anyone have any idea ? what is the solution !!!! ?

Comments

  • edited September 2014
    In ExportPack\frxTrueTypeCollection.pas, replace ChecksumFaultAction_Warn with ChecksumFaultAction_IgnoreChecksum:

    Line 124:
          f := TrueTypeFont.Create( Pointer(FD), Pointer(FD), ChecksumFaultAction_IgnoreChecksum);
    

    Line 143:
                f := TrueTypeFont.Create(FD, subfont_ptr, ChecksumFaultAction_IgnoreChecksum);
    
  • edited 11:15PM
    We have FastReport 6 and I cannot find the file you mention. I only see frxTrueTypeCollection.dcu and frxTrueTypeCollection.hpp.
    Is this still a valid solution? Or are there other solutions now?
    Made a nice report with Ubuntu and Roboto fonts, but cannot export to PDF now...
  • gpigpi
    edited 11:15PM
    This is solution for FR's editions with sources (FR Professional or Enterprise). Try to use latest FR 6.2.3 and use AddIgnoreChecksum('Roboto Cn');
  • edited 11:15PM
    gpi wrote: »
    This is solution for FR's editions with sources (FR Professional or Enterprise). Try to use latest FR 6.2.3 and use AddIgnoreChecksum('Roboto Cn');
    Thanks for the tip. We've just installed FR 6.2.5, but I don't see that method.
    On which object do I need to call this? I've got a TfrxReport and a TfrxPDFExport object.
    Note: I'm a little bit new to Fast Report, got the code from a experienced colleague. But he also doesn't know how to fix this particular error.
  • edited 11:15PM
    Little kick. Does someone know where I can find
    AddIgnoreChecksum('Roboto Cn');
    
    On which object do I need to call this? I've got a TfrxReport and a TfrxPDFExport object in my code.
  • gpigpi
    edited 11:15PM
    Add frxTrueTypeFont in the uses list
  • edited November 2018
    gpi wrote: »
    Add frxTrueTypeFont in the uses list
    Thanks! :-)
    After some tinkering on TfrxReport and TfrxPDFExport, I tried
    frxTrueTypeFont.AddIgnoreChecksum
    
    and found out it's in there.
    I even found out I could just call
    AddIgnoreChecksum('Roboto')
    
    Now it works without pressing a button multiple times to ignore the exception.

    Last questions, to learn even more: how do you know this? Is there a manual where this somewhat documented?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.