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

Copy Header and Footer from One PDF to Another

Guest
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

I have a 27 page PDF that was generated as follows:

1. I created several Excel charts and tables

2. I exported them to separate PDFs

3. I combined the PDFs into one PDF

4. I applied a custom header and footer scheme to the combined PDF as follows:

     a. each separate PDF (pre-combination) is called Exhibit A, Exhibit B, etc.

     b. some exhibits are only one page, but for exhibits that are longer than one page, I put a footer that goes "Page 1", "Page 2", etc. for the number of pages in that exhibit

Right now I have to recreate and re-export all of those Excel charts and tables based on updated data. Do you know if there is any way that I could automate or expedite the process of creating these custom headers and footers for the new exhibits?

Thanks,

Navid

TOPICS
Edit and convert PDFs

Views

6.6K

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

correct answers 1 Correct answer

Deleted User
Jan 26, 2017 Jan 26, 2017

Thanks Karl, I was able to find a solution from the documentation you linked to.

Here is how I solved it:

1. Go through each page of the original PDF and delete all content except for the header. You can do this using the Edit tool. AutoHotkey can reduce keystrokes for those interested (you would have to learn the AutoHotkey language which is pretty easy but takes a little time to learn)

2. Go to the Action tool in Acrobat DC and create a new action. Go to "More tools" and click execute JavaScript.

...

Votes

Translate

Translate
Community Expert ,
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

You can save a header/footer configuration and then load it again when you want to apply the same setting again. This saves on a few mouse-clicks.

If your complete document uses the same header/footer style (which does not seem to apply to your document), you can do this:

You have your old document (e.g. Exhibit_A.pdf) and your new document (Exhibit_A_New.pdf). Open up the Exhibit_A.pdf file in Acrobat, then select to insert pages (Tools>Organize Pages>Insert>From File or right-click on a page in the page thumbnails view and select Insert from the menu). Select the file Exhibit_A_New.pdf and select to insert after the last page of the document. Now with the pages combined, select to "Update" your header/footers. This will fill in the current configuration, and you can just click on the "OK" button to apply it to the whole document . Now remove the pages that belonged to the original Exhibit_A.pdf file and re-run to "Update" the headers/footers. You should now have the same headers/footers in the new file with the correct page numbers. Save this file as your new copy of Exhibit_A.pdf.

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
Guest
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

Thanks Karl, though I'm not sure that will work in my case.

How about something like this?

Let's say that my original exhibit collection is called "Full_Exhibits.pdf" and the new combined exhibit packet is called "Full_Exhibits_New.pdf"

1. I do a save-as on the original "Full_Exhibits.pdf" and name is "Full_Exhibits_Headers.pdf"

2. I delete all the content on each page of "Full_Exhibits_Headers.pdf" except the header and footer

3. I open "Full_Exhibits_New.pdf" and import "Full_Exhibits_Headers.pdf" as a layer.

Would this work?

Also, would it be possible to used Adobe Acrobat Actions to automate the process of deleting content from the middle of the page (i.e. leaving the header and footer intact)?

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 ,
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

I've never tried this, so I don't know if this is something that would work.

The only way you can remove content via a script is by running redaction. You would mark the area in the center of the page with a redaction annotation, and then call Doc.applyRedactions() to actually apply them. See here for more information:

Acrobat DC SDK Documentation

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
Guest
Jan 26, 2017 Jan 26, 2017

Copy link to clipboard

Copied

Thanks Karl, I was able to find a solution from the documentation you linked to.

Here is how I solved it:

1. Go through each page of the original PDF and delete all content except for the header. You can do this using the Edit tool. AutoHotkey can reduce keystrokes for those interested (you would have to learn the AutoHotkey language which is pretty easy but takes a little time to learn)

2. Go to the Action tool in Acrobat DC and create a new action. Go to "More tools" and click execute JavaScript. Press the right arrow to add that task to the action. Now edit the JavaScript to do the following.

// This script allows you to essentially overlay one PDF over another.

// It's useful when one PDF has some custom header, footer, and/or watermark images/text

// and you want to overlay that to another PDF (Navid - 1/26/2017 02:34:52)

for(count = 0; count < 27; count++){

   this.addWatermarkFromFile({

      cDIPath: "/R/.../.../.../headers.pdf",

      nSourcePage: count, // take Watermark from this page of the source file

      nBegin: count, // start applying watermark at this page

      nEnd: count, // stop applying watermark at this page

   });

}

3. Run the action from the actions list on the right hand side

Note: you will have to change the value of the "count < 27" depending on how many pages are in your PDFs. This script essentially allows you to overlay one PDF on another.

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 ,
Jan 26, 2017 Jan 26, 2017

Copy link to clipboard

Copied

LATEST

Thanks for sharing your solution.

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