#1 2015-07-07 00:52:03

mcarro
Member
Registered: 2015-07-07
Posts: 2

pixels per inch problem

Hi, I'm producing a PDF using TSynPDF with ScreenLogPixels set to 600 (required to keep backwards compatibility). Everything works fine except that a barcode that needs to be added to the PDF ends up being much smaller that it should.

The barcode is drawn using TStBarCode from TurboPower' SysTools. Following the code I found that TStBarCode repeatedly calls GetDeviceCaps(Canvas, LOGPIXELSX) and GetDeviceCaps(Canvas, LOGPIXELSY), which return 96 instead of 600. Shouldn't GetDeviceCaps return 600 after ScreenLogPixels is set to 600? Is there a way to make this work properly? Thanks...

Offline

#2 2015-07-07 06:02:22

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,231
Website

Re: pixels per inch problem

Why not just set ScreenLogPixels to 96?

Or is there a way of changing the device caps?

Offline

#3 2015-07-07 14:20:43

mcarro
Member
Registered: 2015-07-07
Posts: 2

Re: pixels per inch problem

We are adding a "Save to PDF" option for a report that was previously always printed. Leaving ScreenLogPixels at 96 produces rendering differences respect to the printed version. Those differences disappeared when we changed ScreenLogPixels to 600. But, we did several changes to that units recentrly, I'll try again with 96...

Offline

Board footer

Powered by FluxBB