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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Help extracting page size
  FAQ FAQ  Forum Search   Register Register  Login Login

Help extracting page size

 Post Reply Post Reply
Author
Message
mac32bit View Drop Down
Beginner
Beginner


Joined: 29 Jun 07
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote mac32bit Quote  Post ReplyReply Direct Link To This Post Topic: Help extracting page size
    Posted: 29 Jun 07 at 12:12PM
Hi
 
I have 2500+ PDF files that I need to extract the page size from.
 
I have downloaded the QuickPDF v5.21 Delphi 6 DCUs and added the folder they are in to my library path but that is as far as I have got.
 
Is there a manual I can get hold of as I dont know how to use the functions with Delphi 6.
 
Maybe someone could give me some sample code of how to do this.
 
Many thanks in advance.
 
Mac
 
 
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jun 07 at 3:23PM
Hi Mac!

I've uploaded the reference guide now.
You and all the other ones can get it here:
http://www.is-soft.de/qpguide/qp511refguide.pdf

Here is a short delphi example.
First as pixels and second as millimeters:

       QP.SetMeasurementUnits(0); // values as pixel
       hmillis := Round(QP.PageHeight);
       wmillis := Round(QP.PageWidth);

       wh.Text := IntToStr(wmillis) + ' x ' + IntToStr(hmillis) + ' Pixel';

       QP.SetMeasurementUnits(1); // values as millimeters
       hmillis := Round(QP.PageHeight);
       wmillis := Round(QP.PageWidth);

       wh.Text := IntToStr(wmillis) + ' x ' + IntToStr(hmillis);

Best regards,
Ingo

Back to Top
mac32bit View Drop Down
Beginner
Beginner


Joined: 29 Jun 07
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote mac32bit Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jun 07 at 9:09AM
Hi Ingo
 
I have made some progress thanks to your helpful reply.
The problem is that QP.PageHeight and QP.PageHeight do not return anything other than 216 x 279 mm
The actual page properties of my test file (as shown in Acrobat Reader) are 23.29 x 33.11 in (594 x 841 mm)
I think this is because I do not have an UnlockKey. The manual says that "The library must be unlocked before it can be used"
How can I buy one when the author is no longer selling the software? I only have the 5.21 Delphi DCUs from this forum.
Thanks again for your help!
Mac

Is this code correct ?
procedure TForm2.Button2Click(Sender: TObject);
var
QP : TiSEDQuickPDF;
hmillis, wmillis : integer;
begin
  QP := TiSEDQuickPDF.Create;
  try
  QP.LoadFromFile(Edit1.Text);
  QP.SetMeasurementUnits(1); // values as millimeters
// I tried your suggestion
  hmillis := Round(QP.PageHeight);
  wmillis := Round(QP. PageHeight);
// And I tried this
  wmillis := Round(QP.GetPageBox(2,2));
  hmillis := Round(QP.GetPageBox(2,3));
  wh.Text := IntToStr(wmillis) + ' x ' + IntToStr(hmillis);
  finally
    QP.Free;
  end;
end;
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jun 07 at 9:21AM
Hi Mac!

You see the dimensions of the page that is actually selected.
An unlock-key for testing one month is here:
343738366767A06BE886EBF94443CB0F
Evaluation valid until 30 July 2007

We've posted here purchase-links... you can still buy the components.
Please read here:
http://www.quickpdf.org/forum/forum_posts.asp?TID=698
But keep in mind you can get support only from quickpdf-users without any guaranties.

Best regards,
Ingo



Edited by Ingo - 30 Jun 07 at 9:26AM
Back to Top
mac32bit View Drop Down
Beginner
Beginner


Joined: 29 Jun 07
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote mac32bit Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jun 07 at 10:06AM
Hi Ingo
 
Now my code works with the key :)
 
594 x 841 !!!
 
procedure TForm2.Button2Click(Sender: TObject);
var
QP : TiSEDQuickPDF;
hmillis, wmillis : integer;
begin
  QP := TiSEDQuickPDF.Create;
  try
  QP.UnlockKey('343738366767A06BE886EBF94443CB0F');
  QP.LoadFromFile(Edit1.Text);
  QP.SetMeasurementUnits(1); // values as millimeters
  hmillis := Round(QP.PageHeight);
  wmillis := Round(QP.PageWidth);
  wh.Text := IntToStr(wmillis) + ' x ' + IntToStr(hmillis);
  finally
    QP.Free;
  end;
end;
 
 
Thanks for your help
 
Mac
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store