Import multiple pdf into indesign file

Hi ALL,
Trying Script:
By using inbuilt script "PlaceMultipagePDF.jsx" import all the pdf in the selected folder (i.e., 111.pdf, 222.pdf, 333.pdf) in the "test.indt"
But my requirement:
1. open test.indt file and import 111.pdf alone after that close with any file naming.
2. open test.indt file and import 222.pdf after that close with any file naming.
3. open test.indt file and import 333.pdf after that close with any file naming.
Trying Script Code:
var myFolder = Folder.selectDialog("Select the folder containing the Indesign Files", "");
var myIFiles = myFolder.getFiles("*.indt")
for(j=0; j<myIFiles.length; j++)
    var myIndesignFile = myIFiles[j]
    app.open(myIndesignFile)
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
var myFolder = Folder.selectDialog("Select the folder containing the PDF Files", "");   //Please check this line
var myFiles = myFolder.getFiles("*.pdf")
for(i=0; i<myFiles.length-1; i++)
    var myPDFFile= myFiles[i]
    var myDocument = app.documents[0];
        if(myDocument == true){
            var myPage = myChoosePage(myDocument);
        else{
            myPage = myDocument.pages.item(0);
        myPlacePDF(myDocument, myPage, myPDFFile);
function myChoosePage(myDocument){
    var myPageNames = new Array;
    //Get the names of the pages in the document
    for(var myCounter = 0; myCounter < myDocument.pages.length;myCounter++){
        myPageNames.push(myDocument.pages.item(myCounter).name);
    return myPage;
function myPlacePDF(myDocument, myPage, myPDFFile){
    var myPDFPage;
    app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
    var myCounter = 1;
    var myBreak = false;
    while(myBreak == false){
        if(myCounter > 1){
            myPage = myDocument.pages.add(LocationOptions.after, myPage);
        app.pdfPlacePreferences.pageNumber = myCounter;
        myPDFPage = myPage.place(File(myPDFFile), [0,0])[0];         //check this line
        if(myCounter == 1){
            var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
        else{
            if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
                myPage.remove();
                myBreak = true;
        myCounter = myCounter + 1;
Can anyone give solution for my question.
Thanks
BEGINNER

Hi,
Try b/m code
var myFolder = Folder.selectDialog("Select the folder containing the Indesign Files", "");
var myIFiles = myFolder.getFiles("*.indt")
for(j=0; j<myIFiles.length; j++)
    var myIndesignFile = myIFiles[j];
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    var myFolder = Folder.selectDialog("Select the folder containing the PDF Files", "");   //Please check this line
    var myFiles = myFolder.getFiles("*.pdf")
    for(i=0; i <= myFiles.length-1; i++)
        app.open(myIndesignFile);
        var myPDFFile= myFiles[i];
        var myDocument = app.documents[0];       
        if(myDocument == true){
            var myPage = myChoosePage(myDocument);
        else{
            myPage = myDocument.pages.item(0);
        myPlacePDF(myDocument, myPage, myPDFFile);
        if(app.activeDocument.modified == true){           
            app.activeDocument.save(new File(String(myFiles[i]).replace('.pdf','') + ".indd"));
            app.activeDocument.save();
            app.activeDocument.close()
Thanks
Bala...

Similar Messages

  • How do I import a .PDF into inDesign?

    How do I import a .PDF into inDesign? Does anybody know how? I need to edit a book in inDesign that is a .PDF. So if anyone know how to do that please tell me.

    Bob, Peter, grmg, many thanks for your very helpful comments.  Delighted mac/pc not relevant.  Will scratch that from list of herrings to chase.
    Re PDFs - actually, I'm working in Acrobat (not just a finalized PDF), and Acrobat does of course allow editing of a sort; I'd concluded that since Adobe is willing to tolerate that degree of editing with its product, it should therefore tolerate moving its native format (*.pdf) into another of its own native formats (*.indd). I see that's a misconception.
    This morning I tried all flavors I could find of getting my Acrobatted content into ID3, including copy/paste, place, and import (from the ID side); none was satisfactory.  Output from Acrobat to Word and then placing Word was fine for English but destroyed the Greek - not just wrong font, but complete gobbledygook and loss of all diacriticals.  Names of fonts don't matter for my purposes; the legibility of the English, and the legibility and tonic accuracy of the Greek do matter. Author of this project is not tech-savvy and is using old Greek system as well; nothing he or i can do to fix that.
    Current plan is to request author to provide me his native files, which will be Mac files.  Am I understanding the Import dialog and your collecitve comments to suggest that with that file resident on my PC (and unopened), I can use the Place dialog, with "Show Options" selected, to get the Mac file into ID?
    Chapeaux to those of you with constructive comments - hugely appreciated.
    YC

  • Problem Importing a PDF into Indesign CC

    We don't usually have this problem with InDesign CC, but this came at a very bad time and I'm not sure if it is a bug in InDesign CC or not. We were given a PDF from an auditor of a client to bring into their financial report. The strange thing is that we were only able to bring in pages on left pages, any page that was brought in on the right hand page did not show. In fact, if we copied a page that showed up on the left page and moved it to the right page, it would not show it.
    Fortunately we still have CS6 and we were able to place the same PDF with no problem. So we had to save the document into a CS6 format and then insert the PDF.
    I don't know what would have caused this, but we haven't had problems with other PDFs. It seems that there was something about that PDF that InDesign CC didn't like (but that CS6 was able to handle).
    Any ideas?

    I think we'd need to see samples from the actual .indd and PDF files to give you any real answers.

  • Trying to combine multiple PDF into one file

    I have several of my daughters online assignments that I scanned in then converted to a PDF. But, now I need to make them into one document but cant find how to do that.  I am using Adobe Reader X.

    The PDF Pack online service can also combine PDF files.

  • InDesign CS3 Scripting XML Import Multiple Images into same Text Frame

    I am having trouble importing multiple images into the same Text Frame using XML import. I imported 5 images into the text frame. However, all 5 images are laying on top of one another. Does anyone know if there is a way to have all images laying out like how Microsoft Word handles inline images, i.e., laying out next image to the right of previsous image in the same line and if there is not enough space left in the line, then wrap to next line. Thanks in advance. I understand I could use JavaScript to do post import processing, e.g, calculate the image size and place each images accordingly. But I am trying to see whether there is a way to do this without scripts.

    You can apply an object style to all anchored images by script. A text frame containing main flow should be selected.
    var doc = app.activeDocument;
    var textFrame =  app.selection[0];
    var rectangles = textFrame.texts[0].rectangles;
    if (rectangles.length > 0) {
         for (var i=0; i < rectangles.length; i++) {
              rectangles[i].appliedObjectStyle = doc.objectStyles.item("Cover");
    However, there is a better approach:
    Step 1
    Create place holders for a single "Book" element and format it as needed -- apply an object style to the cover.
    Step 2
    Import the xml file -- the placeholders are replaced with data from the 1st xml element
    Step 3
    Drag & drop the element containing all "Books" elements into the main flow -- all elements are placed and formatted the same way as in step 1.
    Finally, add a new page, click the overset text icon and autoflow text to add pages so that to fit all the text.
    Hope this helps.
    Kasyan

  • IBookAuthor supports importing PDF and indesign files?

    Hi  everyone!
    There is any possibities to import a PDF or Indesign application in the iBookAuthor to re-edit and we add interactivity widget. Also we can get the Actual view as per the source.
    Thanks,
    Muzammil

    Not directly, no, sorry.
    iBA allows 'Insert' of WORD or Pages Chapters.
    Other content would require text copy from the source and paste into an existing iBA template with rework as required for matching original layouts.

  • HP Officejet 6500A How do I scan a document with multiple pages into one file?

    HP Officejet 6500A Plus e-All-in-One Printer - E710n
    Windows 7 (64 bit)
    How do I scan a document with multiple pages into one file?  My old printer (psc 2110) asked after each scan if I wanted to scan another page.  At the end I had one pdf file with multiple pages.
    This new one creates one file for each page and I cannot find a way to create one pdf file with multiple pages.
    This question was solved.
    View Solution.

    Hi mpw101,
    If you load the papers into the ADF - Automatic Document Feeder, and then select Document to PDF then they will all be scanning into one file. Let me know if this works for you?
    I am an HP employee.
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • Place pdf into InDesign CS4 js

    Hi, I have those lines of script that place the pdf into InDesign, but in the process new frame gets created in which the pdf is placed, and I need it to be placed into my existing frame. How could I do it:
        var myRectangle = myDoc.pages[0].rectangles[0];   
        myPage = myDoc.pages[0];
        myPDFPage = myPage.place(File(myFile), [0,0])[0];
    Thank you very much for your help.
    Yulia

    Yes, you are right, I am stuck for a different reason, it does places the second page.
    What I think is going on,  and maybe there is a better approach to it than the one I am going about it: when I have single page pdf for the 1st page and single page pdf for the 2nd page, my script first tries to upload 1st pdf as multi-page just in case there is only one pdf with both files. And for some reason it uploads single page pdf twice (into the second InDesign page as well when there is no second page in the 1st pdf [If I could avoid that all together would be great]). So my script verifies if the pdf uploaded into the 2nd page is 1st page of 1st pdf then it deletes it. And then it looks if there is a file for the second page, and uploads it. So my new challenge is that when it verifies what page of the pdf is uploaded into the 2nd page of InDesign after the 1st pdf upload, it just crashes, and it worked with the previous way of placing pdfs (the green line of the script).
    The second my issue is that, as it places the files, it dis-attaches the frames from the master page, and I need them to be still half attached. For the same reason new frames created by place command - is a problem for me. Maybe easier way, if it's possible at all, half-attach those new frames to the Master page afterwords. (This is the main goal for me).
    Here are both functions: to upload first pdf and second pdf:
    function myPlacePDF(myDoc, myFile){
        app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
        // page 1
        myPage = myDoc.pages[0];
        var myRectangle = myDoc.pages[0].rectangles[0];   
        app.pdfPlacePreferences.pageNumber = 1;
        myRectangle.place(myFile);
        //PDF.place (myFile);
        //myPDFPage = myPage.place(File(myFile), [0,0])[0];
        myRectangle.geometricBounds = [0, 0, myGB_Y2, myGB_X2];
        // page 2
        myPage = myDoc.pages[1];
        var myRectangle = myDoc.pages[1].rectangles[0];
        app.pdfPlacePreferences.pageNumber = 2;
        myPDFPage = myRectangle.place(myFile);
        //PDF.place (myFile);
        //myPDFPage = myPage.place(File(myFile), [0,0])[0];
        myRectangle.geometricBounds = [0, 0, myGB_Y2, myGB_X2];
        if (myPDFPage.pdfAttributes.pageNumber != 2){
            myPDFPage.parent.remove();
        try{
            var myFrame = myDoc.pages[0].rectangles[1];
            if (myFrame.isValid == true){
                myFrame.remove();
        catch (e){}
        try{
            var myFrame = myDoc.pages[1].rectangles[1];
            if (myFrame.isValid == true){
                myFrame.remove();
        catch (e){}
        app.pdfPlacePreferences.pageNumber = 1;
    function myPlacePDFback(myDoc, myFile){
        var myFrame= myDoc.pages[1].rectangles.[0];
        if (myFrame.isValid == false){
            myDoc.pages[1].rectangles.add();
            myFrame.strokeWeight = 0;
            myFrame.geometricBounds = [0, 0, myGB_Y2, myGB_X2];
        app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
        myPage = myDoc.pages[1];
        var myRectangle = myDoc.pages[1].rectangles[0];
        app.pdfPlacePreferences.pageNumber = 2;
        myRectangle.place(myFile);
        //myPDFPage = myPage.place(File(myFile), [0,0])[0];
        app.pdfPlacePreferences.pageNumber = 1;
    Kasyan, your script might be helpful, and I would like to look into it.
    Thank you very much for your help.
    Yulia

  • Is it possible to import a pdf into Adobe Story?

    I tried to import a pdf into Adobe Story and received the message: "Failed to import document".
    If this is not possible, what kind of files/types of pictures (e.g. jpeg, tiff,...) can be imported?

    You can import a .jpg, .jpeg, .png and .gif image in an AV/Multicolumn script.

  • Importing a pdf into photoshop CC and it corrupts the artwork slightly but in older photoshop version it does not corrupt?

    Hi
    When Importing a pdf into photoshop CC it corrupts the artwork slightly but in older photoshop version it does not corrupt? Please help as this corruption slightly marked the artwork, it was then printed and is going to cost my company thousands to replace. [email protected]

    "Slightly corrupted" sounds very much akin to "slightly pregnant".  Hard to imagine.
    I assume you're referring to some sort of image quality deterioration or some added artifacts.
    Could you post a screen shot?  Just so that someone familiar with PDFs opened in CC can form an idea of the nature of the "corruption" and where the cause might lie.
    If you post back, please give complete hardware and software details about your setup, including the exact version of CC so they can see if all updates have been applied.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    software settings,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them, etc.,
    someone may be able to help you (not necessarily this poster).
    A screen shot could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • How to import epub/pdf into macvericks' ibooks ?

    how to import epub/pdf into macvericks' ibooks ?

    Placing the PDF into an InDesign document shouldn't be a problem, but if it is, please post back. What I think you're asking for is how to edit a PDF with InDesign, which can't be done. You would need the source document, edit that and then export to another PDF (if PDF is the end goal). There are some programs that can edit PDFs or convert PDFs to other formats (Word, InDesign, etc.), and they will work to one extent or another. You should expect to have to rework parts of it should you go that way. Keep in mind that PDF is generally considered a final document that isn't intended to be edited.

  • Import Multiple Excel Into Sql Server

    I have 4 Excel spreadsheets all with different formatting and column names that I want to use powershell to import into ONE Sql Server Table that I will want to create with powershell.  I have found several instances of importing one workbook, but I
    haven't found one where you can import multiple workbooks into the same table.  Can someone show sample code for a reference on how to import multiple spreadsheets into the same table with powershell please?  I found this link which looks like a
    GREAT starting point, but unfortunately it is only showing how to do one table, and I am WAY new to powershell so can't tweak it on my own to set it to import multiple
    http://www.sqlserver-dba.com/2013/01/sql-server-export-excel-data-to-sql-server-with-powershell.html

    Hi IndigoMontoya,
    As a workaroud, how about merge mutiple excel files into one file, then import this excel file to sql table?
    To merge excel files, please refer to this script:
    $Files = 'd:\merge1.xlsx','d:\merge2.xlsx'
    #Launch Excel, and make it do as its told (supress confirmations)
    $Excel = New-Object -ComObject Excel.Application
    $Excel.Visible = $True
    $Excel.DisplayAlerts = $False
    #Open up a new workbook
    $Dest = $Excel.Workbooks.Add()
    #Loop through files, opening each, selecting the Used range, and only grabbing the first 6 columns of it. Then find next available row on the destination worksheet and paste the data
    ForEach($File in $Files[0..4]){
    $Source = $Excel.Workbooks.Open($File,$true,$true)
    If(($Dest.ActiveSheet.UsedRange.Count -eq 1) -and ([String]::IsNullOrEmpty($Dest.ActiveSheet.Range("A1").Value2))){ #If there is only 1 used cell and it is blank select A1
    [void]$source.ActiveSheet.Range("A1","F$(($Source.ActiveSheet.UsedRange.Rows|Select -Last 1).Row)").Copy()
    [void]$Dest.Activate()
    [void]$Dest.ActiveSheet.Range("A1").Select()
    }Else{ #If there is data go to the next empty row and select Column A
    [void]$source.ActiveSheet.Range("A1","F$(($Source.ActiveSheet.UsedRange.Rows|Select -Last 1).Row)").Copy()
    [void]$Dest.Activate()
    [void]$Dest.ActiveSheet.Range("A$(($Dest.ActiveSheet.UsedRange.Rows|Select -last 1).row+1)").Select()
    [void]$Dest.ActiveSheet.Paste()
    $Source.Close()
    $Dest.SaveAs("d:\merge3.xlsx",51)
    $Dest.close()
    $Excel.Quit()
    Reference from:
    How to use powershell to copy several excel worksheets and make a new one?
    I hope this helps.

  • What product do I need to just combine multiple pdfs into one pdf

    What product do I need to just combine multiple pdfs into one pdf. Thanks

    Are these files fillable forms?
    Could you need to combine more than 100 MB of files?

  • When combine multiple PDFs into one, some letters are missing and display wrong letter

    Hi all. I get a problem with combine multiple PDFs into a single PDF document. There are some PDF documents and they are working fine to open each document separately. But after I use Adobe Acrobat 8 Standard to combine them into one, some letters are missing and some display wrong letter (e.g. "forums" display "fo ums"). Our company has Adobe Acrobat 8 Standard, Adobe Acrobat 7 Professional and Standard. But all of them have some problem. Does anyone have idea for that? Please help me! Thanks very much!

    I have a similar situation, but my PDFs look fine in Acrobat Pro 8,Acrobat Reader 8, and Apple preview, but are missing letters in Acrobat Pro 7. I think it stems from the files being combined all having the same font, but each having a unique subset stored in the respective files, but with the same name (and ID?), and when they are combined, the character sets are getting hosed somehow.

  • How do I turn off automatic bookmark creation when combining multiple PDFs into one?

    When I combine multiple PDFs into one, I need Adobe to use the CUSTOM bookmarks I created in the original PDFs. I do NOT want the additional PDF name as a bookmark in this instance. Is there a way to turn this option OFF in Acrobat Professional? I have version 9.

    You can not automatically turn off this action nor can you remove the 'file_name.pdf' heading, but you could add a button or menuitem to remove the 'file_name.pdf' from the bookamarks. Yes, it is one more step to perform when combining PDFs, but is you want until you have all of the PDFs combined you only need do it once.
    Removing filename bookmarks created by Acrobat by Sean Stewart
    From the above article:
    "With the release of Acrobat 6 came the ability to create a composite (binder) document from multiple files, (i.e. File > Create PDF > From Multiple Files.) When this is done, Acrobat automatically inserts a new top level bookmark at the start of each new file. The bookmark title will correspond to the source filename of the source file. While this level of separation can be helpful, it is counterproductive when the user wants the bookmark tree in the merged document to be continuous.
    "Here's a sample JavaScript to remove the top level bookmarks from the bookmark tree. This script will look for a ".pdf" extension to decide whether to remove the bookmark."
    With some additional coding you can add menu item or toolbar button.

Maybe you are looking for

  • Tried to update the dinosaur iPhone 4, doesn't go past Connect to iTunes

    I've got an older iPhone 4, and up until today it had iOS 4.2.1. Yikes, I know! I backed up my contacts and pictures to my computer before I did anything. First thing I did was update iTunes since it was outdated as well. I plugged my iPhone in the u

  • Yahoo e-mail service vs. AOL e-mail service

    From what I've been reading in here... it looks as if we HAVE to have either a Yahoo e-mail portal/service or an AOL e-mail portal/service. When I first started with Verizon (DSL service back in 2003 and FiOS service since about 2007)... you could ge

  • Cant open itunes when ipod connected

    I cant open i tunes when my ipod is connected. as soon as i disconnect it itunes comes up. if i connect my ipod with itunes already running it stops working. im really starting to loose my patience help!

  • 7831R Analog Input Noise Problems

    Hi, I am running a data logging application which samples the analog inputs of my 7831R FPGA card with a sample rate of 10KHz. I am interested in how noisy the PXI system itself is, so I shorten AI0+ and AI0- together, hook both of them up to A0GND t

  • Safari 6 update buggy

    Since this thing came out: - the two-finger scroll function on my MBP doesn't work on some sites I use - some sites don't load completely without hitting "Command-R" - a site that I built with Wix is broken, but it's fine in 5.1.7