Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
pageWidth, DAGetPageWidth results |
Post Reply
|
| Author | |
ginidat
Beginner
Joined: 14 Jun 13 Location: Hanover, German Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Topic: pageWidth, DAGetPageWidth resultsPosted: 14 Jun 13 at 5:24PM |
|
Hello all!
I've problems to get the page width and height of different existing documents of different page sizes (as Adobe Reader confirms). Using PageWidth (with measure unit "Inch") I allways get 8.5 Using DAGetPageWidth I allways get 0.0 maybe there is something wrong in my code (Delphi XE2):
Have anyone an idea what is going wrong? Thank's! Cheers, Ginidat |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 Jun 13 at 5:31PM |
|
Hi Gini!
Please keep in mind never mix da- and non-da-functions. A DALoad... isn't a real load so the non-da-function PageWidt won't get a correct result. Cheers and welcome here, Ingo |
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 Jun 13 at 8:44AM |
|
You need to be using the following code. As Ingo mentions the DA functions should only be used with other DA functions. fh := QP.DAOpenFile(fn, ''); ph := QP.DAFindPage(fh, 1); width := QP.DAGetPageWidth(fh, ph); You might find it easier to use the non-DA functions which also support much more functionality. rey := QP.LoadFromFile(fn, ''); if (ret = 1) then begin QP.SelectPage(1); QP.SetMeasurementUnits(2); pageWidth := QP.PageWidth(); end; Also by default QPL always has a single 1 page document loaded in memory and this is why QP.PageWidth is returning 8.5. You might find it useful to read parts of the Developer Guide PDF that comes with QPL. Andrew.
|
|
![]() |
|
ginidat
Beginner
Joined: 14 Jun 13 Location: Hanover, German Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 Jun 13 at 1:27PM |
|
Hello Andrew, Ingo,
thank you for help! Now it works. I think my fault was not to use the function "DAFindPage". Thank's again! Ginidat |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store