How to merge the pdf files into single pdf?

I need to merge the two (or) three pdf files into a single pdf via scripting. I used the below code for inserting(merging) the pages.
this.insertPages({cPath: "Test.pdf"})
But its merginging(inserting) successfully. But the links not working after inserting. kindly advise me the solution or any other ways.
I am using Acrobat 8.0.
Thanks in advance..

http://gotofritz.net/blog/howto/joining-pdf-files-in-os-x-from-the-command-line/   <- this works but it strips OPI
Here's what I did: (This is shell script)
#!/bin/bash
FROM="./"
DESTINATION="./unCombined/"
for i in $(ls *_F_ga.pdf)
          do
          BACK=`echo "$i" | sed "s/_F_/_B_/g"`
          if [ -f $BACK ] ; then
                    open "$i"
                    osascript selectMenuItem.scpt
                    sleep 3
                    mv -f "$FROM/$i" $DESTINATION
                    mv -f "$FROM/$BACK" $DESTINATION
          fi
done
This calls an applescript
tell application "/Applications/Adobe Acrobat X Pro/Adobe Acrobat Pro.app"
activate
end tell
tell application "System Events"
          tell process "Acrobat"
                    click menu item "combine Front and Back" of menu "File" of menu bar 1
          end tell
end tell
Which activates a menu item (made with Java and saved into Macintosh\ HD/Users/*user*/Library/Application\ Support/Adobe/Acrobat/10.0/JavaScripts)
app.addMenuItem({
    cName: "combineFB",
    cUser: "combine Front and Back",
    cParent: "File",
    cExec: "combineFrontAndBack()",
    nPos: 0
Which activates this script (again saved into Macintosh\ HD/Users/*user*/Library/Application\ Support/Adobe/Acrobat/10.0/JavaScripts)
combineFrontAndBack = app.trustedFunction(
function(){
// get the file name and extension
var sFullFileName =  this.documentFileName
// make into an arry
var aFullFileName = sFullFileName.split('_F_');
// build a file name array dropping the extension
var aFileName = new Array(aFullFileName.length - 2);
for (i = 0; i < aFullFileName.length - 1; i++) {
aFileName[i] = aFullFileName[i];
// recreate file name
var sFileName = aFileName.join('.');
var back = sFileName + "_B_ga.pdf";
app.beginPriv(); // Explicitly raise privilege
//add back page based on front page name
this.insertPages ({
                    nPage: 0,
                    cPath: "/Macintosh HD/Users/jfox/test/" + back,
                    nStart: 0
this.saveAs("/Macintosh HD/Users/jfox/test/" + sFileName + "_ga.pdf");
this.closeDoc(true);
app.endPriv();
return true;
It's convoluted and comparitively slow, but it works.
EDIT: I just realized you probably meant document links and not OPI links. Ha ha. I have no Idea what this would do to document links.

Similar Messages

  • Merge multiple pdf files into single pdf

    How to merge multiple pdf files into single pdf file through any programmatic languages? Kindly share with me.
    Thanks

    Easy PDF
    http://www.macupdate.com/app/mac/38090/easy-pdf
    How To: Combine multiple PDFs in Preview
    http://macenstein.com/default/2011/12/how-to-combine-multiple-pdfs-in-preview/
    How to merge pdf files in OSX
    http://macintoshhowto.com/leopard/how-to-merge-pdf-files-with-preview-in-leopard .html
    How to Combine Multiple PDFs Using Preview
    http://www.macobserver.com/tmo/article/how_to_combine_multiple_pdfs_using_previe w/

  • Acrobat 9 Pro Merge Files Into Single PDF

    Just wanted to know if there's a way on Acrobat 9 Pro,i can select a folder using Merge Files Into Single PDF and have it merge each of the subfolders in the folder into separate single PDFs and have then retain the names of their corresponding subfolders? At the moment i'm having to do one folder at a time and then name them.
    Any help would be great

    Hi Bill
    Thanks so very much - you have solved the problem.
    I tried Document > Insert Pages and that worked.
    I then ran the "Repair" feature on Adobe which installed a few updates and I am now also able to merge pdf's by using the "Combine" feature and all the pages show the text/info.
    Thanks again for your help, it is very much appreciated.
    Thank you also to Apoorv for your assistance.

  • Batch Merge Files Into Single PDF

    Just wanted to know if there's a way on Acrobat 9 Pro,i can select a folder using Merge Files Into Single PDF and have it merge each of the subfolders in the folder into separate single PDFs and have then retain the names of their corresponding subfolders? At the moment i'm having to do one folder at a time and then name them.
    Any help would be great
    [Thread moved from comments forum to Acrobat forum]

    Hello again. I took the long weekend off, so haven't replied for a while.
    While trying to set up a few documents out of the package I wanted to create, I discovered that there
    is only one file that is causing the problem.
    The biggest problem is that it is a confidential financial file, and I'm loathe to put it up on the web.
    I'm going to try to re-create the file without the confidential part, then send it to this forum. I can't
    figure out why it should cause problems when all the others don't and they have all been created by
    the same person with the same version of Office.
    So thanks for your help so far. I really appreciate the quick response from a couple of you.  I will get back to you.

  • Can I merge 3 jpeg files into one PDF on one page?

    Can I merge 3 jpeg files into one PDF on one page? For example: scanned newspaper article was too big for one scan process, I had to scan article 3 times. Can I merge these 3 jpegs and position them like columns?

    Do you have Acrobat? If so, you can use the Add Image tool to place your images on the page where you want them to be. Alternatively, you can combine all 3 to a single PDF and then send that PDF to the PDF Printer, selecting the Multiple option to get them to appear on a single page of the new file.

  • Error Message When Merging Multiple PDF Files into One PDF File

    Good Morning,
    I have a problem with Adobe Acrobat 9 Pro. I am trying to merge/combine multiple PDF files into one PDF file, but I keep receiving this error message:
    Does anyone have a fix for this? Thank you!

    To fix:
    Provide a unique name for each form field. This includes the individual PDFs fields. As you intend to combine/merge no field name in each of the individual PDFs can be the same.
    Be well...

  • I have Windows 7, with Office 10, Acrobat Adobe 9 Std. I used to be able to combine pdf files into one pdf until I converted to Office 10. Now when I combine 3 pdf files into one pdf, I am missing the middle pdf. Pages are there but the pages are blank. A

    I have Windows 7, with Office 10, Acrobat Adobe 9 Std. I used to be able to combine pdf files into one pdf until I converted to Office 10. Now when I combine 3 pdf files into one pdf, I am missing the middle pdf. Pages are there but the pages are blank. Any Idea???

    [discussion moved to Creating, Editing & Exporting PDFs forum]

  • How to embed the html file into form 6i?

    How to embed the html file into form. What control activeX should i use? please help!!!!!!

    You can use web.show_document function for this purpose. See
    form builder help topics for more details.
    Hope this helps.

  • How does one copy a PDF file into another PDF document?

    I am trying to copy part of a PDF file into another PDF document. So far, the file will copy but will not paste into another PDF document. Any clues?

    You can't convert Photoshop to editiable InDesign (though there is a plugin from RecoSoft that claims to make editable ID files from PDF: http://www.recosoft.com/products/pdf2id/).
    About the best you can hope for is to leave pixel information in the Photoshop file (where it really belongs) and place that into an ID document, then set any type in ID.
    Peter

  • How do I combine pdf files into one pdf file?

    How do I combine a number of pdf files into one pdf file?

    If you want a more affordable option, you can try CreatePDF from Acrobat.com.

  • Insert pdf file into another pdf file keeps getting stuck

    I am trying to insert a 5 page pdf file into another pdf file (both unsecured) and it keeps getting stuck at about 71%* conplete. I can't even get the file to show up on the screen so i can close it. Help?

    I have tried several different files, and get the same phenomenon with each one –
    1.     I open an acrobat file.
    2.     I open a WORD file.
    3.     I copy a sentence from WORD to the clipboard.
    4.     I click on View in Acrobat, Tools, Pages, other options, insert from clipboard.
    5.     Acrobat shows that it is copying, and when it gets to 67% it stops and runs and runs and then only way I can stop it is to go to the task manager and end task.
    I tried refrying with a file and that didn’t work, and I can’t imagine that Acrobat was designed so that each time I try to insert from WORD I would have to refry (even if it did work).
    Please help!
    Thank you
    Shirah
    Moadim LeSimcha, times of joy!

  • What version of adobe acrobat do I need to combine mutilple pdf files into one PDF document?

    What version of adobe acrobat do I need to combine mutilple pdf files into one PDF document? I am wanting to know if Adobe Acrobat Standard XI can combine multiple PDFs for do I need to stick with Adobe Acrobat Professional XI?

    Acrobat Standard can combine PDF files.

  • Distorted text when trying to merge files into single pdf

    I am trying to merge several pdf documents into a single pdf. The pages are all distorted with missing words and random characters appearing here and there. I have combined these pages successfully using 'Assemble files into a PDF package' so I know the files are okay. Trying 'Merge files into a single pdf' is what creates the problem. I have tried this on Acrobat 8.0 and also 10. It is the same in both cases.
    Help please!

    Hello again. I took the long weekend off, so haven't replied for a while.
    While trying to set up a few documents out of the package I wanted to create, I discovered that there
    is only one file that is causing the problem.
    The biggest problem is that it is a confidential financial file, and I'm loathe to put it up on the web.
    I'm going to try to re-create the file without the confidential part, then send it to this forum. I can't
    figure out why it should cause problems when all the others don't and they have all been created by
    the same person with the same version of Office.
    So thanks for your help so far. I really appreciate the quick response from a couple of you.  I will get back to you.

  • How do I combine 41 PDF files into one PDF file?

    How do I combine 41 PDF files into a single file using ADOBE PDF Pack?

    Hi,
    To combine more than 12 files:
    Please do below to combine files:
    Log into https://createpdf.acrobat.com/signin.html with your Adobe ID and password
    Select "Combine Files" from right pane
    Click "Select Files" button
    Select your files to combine
    Enter a name for combined PDF file
    Click "Combine" button
    Click "Download" button in the progress bar to download the combined file to your computer.
    To combine more than 12 files:
    Combine 1-12th files and name it  “combined 1” for example
    Combine 13-24 files and name it “combined 2”
    Keep doing step #1 and #2 and combine those combined files to combine all your files.
    You can use Acrobat XI Pro to combine multiple files (more than 12 files) by following the steps below and you can download Acrobat XI Pro Trial version from www.adobe.com:
    In Acrobat XI Pro:
    1. Launch Acrobat
    2. Select File menu > Create > Combine Multiple Files into a Single PDF
    3. Click "Add Files" button at top left corner
    4. Select your files to combine
    5. Click "Combine Files" button at bottom of the dialog.
    You can upgrade your subscription to Acrobat Plus and please see more information at https://www.acrobat.com/acrobatplus/en/home.html
    Hisami

  • How to import a XFDF file into a PDF?

    I need to import a XFDF file into a PDF through javascript.
    Manually in Acrobat 8.0 we are doing through the following steps.
    Comments->import comments->browser window open(select the corresponding xfdf file and then click select button)->After that save that pdf file. Kindly help me how to automate this process through programmatically.
    Thanks,
    Prabudass

    See your posts in the other forums.

Maybe you are looking for