How to merge two PDF

Hi forum,

It's my first day to learn Javascript for acrobat

I used the tutorial script to merge pdf 2, but its syntax error stating, please help, I'm just a beginner.

Here is my code

Create a new PDF document:

var newDoc = app.newDoc ();

Add doc1.pdf:

newDoc.insertPages({)

nPage:-1.

cPath: "D:\doc1.pdf."

});

Add doc2.pdf:

newDoc.insertPages({)

nPage: newDoc.numPages,.

cPath: "D:\doc2.pdf."

});

Save the new document:

newDoc.saveAs({)

"D:\myNewDoc.pdf");

});

This is the error message I get,

"SyntaxError: missing: after the property id 29: on line 30.

error.jpg

Thanks in advance,

Thanks and greetings

Sirot V.

In addition, there is an additional right hook ")" in the last saveAs command, you need to delete.

Tags: Acrobat

Similar Questions

  • Newbie question: how to merge two pdf files?

    Hello, I have two PDF documents, and I'm putting one right in the middle of the other. Can someone guide me through this process? Thank you.

    Hello

    Please see the following link for information on how to merge PDF'.

    Acrobat help. Combine or merge files into a single PDF file

    Concerning

    Sukrit diallo

  • How to merge 2 PDF in preview and print PDF unique?

    How to merge 2 PDF in preview and print PDF unique?

    First, enable the sidebar via the view menu. Select the two PDF files, then choose Save as or export as a PDF document.

  • Code to merge two PDF files of the scanned book: one of the odd pages and the other pages even.

    I'm looking for an effective way merge two PDF files: one with all the odd pages scanned a book, one with all even-numbered pages. This question has been posted several times in many different forums.  I am unable to get the Javascript code that is given in the following forum to work.  https://forums.adobe.com/thread/286654.  Generally, the responses to this question are not useful for me because 1) they provide instructions that apply to an older version of Adobe (I use Adobe Acrobat Pro DC), or 2) they involve software purchase that I found to be ineffective. One post step by step to complete code that can do bonded labor and be registered as a custom through the command Wizard command (see the post from 11:27 January 13, 2016 to https://forums.adobe.com/thread/2063936, for an example of a good response to a different question) would be much appreciated.  Thank you, Carl

    You can use a large part of the script that was posted in the other thread and create a personalized out of it. In fact, it makes the script easier to understand, because all the "stuff" that is about adding menus and elevate the rights of scripts is no longer necessary.

    See here for instructions on how to create a custom in Acrobat DC command:

    Create orders customized in Adobe Acrobat DC Pro - KHKonsulting LLC

    Instead of the sample code of the blog post, you would use this (which is really just a copy & paste of the original script):

        // create an array to use as the rect parameter in the browse for field
    
        var arRect = new Array();
        arRect[0] = 0;
        arRect[1] = 0;
        arRect[2] = 0;
        arRect[3] = 0;
    
        // create a non-visible form field to use as a browse for field
        var f = this.addField("txtFilename", "text", this.numPages - 1, arRect);
    
        f.delay = true;
        f.fileSelect = true;
        f.delay = false;
    
        // user prompted to select file to collate the open document with
        app.alert("Select the PDF file to merge with")
    
        // open the browse for dialog
        f.browseForFileToSubmit();
        var evenDocPath = f.value;
    
        var q = this.numPages;
    
        var t = app.thermometer;
        t.duration = q;
        t.begin();
    
        // insert pages from selected document into open document
        for (var i = 0; i < q; i++) {
            var j = i * 2;
            this.insertPages(j, evenDocPath, i);
            t.value = i;
            t.text = 'Inserting page ' + (i + 1);
        }
        t.end();
    
        // remove unused field
        this.removeField("txtFilename");
    

    Given the instructions in my blog, you should be able to create this custom command and run it. To run it, the important part is that you load the 'weird' part of the document first, then launch the custom command and then select the item "same" document.

  • How to open two PDFs at the same time (for example on two related screens)? It was always possible in the previous version of the Adobe Reader software.

    How to open two PDFs at the same time (for example on two related screens)? It was always possible in the previous version of the Adobe Reader software. Now while one of them is open, I can't open the other, because it is hidden, and I have only shown in the taskbar as a thumbnail.

    Hi ewap51098943,

    You can disable this in the Edit menu-> preferences-> General

    Kind regards
    Nicos

  • How to merge several pdf files into an editable word document?

    How to merge several pdf files into an editable word document?

    You will need either a subscription to the pack PDF to merge the files, then export to Word or you would need Adobe Acrobat (should not be confused with the free Adobe Acrobat Reader which can not do).

  • How to merge several PDF files into a PDF file?

    How to merge several PDF files into a PDF file? for example, I've scanned 3 pages of the same document on my computer and they come up on top of the computer as a separate PDF files, but they are 3 pages that should be in the same PDF file?

    Hi m.zaffar,

    In order to combine the PDF you can subscribe to Adobe PDF to combine files of service https://cloud.acrobat.com/combinepdf

    KB doc. for help Document Cloud Help | Adobe PDF package using.

    Or

    You can use the Acrobat free trial download Adobe Acrobat application | Acrobat Pro DC.

    KB doc. using Acrobat help. Combine or merge files into a single PDF file.

    Kind regards

    Nicos

  • How to merge 2 PDF files on iPad

    How to merge 2 PDF files on iPad?

    Hi shanebrianmurphy,

    Adobe PDF package (paid subscription service) offers the possibility to combine files.

    Document help Cloud | With the help of Adobe PDF Pack

    Alternatively, you can use Adobe Acrobat Pro (desktop app) to combine files.

    However, the reader app on iPad/iPhone has no support in-app to combine/merge PDF files.

    Sorry for the inconvenience.

  • Does anyone know how to merge two workseets number for printing?

    How can I combine two spreadsheets in numbers for printing?

    Hi jj,

    I assume that you mean that you have a single document, which contains two worksheets, and that each sheet contains one table (only?).

    What do you mean by "merge two (booklets)?

    You mean you wan to place Tables of two leaves on a single sheet (this sheet would contain then both tables).

    Or do you mean you want to place all data on the two tables into a single table on one sheet?

    Or do you mean something different to both of these descriptions?

    Kind regards

    Barry

  • How to merge two values of resource bundle?

    Hi all

    JDev worm: 11.1.1.7

    I want to merge two values of resource bundle... How to do?

    like this #{expr? str1: str1 + str2}

    I tried like below and used some features of jstl... but no use did not work... got a parse exception, exception of compilation, etc...

    < af:outputText value = "#{row.accountName eq 'AccountName9'?" {resource ['LBL_WELC']: resources ["LBL_WELC"] + resource ['LBL_HOME']} "/ >"

    I would like to know how to do this?

    Kind regards

    Gopi

    The outputtext above is an example, I can use diff bundle keys like below,

    The principle is the same

    Dario

  • How to merge two slideshows macOSX

    I'm trying to merge two slideshow on my mac Pro or Imac. If possible, I would like to keep the original music in both. But it is not critical.

    Thank you

    Slide show projects cannot be merged.

    If you visit both attractions like a video, you can add the two points of view in iMovie and display a merged video.

    Otherwise, duplicate a slide show and add photos of the second presentation to the other.

    What version of iPhoto do you use?

  • How to merge two partitions in XP

    I have Windows XP Service Pack 3.

    The space becomes very low on my NTFS Partition that contains Windows XP. There are partition with more than 100 GB of free space I want to access — preferably by merging two partitions or not not to resize the NTFS partition.
    From Googling, it seems that I cannot use the native Windows XP and need a third party application software, but I see that's not without risk of data loss.
    Can someone advise please?  Ty.

    6. as a result, select your C: drive and the option "Extend Volume". Your computer will automatically select the empty spaces available on your hard drive and you can change them if you want to do.

    This desire. Not. Work. for system volumes or boot or a partition on which the pagefile system is located.

    In addition, the GUI (using the disk management) method only works with volumes 'simple' or 'split', which are forms of "Dynamics" volumes and volumes of"base" that most of the people have set up.  http://support.Microsoft.com/kb/314343

    Given that the OP asked about the increase in the size of the partition system (my Partition NTFS which contains Windows XP) which is probably also the boot partition as where the pagefile, the posting is irrelevant.

    For Andrew pieces:

    Here are a few options in alphabetical order:

    Acronis Disk Director
    EASEUS Partition Manager free
    O & O Partition Manager 3

    Paragon Partition Manager

  • How to merge two images in 14 elements?

    I've read a few articles on different ways to merge two photos in 14 elements using Photomerge, but I don't see a Photomerge announced on my new screen 14 items.  I said to go to "improve, Photomerge, Photomerge dial", but only 'Enhance' watch.  Then I read to go to "Editor, guided edits" or in the Organizer, go to "Edit, Photomerge."  I can't find anything that says Photomerge.  Help, please! -Thank you very much, Anna

    annam61239719 wrote:

    I've read a few articles on different ways to merge two photos in 14 elements using Photomerge, but I don't see a Photomerge announced on my new screen 14 items.  I said to go to "improve, Photomerge, Photomerge dial", but only 'Enhance' watch.  Then I read to go to "Editor, guided edits" or in the Organizer, go to "Edit, Photomerge."  I can't find anything that says Photomerge.  Help, please! -Thank you very much, Anna

    The Photomerge function was moved to 'Expert' display mode to the mode "guided edit.

    What has not changed is that you can always select your files in the organizer and use the Edit menu > Photomerge.

  • How to combine two PDF files without form fields-building

    I have two PDFs with form fields in each. Someone else created the documents. Some fields were untitled and so were given names as "not defined" in each document. However, some of these fields contain different information in each document. When I combine the document, these fields mix and incorrect information to in some areas.

    For example, there is a blank field in the doc A, entitled "indefinite". In the doc B, there is a field with "johnson" titled "indefinite." When I combine, "johnson" appears in the empty field.

    Is it possible to combine the documents without the combined fields?

    The code must be placed in a stage of "Execute JavaScript", you will find under more tools in the Edit Action window.

    Here, you must also add a step to the Sava.

  • How to merge two address books

    I would like two of my existing address books TB merge into one, eliminating the duplicates contacts.

    Drag and drop in an address book to another. You can of course select multiple Contacts using the usual shift and control, click methods.

    I use the addon double-contact-manager to sort the replicated contacts.

    https://addons.Mozilla.org/en-us/Thunderbird/addon/duplicate-contact-manager/

    How to install: http://xenos-email-notes.simplesite.com/416814616

Maybe you are looking for