Go Back   MarcomCentral (PTI) and FusionPro User Communities > Support > Issues, Questions, Etc.

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 18th, 2015, 03:31 PM
Kal's Avatar
Kal Kal is offline
Regular Contributor
 
Join Date: Jun 2011
Location: Canada
Posts: 56
Default Output PDF page number

Does anyone have a script that will read a PDF and return the number of pages within the PDF?
__________________
Kal Bedi
FusionPro Desktop 10.1.9
Adobe Acrobat Pro DC
Mac OS Sierra 10.12.5
Canada
Reply With Quote
  #2  
Old February 18th, 2015, 06:25 PM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is online now
Senior Contributor
 
Join Date: Feb 2011
Posts: 233
Default Re: Output PDF page number

Give this a shot:

Code:
return CreateResource("filename.pdf", "graphic").countPages;
Reply With Quote
  #3  
Old February 19th, 2015, 10:39 AM
Kal's Avatar
Kal Kal is offline
Regular Contributor
 
Join Date: Jun 2011
Location: Canada
Posts: 56
Default Re: Output PDF page number

Thanks Thomas but...

I get over 10,000 pdf's weekly and I have a data field called "PD_GRAPHIC" that pulls them in so how can I revise what you wrote to use that field to count the pages?

Thanks
Kal
__________________
Kal Bedi
FusionPro Desktop 10.1.9
Adobe Acrobat Pro DC
Mac OS Sierra 10.12.5
Canada
Reply With Quote
  #4  
Old February 19th, 2015, 10:48 AM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is online now
Senior Contributor
 
Join Date: Feb 2011
Posts: 233
Default Re: Output PDF page number

Quote:
Originally Posted by Kal View Post
Thanks Thomas but...

I get over 10,000 pdf's weekly and I have a data field called "PD_GRAPHIC" that pulls them in so how can I revise what you wrote to use that field to count the pages?

Thanks
Kal
I have no idea what you mean by "pulls them in". Does it create a 10,000 record input file you use in FusionPro? Where do you want the page numbers displayed?

Sample files showing your input and expected output would be helpful.
Reply With Quote
  #5  
Old February 19th, 2015, 11:11 AM
Kal's Avatar
Kal Kal is offline
Regular Contributor
 
Join Date: Jun 2011
Location: Canada
Posts: 56
Default Re: Output PDF page number

Hi, my data has 10,000 records and the field "PD_GRAPHIC" has all the PDF names and I'm using that field to do a graphic image pull into a FusionPro letter.

I just want to use that same data field in FusionPro to return how many pages there are within the PDF and I'm going to print that number on the letter.

Hope that makes sense.
__________________
Kal Bedi
FusionPro Desktop 10.1.9
Adobe Acrobat Pro DC
Mac OS Sierra 10.12.5
Canada
Reply With Quote
  #6  
Old February 19th, 2015, 11:21 AM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is online now
Senior Contributor
 
Join Date: Feb 2011
Posts: 233
Default Re: Output PDF page number

In that case it is just a matter of putting the field name in. This would go in a regular text rule. Just call the rule wherever you need to put the page count number.

Quote:
return CreateResource(Field("PD_GRAPHIC"), "graphic").countPages;
Reply With Quote
  #7  
Old February 19th, 2015, 11:29 AM
Kal's Avatar
Kal Kal is offline
Regular Contributor
 
Join Date: Jun 2011
Location: Canada
Posts: 56
Default Re: Output PDF page number

Thank you Thomas.
__________________
Kal Bedi
FusionPro Desktop 10.1.9
Adobe Acrobat Pro DC
Mac OS Sierra 10.12.5
Canada
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:06 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.