Welcome, Guest
Username: Password: Remember me
This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
  • Page:
  • 1

TOPIC:

ReportPro 2.x .NET: PDFs with QR code images are very large 06 Jul 2021 13:22 #18999

  • Bernhard Mayer
  • Bernhard Mayer's Avatar
  • Topic Author


  • Posts: 48
  • Dear fellow X#'ers!

    In our application we are using ReportPro 2.x .NET to create PDFs containing images holding QR codes; unfortunately those PDFs are extremely large.
    • Print ReportPro report with QR code image with FreePDF (= PDF printer) --> PDF size = 27 KB
    • Create PDF with same report/content with ReportPro.Net 2.x --> PDF size > 3 MB

    The underlying QR code image file is a PNG with 47 KB. Any ideas what could be done to get the RP reports "smaller" but still with readable QR codes?

    BR & TIA
    Bernhard

    Please Log in or Create an account to join the conversation.

    ReportPro 2.x .NET: PDFs with QR code images are very large 06 Jul 2021 13:50 #19000

    • HeikoP
    • HeikoP's Avatar


  • Posts: 48
  • Bernhard,

    i use Rp3 and bought the for Rp3 sourcecode lately. I´m shure it´s different to Rp2 but the PDF-component will surely be the same. You should have to buy that PDF-component too, to change things. But fortunatly then you could use the actual version of this component. You then will be able to change the compression rate of the PDF´s. I´m not sure how much this effects the size in you case, but i see this as an option to solve you problem.

    Greetings

    Heiko

    Please Log in or Create an account to join the conversation.

    ReportPro 2.x .NET: PDFs with QR code images are very large 06 Jul 2021 15:08 #19003

    • robert
    • robert's Avatar


  • Posts: 3213
  • Bernhard,
    I think the size is due to embedded fonts.
    You might want to exclude certain fonts, such as Arial by adding a section to RpWin.ini:

    [PDFDoNotEmbed]
    Arial=
    Arial Bold=
    Arial Bold Italic=
    Arial Italic=
    Times New Roman=
    Times New Roman Bold=
    Times New Roman Bold Italic=
    Times New Roman Italic=
    Courier New=
    Courier New Bold=
    Courier New Bold Italic=
    Courier New Italic=
    WingDings=
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    ReportPro 2.x .NET: PDFs with QR code images are very large 06 Jul 2021 15:21 #19004

    • Bernhard Mayer
    • Bernhard Mayer's Avatar
    • Topic Author


  • Posts: 48
  • Hi Robert!

    Thanks for your answer; I forgot to mention that without the (47 KB) QR image the size of the PDF is 8 KB, so the fonts are not the problem (I am aware of fonts + RpWin.ini).

    Any other ideas? I could provide a sample application demonstrating the problem.

    Best regards,
    Bernhard

    Please Log in or Create an account to join the conversation.

    ReportPro 2.x .NET: PDFs with QR code images are very large 06 Jul 2021 15:30 #19005

    • Bernhard Mayer
    • Bernhard Mayer's Avatar
    • Topic Author


  • Posts: 48
  • Hi Heiko,

    I already have the ReportPro 2.x .NET source code since 2010 and though I've succeeded in adding some features I do not have the neccessary knowledge to alter the PDF creation on that level.

    BR,
    Bernhard

    Please Log in or Create an account to join the conversation.

    ReportPro 2.x .NET: PDFs with QR code images are very large 06 Jul 2021 15:45 #19006

    • robert
    • robert's Avatar


  • Posts: 3213
  • Bernhard,
    Can mail me (a link to) an example PDF so I can see what the contents of the PDF is and what causes it to grow to 3Mb.

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    ReportPro 2.x .NET: PDFs with QR code images are very large 06 Jul 2021 17:22 #19009

    • HeikoP
    • HeikoP's Avatar


  • Posts: 48
  • Bernhard,

    have you tried a JPG File instead of a PNG? Is the size difference between ReportPro-PDF and PDF-Free still that big?

    Heiko

    Please Log in or Create an account to join the conversation.

    Last edit: by HeikoP.

    ReportPro 2.x .NET: PDFs with QR code images are very large 06 Jul 2021 17:27 #19010

    • robert
    • robert's Avatar


  • Posts: 3213
  • Heiko,

    The problem was that the "Compress" option on the PDF Options dialog was not selected...
    With that option selected the file shrunk to 21 Kb.
    The QR code is actually just a whole lot of 0x00 and 0xFF characters and can be compressed very well.
    The 45 Kb PNG file is lossless compressed ~17Kb in the PDF.

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1