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 - Extracting Page Numbers as a Variable
  FAQ FAQ  Forum Search   Register Register  Login Login

Extracting Page Numbers as a Variable

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


Joined: 22 May 13
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote datagraphic Quote  Post ReplyReply Direct Link To This Post Topic: Extracting Page Numbers as a Variable
    Posted: 22 May 13 at 10:38AM
hi,
        I need to extract the page numbers contained in a PDF.

 ie If there are 4 pages in the PDF i need to extract the number 4 and use it for calcualtions on another piece of software in a continuous automated process.

Is this possible?

DG.  :-)
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 13 at 12:18PM
Hi DG!
 
Yes. It's possible.
What's the next question?    :)
Use one of the first step codes.
Put in a LoadFromFile...
...and then use function PageCount.
 
Cheers and welcome here,
Ingo
 
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 23 May 13 at 2:48AM
DG,

The second approach usig the DA functions will be the fastest as it doesn't need to load the entire file into memory.

  QP.LoadFromFile("4pages.pdf", "");
  int pageCount = QP.PageCount();
  QP.RemoveDocument(QP.SelectedDocument());

or

  int fh = QP.DAOpenFile("4pages.pdf", "");
  int pageCount = QP.DAGetPageCount(fh);
  QP.DACloseFile(fh);

Andrew.
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