Print Page | Close Window

Scaling

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1103
Printed Date: 15 Dec 25 at 9:26PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Scaling
Posted By: artjaggy
Subject: Scaling
Date Posted: 08 Jun 09 at 4:24AM
Hi guys,

I am trying to display existing pdf file onto canvas.
Wen I display pdf at 72 dpi, everyting is ok, because when I retrieve
page height and width using DAGetPageHeight, DAGetPageWidth
I set cavas size accordingly. The problem comes in when I try to zoom,
and by zoom, I mean rendering pdf file onto a canvas with dpi higher then 72.

How would I now size of a page in pixels (eight and width) when I display a page in resolution
that is not 72 dpi?

Thnx in advance.



Replies:
Posted By: Ingo
Date Posted: 08 Jun 09 at 6:35AM
Hi!

I don't use height and width while rendering ...
What you can do is to render to file - then you have an image file and then you can use ImageHeight and ImageWidth.
Mostly i'm using code like this:
QP.RenderDocumentToFile(150,1,1,1,'c:\temp\' + ExtractFileName(Edit1.Text) + '.jpg',1,0);
QP.RenderPageToStream(150,1,1,test_stream,1,0);

You can put these render results on a resizable image component which is embedded in a nonresizable box with scrollbars.
 
Cheers, Ingo



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk