How to automatically add document information to a pdf footer?

New Here ,
Nov 09, 2019 Nov 09, 2019

Copy link to clipboard

Copied

I write reports for legal claims. As part of my report I need to create a single pdf with all of the documents I cite in my report (typically this is in the 100-200 document range). Each of the documents needs to have information about the document in the headers and footers. This includes the source information about the document - that is, where is the document from (for example, an archive name, a file number, and a date).

 

I have figured out how to do this by manually copying and pasting the information into the footer, but since I have an excel spreadsheet with this information, I would prefer to have the computer automatically match the PDF to the source information and create the footer.

 

I am willing to spend some time to learn how to do this - I assume I need to use javascript - but I am having trouble locating either a specific course or book that covers this. Can anyone point me to a resource where I can learn how to automatically fill in a document footer with information from an excel spreadsheet?

 

Thanks,

Blair

 

 

TOPICS
Acrobat SDK and JavaScript, Edit and convert PDFs, How to

Views

135

Likes

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
Adobe Community Professional ,
Nov 09, 2019 Nov 09, 2019

Copy link to clipboard

Copied

Where is the information in Excel? In the Excel header or footer? In the tab name? In one or more cells?

Likes

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 ,
Nov 10, 2019 Nov 10, 2019

Copy link to clipboard

Copied

I have the information for all the documents in a table in excel. The documents are mostly letters, memos, reports, and maps (not excel documents converted to pdf). The the document source information is in a cell in the excel table. Other information in the same row for each document include the pdf name, the docuemnt author, document date, and a html link to the pdf.

 

So, the excel table acts like a mini flat file database for all of the documents that I collect.

 

It is easy to take the information out of excel and put into another format, if that helps

Likes

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
Adobe Community Professional ,
Nov 10, 2019 Nov 10, 2019

Copy link to clipboard

Copied

Hi

I am not a scripter and don't know of a way to put a cell reference into either an Excel footer or an Acrobat footer. Maybe someone else will chime in.

 

If the document is in Word and you are applying Styles for your formatting (the styles can be redefined), then this method might work to create the footer in Word, which will convert to PDF.

 

  1. Apply the Styles: Heading 1, Heading 2, etc. to the text you want in the running footer (or header)
  2. Click an insertion point in the Footer where you want this to appear.
  3. On a Mac, go to Insert > Field >  Links and References > StyleRef
    (The Mac still has menus as well as tabs, and I also found it on the Header/Footer tab.) If you can't find it in Windows, let me know.
    The text box will say "STYLEREF" at this point.

    5.png

  4. Click Options... in the lower left, then choose the Styles tab. Click your style to add it to the field name.
    It will now say STYLEREF "[stylename]". Click OK > OK.
    6.png

This will create a running footer (or header) with text that changes according to what is in the style. If you need more than one, it might say:
STYLEREF "Heading 1": STYLEREF "Heading 2 .

Test it on a small portion and see if this will work. I don't know exactly what is in your cells. For a quick test, go into Word and type:
=rand(10,7)
followed by Return (or change the numbers: the first number is the number of paragraphs, the second is the number of sentences),
then type in some headings, format them with Styles, and use the StyleRef in the footer to see if it will work for you. Convert to PDF to confirm it works as expected.

 

~ Jane

Likes

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
Adobe Community Professional ,
Nov 10, 2019 Nov 10, 2019

Copy link to clipboard

Copied

LATEST

There aren't any tools in Acrobat that will automatically grab info from excel and then place it on a PDF Header/Footer, but such an automation script could be written. This is not a simple tool. As an example, try out the free "File Name Stamper" Action here:

https://acrobatusers.com/actions-exchange

 

It doesn't get info from an excel file, but it does add header footer info. You could use the script as a starting point for the more complex script that uses the excel data.

 

 

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

Likes

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