• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

indesign placemultipagepdf script only adds pdfs to the end of the document

New Here ,
Aug 27, 2018 Aug 27, 2018

Copy link to clipboard

Copied

Hello,

I recently updated my InDesign to the newest version, and now, the place multi-page pdf script will only place the pdfs at the end of my indesign file as opposed to on the page i select it to import onto. How do i fix this?

Views

7.0K

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

correct answers 2 Correct answers

Community Expert , Oct 10, 2023 Oct 10, 2023

Good news, the bug we posted has been acted upon by Adobe and is reported to be fixed in the latest version of InDesign.

-Manan

Votes

Translate

Translate
Community Expert , Oct 10, 2023 Oct 10, 2023
Community Expert ,
Aug 30, 2018 Aug 30, 2018

Copy link to clipboard

Copied

That is strange… I am using the newest version and the PlaceMultiPagePDF.jsx script works properly for me.

However, if that script isn't working, you might try this one, which offers more options.

https://indesignsecrets.com/placing-all-the-pages-of-a-pdf-inside-indesign.php

Votes

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 Employee ,
Aug 31, 2018 Aug 31, 2018

Copy link to clipboard

Copied

Hi there,

Sorry to hear about this. As already mentioned by David, the PlaceMultiPagePDF.jsx script in the newest version works perfectly fine.

Please make sure you are trying these steps: https://indd.adobe.com/view/5213c1c4-29c9-4b9b-85f1-c414affab0fb

If it still does not work, please try resetting preferences for InDesign: Set preferences in Adobe InDesign

Regards,

Srishti

Votes

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 Employee ,
Sep 07, 2018 Sep 07, 2018

Copy link to clipboard

Copied

Hi there,

I would like to know if the steps suggested above worked for you, or the issue still persists.

Kindly update the discussion if you need further assistance with it.

Thanks,

Srishti

Votes

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 ,
Oct 18, 2018 Oct 18, 2018

Copy link to clipboard

Copied

Hi,

I found the error! I had been using the VBScript multipage pdf tool instead of the Javascript multipage pdf tool.

I have been having another issue though with Indesign having sticky key problems. If i highlight a word in my file and try to type to replace it it's not typing my first letters. Do you know how to fix this?

Votes

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 Employee ,
Oct 29, 2018 Oct 29, 2018

Copy link to clipboard

Copied

Hi there,

Sorry to hear about that, if that is happening with a particular file, please try to Export it to IDML.

If it is happening with multiple documents and even on new documents, then please try resetting preferences for InDesign: Set preferences in Adobe InDesign

Thanks,

Srishti

Votes

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
Community Expert ,
Oct 30, 2018 Oct 30, 2018

Copy link to clipboard

Copied

DACK70  wrote

…I have been having another issue though with Indesign having sticky key problems. If i highlight a word in my file and try to type to replace it it's not typing my first letters. Do you know how to fix this?

Hi DACK70 ,

that's a known bug with InDesign CC 2018.1 on Windows, only!

You can download and install a fix for this here:

First character is skipped while typing on Windows

Regards,
Uwe

Votes

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 Employee ,
Nov 13, 2018 Nov 13, 2018

Copy link to clipboard

Copied

Hi,

I would like to know if the steps suggested above worked for you, or the issue still persists.

Kindly update the discussion if you need further assistance with it.

Thanks,

Srishti

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

Excuse me for replying to an old thread.


A Japanese user reported an anomaly in this script and I have evaluated it.
The jsx and applescript work fine, but the vbs behaves strangely.
That is exactly what the thread owner, DACK70, stated ....
No matter which page is specified, the page add position is at the end of the document.
I specified a multi-page PDF with 3 pages as a test, and they were placed in the order 2, 3, 1.
And finally, the page at the end of the document where the first page of the PDF was placed was deleted.

 

The above was verified with InDesign 18.5.
Should we move the agenda to InDesign UserVoice?
Regards.

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

Hi @ajabon grinsmith,

How about opening a new post? We have many scripters on the forum(little less who use vbs), someone can check it out and maybe provide a fix. Maybe @Robert at ID-Tasker can help here.

-Manan

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

Thanks @Manan Joshi. I'll definitely take a look when I get to my laptop later today.

 

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

Hi @Manan Joshi ,

I am also a scripter, although I specialize in ExtendScript.
I just want to clarify that I don't mean by any means as long as it is possible to put a multi-page PDF in place, but rather as an affirmation that the vbs pre-installed as a sample script is defective and that I hope it will be fixed and reflected in the update.
If you just want results, the included jsx will solve the problem.
The fact that there are pre-installed samples that don't work properly is the main problem.
If the intent is to fix this bad vbs on the forum by ourselves instead of leaving it up to Adobe staff to fix it, then a new thread is appropriate. I agree with that.
Is my idea appropriate?

 

The above uses a translation tool.
If there are any strange expressions, please allow me.
Best regards.

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

I don't think VBS versions of the scripts will ever be fixed / updated - the main focus is on JS so - I think - old VBS versions are just included "by default".

 

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

Hi @Robert at ID-Tasker ,

 

So, if we remove the offending vbs and prevent it from being pre-installed, that solves the problem, right?
Only the new user can decide whether to choose vbs or JS. In reality, there was an unlucky user who chose vbs this time.
A user who knew nothing about scripting tried to run a script with a bit of ambition. That's great. But how does that InDesign newbie know that JS is the main thing?
It will be only when the user is a little more familiar with it that he can determine which scripts are newer or older, work correctly or not.
Is there a problem with continuing to pre-install scripts that don't work according to the formula?

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

??? I'm not an Adobe employee... 

 

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

I know it. We are both of the same status, community experts. Just volunteers. We don't have any rights to improve the software.
I am not speaking only to you and I see Adobe staff involved in the thread.
What else???

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

Move on... 

 

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

Hi @ajabon grinsmith,

The idea behind my suggestion has already been discussed by you and Robert. What I intended to say is that posting on the uservoice has very little chance for being picked up for a fix as there would be little to no upvotes and this is not a burning issue. The next best thing is we could solve the issue in the community and then if some user voices the issue again we can point to the solution and in addition we can either open a uservoice saying this is the issue and this is the solution please just use it, or we could even submit as a community addition for scripts.

-Manan

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

Hi @Manan Joshi ,
I understand your point of view. Thanks.
But this is my nature as a scripter and my biased fastidiousness.
I can't stand to have broken scripts pre-installed as public files.
This time it will not be the best, but I only acted as the next best thing. I had to do something to make myself feel better.
That vbs is signed and looks quite nasty...

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

I understand. 8 votes so far on the post. Let's see how far we can take it 🙂

Have a nice day.

-Manan

Votes

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
Community Expert ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

I have made it known to my friends on SNS, so it is easy to get to this number of votes.
I expect that I will probably not get any more votes than this.
I can't use that as an excuse to do nothing.
But it's far from the best way to get something done.

Thanks.

Votes

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
Community Expert ,
Aug 20, 2023 Aug 20, 2023

Copy link to clipboard

Copied

@Srishti Bali  Are you still there?

Votes

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
Community Expert ,
Aug 23, 2023 Aug 23, 2023

Copy link to clipboard

Copied

OK, here is the fixed code.

 

I've added an extra bonus - now it's possible to place every SECOND page - so you can place your PDF only on LEFT or only on RIGHT pages of the spread - if it's two page spread.

Otherwise, it will just place every second page.

 

 

 

Rem PlaceMultipagePDF.vbs
Rem An InDesign script
Rem
Rem Places all of the pages of a multi-page PDF.
Rem
Rem Modified by Robert Tkaczyk
Rem on 2023-08-23
Rem
Rem fixed bug with wrong starting page
Rem added option to place every 2nd page
Rem

Dim myStep

myStep = true

main
Function main()
	Set myInDesign = CreateObject("InDesign.Application.2023")
	Rem Set the user interaction level to allow the display of dialog boxes and alerts.
	myInDesign.ScriptPreferences.UserInteractionLevel = idUserInteractionLevels.idInteractWithAll
	Rem Use JavaScript to display a standard Open File dialog box.
	myJavaScript = "myPDFFile = File.openDialog(""Choose a PDF File"");if(myPDFFile != null){myFileName = myPDFFile.fsName}else{myFileName = """"};"
	myFileName = myInDesign.DoScript(myJavaScript, idScriptLanguage.idJavascript)
	If myFileName <> "" Then
	    myNewDocument = True
	    If myInDesign.Documents.Count <> 0 Then
	        Set myDocument = myChooseDocument(myInDesign, myNewDocument)
	    Else
	        Set myDocument = myInDesign.Documents.Add
	    End If
	    If myNewDocument = False Then
	        Set myPage = myChoosePage(myInDesign, myDocument)
	    Else
	        Set myPage = myDocument.Pages.Item(1)
	    End If
	    myPlacePDF myInDesign, myDocument, myPage, myFileName
	End If
End function
Function myChooseDocument(myInDesign, myNewDocument)
    ReDim myDocumentNames(0)
    myDocumentNames(0) = "New Document"
    Rem Get the names of the documents
    For myDocumentCounter = 1 To myInDesign.Documents.Count
        ReDim Preserve myDocumentNames(UBound(myDocumentNames) + 1)
        myDocumentNames(myDocumentCounter) = myInDesign.Documents.Item(myDocumentCounter).Name
    Next
    Set myChooseDocumentDialog = myInDesign.Dialogs.Add
    myChooseDocumentDialog.Name = "Choose a Document"
    myChooseDocumentDialog.CanCancel = False
    With myChooseDocumentDialog.DialogColumns.Add
        With .DialogRows.Add
            With .DialogColumns.Add
                With .StaticTexts.Add
                    .StaticLabel = "Place PDF in:"
                End With
            End With
            With .DialogColumns.Add
                Set myChooseDocumentDropdown = .Dropdowns.Add
                myChooseDocumentDropdown.StringList = myDocumentNames
                myChooseDocumentDropdown.SelectedIndex = 0
            End With
        End With
        With .DialogRows.Add
            With .DialogColumns.Add
                Set myStepChkBox = .CheckboxControls.Add
                myStepChkBox.CheckedState = True
                myStepChkBox.StaticLabel = "If CHECKED - will place page-by-page / If UNchecked - will place every SECOND page"
            End With
        End With
    End With
    myChooseDocumentDialog.Show
    If myChooseDocumentDropdown.SelectedIndex = 0 Then
        Set myDocument = myInDesign.Documents.Add
    Else
        Set myDocument = myInDesign.Documents.Item(myChooseDocumentDropdown.SelectedIndex)
        myNewDocument = False
    End If
    myStep = myStepChkBox.CheckedState 
    myChooseDocumentDialog.Destroy
    Set myChooseDocument = myDocument
End Function
Function myChoosePage(myInDesign, myDocument)
    ReDim myPageNames(0)
    Rem Get the names of the pages in the document
    For myCounter = 1 To myDocument.Pages.Count
        If Not (IsEmpty(myPageNames(0))) Then
            ReDim Preserve myPageNames(UBound(myPageNames) + 1)
        End If
        myPageNames(myCounter - 1) = myDocument.Pages.Item(myCounter).Name
    Next
    Set myChoosePageDialog = myInDesign.Dialogs.Add
    myChoosePageDialog.Name = "Choose a Page"
    myChoosePageDialog.CanCancel = False
    With myChoosePageDialog.DialogColumns.Add
        With .DialogRows.Add
            With .DialogColumns.Add
                With .StaticTexts.Add
                    .StaticLabel = "Place PDF on:"
                End With
            End With
            With .DialogColumns.Add
                Set myChoosePageDropdown = .Dropdowns.Add
                myChoosePageDropdown.StringList = myPageNames
                myChoosePageDropdown.SelectedIndex = 0
            End With
        End With
    End With
    myChoosePageDialog.Show
    Set myPage = myDocument.Pages.Item(myChoosePageDropdown.SelectedIndex + 1)
    myChoosePageDialog.Destroy
    Set myChoosePage = myPage
End Function
Function myPlacePDF(myInDesign, myDocument, myPage, myFileName)
    myInDesign.PDFPlacePreferences.PDFCrop = idPDFCrop.idCropMedia
    myCounter = 1
    myBreak = False
    Do While myBreak = False
        If myCounter > 1 Then
            if not myStep then
                Set myPage = myDocument.Pages.Add(idLocationOptions.idAfter ,myPage)
            end if
            Set myPage = myDocument.Pages.Add(idLocationOptions.idAfter ,myPage)
        End If
        myInDesign.PDFPlacePreferences.PageNumber = myCounter
'        Set myPDFPage = myDocument.Pages.Item(-1).Place(myFileName, Array(0, 0))
'      	Set myPDFPage = myPDFPage.Item(1)
        Set myPDFPage = myPage.Place(myFileName, Array(0, 0)).Item(1)
        If myCounter = 1 Then
            myFirstPage = myPDFPage.PDFAttributes.PageNumber
        Else
            If myPDFPage.PDFAttributes.PageNumber = myFirstPage Then
                Call myPage.Delete
                myBreak = True
            End If
        End If
        myCounter = myCounter + 1
    Loop
End Function

 

 

 

Votes

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
Community Expert ,
Aug 23, 2023 Aug 23, 2023

Copy link to clipboard

Copied

Good one @Robert at ID-Tasker, unfortunately I can't test it as I don't have Windows machine available, Maybe you can put the script on a Github repo and paste the link in the Uservoice post as well. So that if someone from Adobe looks at it they can choose to use your solution or if someone lands there looking for a solution they can access your script.

-Manan

Votes

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