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

Duplicate PDF pages based on field value.

New Here ,
Aug 25, 2018 Aug 25, 2018

Copy link to clipboard

Copied

Hello, this may be a scripting question.

I also am not sure if I should duplicate the pages in Indesign or within acrobat.

I have a large document for printing created as a merge in Indesign from CSV.

I need to provide a proof with only one instance of each page

When we are ready to print, the pages need to be duplicated based on data from the original CSV.

My thinking is I bring the number of copies required for each page as a field, non printing, screen only. This way the proofing process can also check and potentially amend the number of copies required while the content is being checked.

I then need a method to duplicate the pages based on that field value.

Alternatively...... 

Please give me a suggestion.

Thanks

TOPICS
Acrobat SDK and JavaScript , Windows

Views

484

Translate

Translate

Report

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 ,
Aug 25, 2018 Aug 25, 2018

Copy link to clipboard

Copied

If you want to solve this at the last station in the chain, you can do that only with scripting. I would do it at the first element in the chain, even before it enters Indesign by generating the csv data sets accordingly.

ABAMBO | Hard- and Software Engineer | Photographer

Votes

Translate

Translate

Report

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
New Here ,
Aug 25, 2018 Aug 25, 2018

Copy link to clipboard

Copied

Hello Abambo,

Thankyou for the reply. I am able to achieve the outcome by manipulating the CSV data, in fact that is my current workflow.

For a few reasons specific to my project, a script at the end of the process in acrobat would be the ideal.

I have a non printing field in the PDF, I just need some help with the Javascript to duplicate the pages based on the field.

Thanks

Votes

Translate

Translate

Report

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 ,
Aug 25, 2018 Aug 25, 2018

Copy link to clipboard

Copied

I transferred from Printing & Prepress to JavaScript.

May be there are qualified users knowing how to do that.

ABAMBO | Hard- and Software Engineer | Photographer

Votes

Translate

Translate

Report

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 ,
Aug 25, 2018 Aug 25, 2018

Copy link to clipboard

Copied

Yes, this can be done using a script, but what should trigger it? OK, you have a field with the number of times to duplicate the page, but what should be the trigger to actually do it? You would need a button (it can be transparent) to do it, or something like that.

Votes

Translate

Translate

Report

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
New Here ,
Aug 25, 2018 Aug 25, 2018

Copy link to clipboard

Copied

Hello,

Abambo, thankyou for the transfer. I did wonder..

Try67, yes I imagined the script on the click of a button. I already have a non printing layer to put the button on. It would need to be only one button for the whole document and become inactive once it was actioned.

I also did see some posts on adding a function within a menu, is this an action? I assume this wouldn't follow the file which is fine in this case as only one user will complete the page duplication step.

Thanks

Nathan

Votes

Translate

Translate

Report

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 ,
Aug 26, 2018 Aug 26, 2018

Copy link to clipboard

Copied

Yes, that would require installing a script on the local machine, which will probably also be required for the script that duplicates the pages.

This is not a simple task and would require a custom-made tool. If you're interested in hiring someone to develop it for you feel free to contact me (try6767 at gmail.com) and we could discuss it further.

Votes

Translate

Translate

Report

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 ,
Aug 26, 2018 Aug 26, 2018

Copy link to clipboard

Copied

Nathman_F  wrote

Hello,

Abambo, thankyou for the transfer. I did wonder..

You’re welcome. I see you are in good hands! Good luck.

ABAMBO | Hard- and Software Engineer | Photographer

Votes

Translate

Translate

Report

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
LEGEND ,
Aug 26, 2018 Aug 26, 2018

Copy link to clipboard

Copied

LATEST

To add the new pages, you can either make an existing page a template (doc.addTemplate) and spawn it (template.spawn) one or more times, or use the doc.insertPages method to add pages from a separate file into the current one. Both approaches have security restrictions, so you'd have to include much of the code in a folder-level JavaScript file that would have to be installed on each user's machine. You can trigger the code from a bookmark, or a button like you mentioned. More information on the scripting is available in the Acrobat JavaScript reference, but post again if you need specific help.

Votes

Translate

Translate

Report

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