ReportPro 2.x .NET: PDFs with QR code images are very large

This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
Post Reply
Bernhard Mayer
Posts: 49
Joined: Thu Oct 06, 2016 3:00 pm

ReportPro 2.x .NET: PDFs with QR code images are very large

Post by Bernhard Mayer »

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
HeikoP
Posts: 48
Joined: Mon May 30, 2016 4:19 pm

ReportPro 2.x .NET: PDFs with QR code images are very large

Post by HeikoP »

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
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

ReportPro 2.x .NET: PDFs with QR code images are very large

Post by robert »

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
robert@xsharp.eu
Bernhard Mayer
Posts: 49
Joined: Thu Oct 06, 2016 3:00 pm

ReportPro 2.x .NET: PDFs with QR code images are very large

Post by Bernhard Mayer »

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
Bernhard Mayer
Posts: 49
Joined: Thu Oct 06, 2016 3:00 pm

ReportPro 2.x .NET: PDFs with QR code images are very large

Post by Bernhard Mayer »

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
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

ReportPro 2.x .NET: PDFs with QR code images are very large

Post by robert »

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
robert@xsharp.eu
HeikoP
Posts: 48
Joined: Mon May 30, 2016 4:19 pm

ReportPro 2.x .NET: PDFs with QR code images are very large

Post by HeikoP »

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
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

ReportPro 2.x .NET: PDFs with QR code images are very large

Post by robert »

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
robert@xsharp.eu
Post Reply