Tuesday, August 22, 2017

#1 2017-06-19 06:58:10 am

blend3
Member
From:: UK
Registered: 2006-03-28
Posts: 464

Indesign Place another indd page in a frame

Hi All,

I'm trying to place an InDesign file into another Indesign document for resizing purposes. The problem I'm having is specifying the place options. When you place a PDF you can specify PDF place preferences but there doesn't seem to be any INDD place preferences so I'm unable to specify what page of the document I want to place or the bounding box to use. I would prefer not to export to PDF and then place that just so I can use the PDF place preferences. Any help is appreciated.

Applescript:

set inddFile to choose file of type "IDdC"

tell application "Adobe InDesign CC 2017"
   -->I need to be able to set the below option for an INDD file
   
   (*tell PDF place preferences
       set page number to 2
       set PDF crop to crop trim
   end tell*)

   
   set mydoc to active document
   set pageFrame to item 1 of (every page item of mydoc whose label is "pageFrame")
   tell pageFrame
       place inddFile
       fit given proportionally
       fit given center content
   end tell
end tell

Thanks


I can resist everything in life except temptation.
(Oscar Wilde)

Offline

 

#2 2017-06-19 02:01:00 pm

Marc Anthony
Member
From:: Dallas, TX
Registered: 2006-04-27
Posts: 764

Re: Indesign Place another indd page in a frame

Hi. The dictionary alleges that you can place with properties, however, only some properties—such as rotation angle—seem to work in my version; I can adjust the placed document's page setting without returning an error, but the change is never realized. This appears to be a bug and likely may have persisted through your version, as programatically placing a document within another seems to be a far more niche use than is placing an image.

Offline

 

#3 2017-06-19 04:48:26 pm

kerflooey
Member
Registered: 2011-07-07
Posts: 125

Re: Indesign Place another indd page in a frame

Applescript:


-- This is known to work in CS6. Adjust as necessary.
--kerflooey

set i to 1
repeat pageCount times
   tell application "Adobe InDesign CS6"
       activate
       set pdfMapFP to (pdfMapFP as string)
       set page number of PDF place preferences to i
       get page number of PDF place preferences
       set myDoc to active document
       tell myDoc
           --return properties of PDF place preferences    
           set lastPageObjectStyle to a reference to (every object style whose name is "LastPage") -- 101105a
           --return lastPageObjectStyle
           try
               tell page i
                   place file pdfMapFP on every rectangle whose label is "pdfBox"
                   tell (every rectangle whose label is "pdfBox")
                       
                       fit given proportionally
                       fit given center content
                       set the applied object style to lastPageObjectStyle -- 101105a
                       
                       
                   end tell
               end tell
           on error
               -- no more map pages
               exit repeat
           end try
           set i to i + 1
       end tell
       
   end tell
end repeat

Offline

 

#4 2017-06-20 05:47:54 am

blend3
Member
From:: UK
Registered: 2006-03-28
Posts: 464

Re: Indesign Place another indd page in a frame

Hi guys,

thanks for your replies.

kerflooey, are you saying that your script will work with placing and indd into another indd and that you can specify the page number of the input indd that you want to be placed? To me your script just looks like it works if the input file is a pdf?

Marc Anthony, I have posted my question on Adobes scripting forum incase more options are available using javascript. If it's possible to do it using java then I'll try to post an applescript wrapper for it.

Thanks


I can resist everything in life except temptation.
(Oscar Wilde)

Offline

 

#5 2017-06-20 08:23:25 am

blend3
Member
From:: UK
Registered: 2006-03-28
Posts: 464

Re: Indesign Place another indd page in a frame

Hi,

it looks like you need to talk to the

Applescript:

imported page attributes

when you want to place and InDesign file:

Applescript:

set inddFile to choose file of type "IDdC"

tell application "Adobe InDesign CC 2017"
   set oldPrefs to properties of imported page attributes
   
   tell imported page attributes
       set imported page crop to crop content
       set page number to 2
   end tell
   
   set mydoc to active document
   set pageFrame to item 1 of (every page item of mydoc whose label is "pageFrame")
   tell pageFrame
       place inddFile
       fit given proportionally
       fit given center content
   end tell
   
   set properties of imported page attributes to oldPrefs
end tell


I can resist everything in life except temptation.
(Oscar Wilde)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)