Inserting filename and page numbers into multiple PDF files?

Have since seen this thread, BUT still interested in the syntax of the code
to insert filename and page # into multiple files:
http://forums.adobe.com/thread/951925?tstart=0
Good Evening (GMT!)
I have approx 100 PDFs with one or two pages in each, they are English translations
of Russian language test certificates and the formatting/feel of the originals is lost in
the translations. The only real link between the two sources is the "_RUS" and "_ENG"
filename suffixes and the common leading filenames otherwise. Thus I need to maintain
a record of the filename in any page I print off, should there be a need to refer back to
the original if the translation is open to artistic licence.
I have a script (below) that happily adds a page x/y and filename into the active file,
what I would like is to be able to do this insertion into multiple files as defined by a
portfolio or a selection via a select files dialogue box
I am quite out of my depth now as my past skirmishes with JavaScript have set
cookies and tweaked a few other browser doodads in webauthoring
Any help most appreciated on this one...
Kind Regards
Dr B
Southampton
UK
NB the filename inserted may be corrupted as a result of my last tweakings
will sort that one out ASAP....
================================
// SetRemoveFooter
// Modified as marked
// Menu item generation
app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Complex Footer", cParent: "File", nPos: 20 });
app.addMenuItem({ cName: "Set Filename", cParent: "Footer", cExec: "SetFooter(1)"});
app.addMenuItem({ cName: " -> Set Date .... centered", cParent: "Footer", cExec: "SetFooter(2)"});
app.addMenuItem({ cName: " -> Set Date .... right", cParent: "Footer", cExec: "SetFooter(3)"});
//add page x of y
app.addMenuItem({ cName: "Set Page ", cParent: "Footer", cExec: "SetFooter(4)"});
app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(5)"});
app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});
app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(5)"});
app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});
app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(4)"});
//=====================================================================================
//Set/remove Footer
function SetFooter(ARG)
var re = /.*\/|\.pdf$/ig;
var FileNM = + this.path.replace(re,"")+".pdf";
var Path = this.path;
var AcDate = new Date();
var AcDateFormat = "dd/mm/yyyy"
var Box2Width = 100
for (var p = 0; p < this.numPages; p++)
var aRect = this.getPageBox("Crop",p);
var TotWidth = aRect[2] - aRect[0]
if (ARG<=3 || ARG==5)
{var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
//print output?
fd.value = util.printd(AcDateFormat, AcDate) + " (" + FileNM +")";
// TEXT SIZE SETTING
fd.textSize=12; fd.readonly = true;
if (ARG==1){ fd.alignment="left" };
if (ARG==2){ fd.alignment="center" };
if (ARG==3){ fd.alignment="right" };
if (ARG==4 || ARG==5)
{var bStart=(TotWidth/2)-(Box2Width/2)
var bEnd=((TotWidth/2)+(Box2Width/2))
var fp = this.addField(String("xftPage"+p+1), "text", p, [bStart,30,bEnd,15]);
// print output?
fp.value = "Page: " + String(p+1)+ "/" + this.numPages;
// TEXT SIZE SETTING
fp.textSize=12; fp.readonly = true;
fp.alignment="center";
//==========================================================================
function RemoveFooter(ARG)
if (ARG<=3 || ARG==5) {var x = this.removeField("xftDate");}
if (ARG==2 || ARG==5) {for (var p = 0; p < this.numPages; p++)
var x = this.removeField(String("xftPage"+p+1)); }
will

Putting this in a batch file within the automation function of Acrobat
delivers the goods, I need to investigate the formatting of the output to
get them to line up, have taken the middle ground and gone for a central
position for the page x/y text...... some lines are redundant
Dr B
===========================================
var re = /.*\/|\.pdf$/ig;
var FileNM = this.path.replace(re,"")+".pdf";
var Path = this.path;
var AcDate = new Date();
var AcDateFormat = "yyyy/mmm/dd  HH:MM"
var Box2Width = 50
for (var p = 0; p < this.numPages; p++)
var aRect = this.getPageBox("Crop",p);
var TotWidth = aRect[2] - aRect[0]
       var fd = this.addField("xftDate", "text", p, [30,15,
TotWidth-30-30,30]);
       fd.value =  FileNM;
       fd.textSize=12; fd.readonly = true;
       fd.alignment="left";
var bStart=(0);
var bEnd=(TotWidth);
       var fp = this.addField(String("xftPage"p1), "text", p,
       fp.value = "Page: " + String(p1) "/" + this.numPages;
       fp.textSize=12;  fp.readonly = true;
       fp.alignment="center";

Similar Messages

  • Can I add the file name and page numbers to multiple pdfs automatically?

    Hello.  Thanks first for taking the time to read this!  We are a small non profit hospice.  Looking to take a large amount of files and put the patients last name (which is the file name) and a page number on the footer of every page of every document.  For example.  File Name Smith.  Smith 1 Smith 2 Smith 3 etc.  However I like to be able to do this to multiple files at once and not have to open each one up.

    Go to Advanced - Document Processing - Batch Processing...
    Click New Sequence and give it a name.
    Now select the sequence you've created, click Edit Sequence, click Select Commands.
    Select Execute JavaScript from the left-hand side, and click Add.
    Now select it on the right-hand side and click Edit.
    Paste the code from my previous post into the window, and click OK twice.
    Now, back in the Edit Sequence window, select the folder you want to run the batch on, and the output folder. Be aware that if you choose the same folder, the original files will be overwritten, so you might want to use a different one.
    Under Source File Options, deselect everything.
    Click OK.
    You're now ready to run the batch sequence!

  • Trying to drag pdf files i have and combine them into one pdf file in the account i just purchased with Adobe. when i drag a pdf file over Adobe doesn't accept it. says it can not convert this type of file. but it is an Adobe file. Do I need to change it?

    Trying to drag pdf files i have and combine them into one pdf file in the account i just purchased with Adobe. when i drag a pdf file over Adobe doesn't accept it. says it can not convert this type of file. but it is an Adobe file. Do I need to change it in some other form befor dragging it?

    Hello djensen1x,
    Could you please let me know what version of Acrobat are you using.
    Also, tell me your workflow of combining those PDF files?
    Please share the screenshot of the error message that you get.
    Hope to get your response.
    Regards,
    Anubha

  • How do you insert page numbers into a pdf that combines multiple documents?

    I need to combine a number of documents into one PDF that then has correct pagination for the whole new document. How do you insert page numbers when combining into one PDF?

    Hi,
    You can go to Tool panel. Go to Pages. Click on Header& Footer -->  Add & Footer from the Add Header and Footer
    Regards,
    Ajlan Huda.

  • How do I insert a page into multiple .PDF files?

    Hi everyone, I have several hundred PDF files every month, and I need to insert a page at the end of each document.
    The files and insert are in PDF format. What is the easiest way to do this?
    I am using Acrocrbat 10.
    Thank You

    If you have Acrobat X Pro, and the PDFs aren't secured, it's easy to do it with an Action.
    File > Action Wizard > Create New Action
    Set "Start with" to "Ask" so you can choose a folder each month
    From the panels on the left, choose Pages > Insert Pages
    Click the Options icon, choose the file containing the page you want to insert, then set it to After / Last Page
    Set the Save To options to suit what you want.
    Now you can run the Action against an entire folder of PDFs.

  • Insert an image into a PDF file

    OK, I'll give up and ask. It doesn't seem like it should be that hard with the SDK to insert a JPG or BMP into a PDF file, but I'm struggling to do it. I'm new to the Acrobat SDK, but I've done automation interface programming for years.
    I'm using C# with PDDoc and AVDoc, but I can go with Javascript or a plug-in if necessary. I'm using Acrobat Proffesional 7.0, but I'll upgrade if necessary. (It looks like the Acrobat 8.0 user interface makes it easier than in 7.0.) I'd rather use the SDK, but I could use an automation interface or command-line interface to a third-party tool if needed. I'm all client-side; no server-side needed.
    Can anyone give me some pointers to get started? Or point me to some sample code or a third-party tool? I've read a thousand pages of SDK documentation and spent hours in this and other forums.
    Thanks for your help.

    To add it as real page contents, not a button or annotation, would
    probably need a plug-in, unless there is some stamping function. To
    write a plug-in you would start with reading the PDF Reference to know
    the basic internals, graphic and colour models of PDF.
    Aandi Inston

  • Convert and combine many image files into a pdf file?

    I have about 250 png and jpg files in a directory, and would like to convert and combine them into a pdf file.
    I wonder what steps to do that in Acrobat Adobe 9 in Windows?
    Requirements are:
    They are named in the order of 0000.png, 0001.jpg, ..., 0250.png, in which I would like to create the pages of the resulting pdf file.
    Also there may be some numbers (such as neither 0010.png nor 0010.jpg exists) missing, but still I would like the images be in the same order after creation of a pdf file.
    I would like the pages in the resulting pdf file look to have the same or similar size.
    But the numbers of pixels of the image files are different. Some are about 2000 x 3500 pixels, and some are about 800 x 1200 pixels.
    I also would like to have control of the spatial resolution such as the dpi parameter
    I also would like to OCR the pdf file (the images are scanned raster images).
    I would like the resulting pdf file to take reasonable storage size on my disk.

    You don't say what version of Acrobat you are using, but I expect you could do it with Acrobat XI's Actions feature. Maybe even in 10.0. Since this is an enterprise deployment forum, I suggest you find a better forum and ask about Actions and Batch Processing.
    hth,
    Ben

  • Convert Multiple Outlook Emails to Multiple PDF Files (Not Portfolio or Single PDF) for Archiving?

    Hi all, I am learning how to convert emails to PDF files and there is some great functionality there!!  I have not discovered how to convert multiple outlook emails into multiple PDF files (one PDF file for each email) - all at the same time (not one at a time)!!  Is there a way to do this using Acrobat X??  The purpose of this is for long-term business archiving.  When I search for an email in the archive, I do not want to pull up a portfolio containing 1000 emails or a 1000 page PDF file with multiple emails run together!!!  I want to pull up individual emails containing my search terms.  I have been searching for a way to archive emails and MS OUTLOOK .PST files are NOT the answer.  I get a lot of business emails with large attachments and I do not file my emails in separate sub-folders (by client or job).  I want to convert multiple emails (by date range) from my UNIVERSAL INBOX into multiple PDF files for long term storage (with each email being converted into its own, separate PDF file and named with the same name as the "Re: line" of the email).  This has been a HUGE problem for me....and Acrobat is sooooo close to the solution for me.  Can anyone help??  If so, will attachments be converted?  If not, is there a separate software program or add-in that I can buy that will do this??  I use MS Office 2010, Adobe Acrobat X Pro, Windows 7 64 BIT.  Thanks for your help!!

    I am a retired person and did'nt realize I already have a Adobe account, so you can scrap the entire information. Thanks for the trial anyway and have a great week.
    Frederick

  • I NEED HELP ON COMBINING FILES INTO ONE PDF FILE

    HOW CAN I TAKE 6 FILES AND MAKE THEM INTO ONE PDF FILE?

    Hi GOLDENSOROR
    How to merge files into one PDF:
    Within Acrobat XI, select File > Create > Combine Files into a Single PDF.
    Click Add Files and select the files you want to add.
    Click, drag, and drop to reorder the files and pages. Double-click on a file to expand and rearrange individual pages. Press the Delete key to remove unwanted content.
    When finished arranging the files, click Combine Files.
    Select File > Save As > PDF.
    Name your PDF file and click Save.
    Please refer : http://www.adobe.com/products/acrobat/merge-pdf-files.html

  • How do I scan multiple pages into one pdf file using the PIXMA MG7520 on Windows 8.0? Please help!

    I recently received a PIXMA MG7520 for a gift.  It works great with my lenovo laptop/tablet running on Windos 8.0.  The one drawback to the HP all-in-one that it replaced is it does not have an ADF.  That being said, there must be some way to scan multiple pages into one pdf file.  I need help figuring thing out.  Thanks in advance!
    Solved!
    Go to Solution.

    Hi mdtolbert54,
    There is a program that comes with the printer called the IJ Scan Utility that can assist you with scanning multiple pages into a single PDF document.  To do this, please follow these steps:
    1. On your keyboard, press the Windows key.
    2. Start typing IJ SCAN UTILITY. The search window opens as you type. Once the IJ SCAN UTILITY is displayed, please select and open it.
    3. In the Canon IJ Scan Utility window that opens, click SETTINGS.... in the bottom right of the window. The Settings dialog box appears.
    4. Click the DOCUMENT SCAN option on the left pane of the window.
    5. In the SAVE SETTINGS section of the window, you will select the save format and location of the document you are about to scan.
    a.) In the FILE NAME field, specify the name you would like to give the file. By default the filename will begin with IMG; you can remove IMG and change it to whatever you would like to name the file.
    b.) In the DATA FORMAT field, use the drop-down arrow to select the PDF (Multiple Pages) option. 
    c.) In the SAVE IN field, please navigate to the area where you would like the file to be saved once it is scanned in. By default, the file will be saved in the MY DOCUMENTS folder.
    6. Once all settings have been selected, click the OK button at the bottom of the window to save the changes. The IJ Scan Utility main screen appears.
    7. Click the DOCUMENT button. Scanning starts. Click the CANCEL button to cancel scanning if needed. Scanned items are saved in previously selected folder location specified in the SETTINGS... window.
    If you find that you need advanced scanning options such as adjusting resolution, brightness, contrast, saturation, color balance, etc. in addition to the options selected above, please click on the SCANGEAR button on the IJ Scan Utility Main screen, then adjust the items as necessary.
    Once the items above are set for document scanning, in the future, you will only need to launch the IJ Scan Utility, then press the DOCUMENT button to perform the scan (unless you want to make changes to the settings).
    Hope this helps!
    This didn't answer your question or issue? Please call or email us using one of the methods on the Contact Us page for further assistance.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • How to insert page numbers in a PDF document?

    How to insert page numbers in a PDF document using Adobe Acrobat X Pro 10.1.2?
    Thanks.

    OK, I found it myself:
    1. Tools - Pages - Edit Page Design - Header & Footer - Add Header & Footer.
    2. Select the font and size, etc, place the cursor on the appropriate site to insert the page number, click the "Insert Page Number" button, and click OK.
    That is!

  • I have nine, 1-page PDF files that are accessible and need to combine into 1 PDF file.  I have tried appending, adding and the combine PDFs process. The file created is not keeping my changes. The created file is partially accessible but I have to re-fix

    I have nine, 1-page PDF files that are accessible and need to combine into 1 PDF file.  I have tried appending, adding and the combine PDFs process. The file created is not keeping my changes. The created file is partially accessible but I have to re-fix issues I had fixed in the single files. I need suggestions on what else can be done if any. Using Acrobat pro XI.

    Out of habit, I tend to combine PDF files in the Page Thumbnails pane by right-click then "Insert Pages" -> "From File". For me, this preserves the tags from both documents, although the tags may have to be moved into the right location (if I recall correctly the tags for the inserted pages get put at the end of the tag structure, regardless of where the pages are inserted), If I first put the tags for the document to be inserted inside a container tag like Section, it makes the process easier. Moving that set of tags to the right place is the only re-fixing that I recall having to do. What behavior are you experiencing?
    a 'C' student

  • How do i scan multiple pages into one pdf file

    How do I scan multiple pages into one pdf file?

    That depends on your scanning software. Adobe Reader doesn't scan.

  • Hi. I made a modern resume from the pages template and then made a modern letter from the templates, how do I combine the two into one PDF file in Pages? Thank you.

    Hi. I made a resume from the modern template in Pages, then I made a letter from the modern template in Pages. How do I combine the two (cover letter and resume) into one PDF file. Thanks in advance.

    Open them both in Preview.app and drag the thumbnail of one into the other,
    Peter

  • Writing multiple BLOB (PDF) records into one PDF file

    I currently have a procedure that writes an individual BLOB pdf row and outputs it to a PDF file, however I would like to write multiple BLOB rows into one PDF.
    Oracle version:10g R2.
    Does anyone know whether it is possible to do this?
    Here is my code, I was hoping to use a cursor FOR LOOP to read the BLOB records. The BLOB records do successfully load into a new PDF file, however when you open it the PDF only the first page is viewable. I am assuming the issue is to do with the PDF format rather than writing the data out to the file. I.e. the Page numbers etc.., incorrect formatting of the PDF?
    declare
    -- Test statements here
    b BLOB;
    amount BINARY_INTEGER;
    file_handle UTL_FILE.FILE_TYPE;
    l_pos INTEGER := 1;
    l_blob_len INTEGER;
    l_buffer RAW (32767);
    l_amount BINARY_INTEGER := 32767;
    file_name_ VARCHAR2(200);
    pattern_id_ VARCHAR2(200) := '5555555';
    pdf_path_ VARCHAR2(200) := 'PDF_OUT';
    cursor get_blob_recs is
    select pdf from mds_remote_pdf_tmp;
    BEGIN
    file_name_ := to_char(pattern_id_)||'.PDF';
    file_handle := UTL_FILE.FOPEN(pdf_path_,file_name_,'wb');
    FOR rec_ IN get_blob_recs LOOP
    l_blob_len := DBMS_LOB.getlength (rec_.pdf);
    l_pos := 1;
    WHILE l_pos < l_blob_len
    LOOP
    DBMS_LOB.READ (rec_.pdf, l_amount, l_pos, l_buffer);
    UTL_FILE.put_raw (file_handle, l_buffer, FALSE);
    l_pos := l_pos + l_amount;
    END LOOP;
    END LOOP;
    UTL_FILE.FCLOSE(file_handle);
    end;
    Any advice would be greatly appreciated.
    Regards,
    David.

    I guessed there was more to a PDF file format than just amending the BLOB objects!. I think I'll have to create a function with an IN param containing the PDF file list, and invoke a Java class to merge the PDFs in the OS.
    My requirement is to record the history of when a hand written form was completed. E.g. a user might complete half a document one day, and the rest of the document another day, therefore I want one PDF with two pages of the same form at different stages of completion. These forms are currently being created as two separate PDFs, and the problem is I am restricted to displaying only one PDF!
    Thank you.
    David.
    Edited by: david.massey on Jan 26, 2011 8:16 AM

Maybe you are looking for

  • Adobe LiveCycle Designer 10.0 insert QR-Codes

    Hello Adobe Community, I contacted an Adobe supporter via live chat two days ago. He said that the Designer 10.0 supports QR-Codes on PDF. But before buying the expensive software, I want to make sure that it really supports creating QR-Codes (Data M

  • How to clear status "Error in process"?

    Hi All, I need help to clear the status of my invoice in SRM. The invoice status is "error in process". We checked in backend and reprocessed the IDOC through WE19 instead of BD87 and the invoices are posted now in backend. But the status of the invo

  • Address Book and iCal not updating in iTunes

    After I make changes to my address book I try to sync the changes the old groups, information, and photos are not updating to iTunes and therefore nothing is changing on my devices.  I followed directions from this link http://support.apple.com/kb/ts

  • Two apps share the screen

    I'm hoping to find an OS X equivalent to a nice feature in Win XP. Say I've got two apps open, a browser and a text document, and I want to divide the screen space equally between the two. In Windows, you can control+click the two app buttons down on

  • Where is customer support?

    I am a creative cloud subscriber and I am on the last weekend of my class on FLash Pro.  It has been crashing for last two weeks and very unstable.  Today, it crashed and locked up my system IMAC (32G of RAM)!   SO, I uninstalled Flash and need to re