Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Export individual page button

Community Beginner ,
Feb 12, 2019 Feb 12, 2019

Hey everyone.

I'm looking for exporting only the second page of my document with a button.

Any hint? Is it possible?

TOPICS
Acrobat SDK and JavaScript
656
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2019 Feb 12, 2019

What do you mean by exporting?  Exporting form data or extracting the page to a separate pdf file?

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2019 Feb 13, 2019

That would be extracting the full page (visually and with the filled up fields)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2019 Feb 13, 2019

Is the file going to be used in Reader?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2019 Feb 13, 2019

Not necessarily.

The plan is to create the document from my computer, than send it to my client, which he will use on iPad through PDF Expert.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2019 Feb 13, 2019

I highly doubt it's going to work on a mobile device, although if it will then it will only be in PDF Expert... You can test it out for yourself, though. The code to do it is very basic. For example, this will extract the first page as a new (temporary) file:

this.extractPages(0,0);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2019 Feb 13, 2019

Ok!

What does the "(0,0)" means?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2019 Feb 13, 2019

It's the page numbers of the first and last page to extract.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2019 Feb 13, 2019

As try67 already explained, that's the first and last page to extract. You can find all that information (and more) in Acrobat's JavaScript documentation:

Acrobat DC SDK Documentation - Doc.extractPages()

Regarding the subset of JavaScript that is supported by PDF Expert, you can look that up here: https://helpspot.readdle.com/pdfexpert6/index.php?pg=kb.page&id=1154

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2019 Feb 13, 2019
LATEST

Extracting pages on the iPad is not going to work. 

What is your intended workflow? Maybe there is another way to do it. For example, submitting the data to a server script, that then returns the separate form with data.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines