Placing multi-page PDF via AppleScript

Started by frailer, March 07, 2011, 10:32:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

frailer


Still tooling with this, and I may get the hang of it. Possibly might have to supply back a previously supplied (to us) PDF, with correction pages replaced back in.

My 1st method was to start a new 44pp Indy Doc, set up as Spreads...the usual. Then Window>Utilities>Scripts>Application>Applescript>Place MultiPage PDF. Should I have set up Frames on every page, or is that incorporated in the Script?
What I'm getting is an 88pp Doc, so am doing, or not doing, something right. The PDF doc is Q8 generated, but has page boxes present and correct. (see below).

This one am playing with ahead, so have some time.
Forgotten good guys: Dennis Ritchie, Burrell Smith, Bill Atkinson, Richard Stallman
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now just an honorary member.

gnubler

Never used it, didn't know it existed. I use the built in script in Indy for placing PDFs. Use it quite often, love it.
Hicks • Cross • Carlin • Kinison • Parker • Stone •  Colbert • Hedberg • Stanhope • Burr

"As much as I'd like your guns I prefer your buns." - The G

Quote from: pspdfppdfx on December 06, 2012, 05:03:51 PM
So,  :drunk3: i send the job to the rip with live transparecy (v 1.7 or whatever) and it craps out with a memory error.

Member #14 • Size 5 • PH8 Unit 7 • Paranoid Misanthropic Doomsayer • Printing & Drinking Since 1998 • doomed ©2011 david

frailer

Ahem...stand easy. I did it by using Replace Pages in Acrobat. I'd still like to know the basic modus operandi of that multi-page Place Script, though.   :undecided:
Forgotten good guys: Dennis Ritchie, Burrell Smith, Bill Atkinson, Richard Stallman
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now just an honorary member.

gnubler

I would, too. Seems like the other 8 active members all died simultaneously on the same day.  :cry:
Hicks • Cross • Carlin • Kinison • Parker • Stone •  Colbert • Hedberg • Stanhope • Burr

"As much as I'd like your guns I prefer your buns." - The G

Quote from: pspdfppdfx on December 06, 2012, 05:03:51 PM
So,  :drunk3: i send the job to the rip with live transparecy (v 1.7 or whatever) and it craps out with a memory error.

Member #14 • Size 5 • PH8 Unit 7 • Paranoid Misanthropic Doomsayer • Printing & Drinking Since 1998 • doomed ©2011 david

Joe

Start with one page, no frames. It creates the frames and pages.
Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.

frailer

#5
Quote from: Joe on March 08, 2011, 12:22:00 AMStart with one page, no frames. It creates the frames and pages.

Thought it might...afterwards.   :laugh:   It's something I'll tool with, so I know how to do it. Even though the PDFs were centred and had Page Boxes, everything got offset. By the amount of the Media Box offset from Trim, I think.   :undecided:    Maybe that Script is for Media Box = Trim... sorta PDFs.
To be investigated.
Forgotten good guys: Dennis Ritchie, Burrell Smith, Bill Atkinson, Richard Stallman
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now just an honorary member.

Joe

InDesign, by default, uses the last setting used for placing PDF's so if the last PDF you placed used the trim box then it will use the trim box again. If you want it to use the media box, manually place a PDF and select the option to "Show Import Options" and place the PDF selecting Media box. Delete the PDF and then use the script and it will place the top left corner of the PDF at the top left corner of the page. So if you have your page size in Indy set to the same as the PDF media box they should be positioned correctly.
Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.

frailer

Hmm... I think that's where my thinking is currently about Placing individual PDFs on a certain page size, and then centering. This isn't what's happening here, correct?
Here, if I have pages which are trim size = 240mmx330mm, but with Media box set to 10mm all around (260x350), then I'll need to 'set' the initial Page Place at a page size of 260x350, with Import Options set to Media Box.
Am now thinking this won't work too well with Indy set to Spreads. I can't see how spine butts will work using this Script. Single pages will work. Could be missing something though...   :azn:
Shalll play again tomorrow. Thanks for that lead.
Forgotten good guys: Dennis Ritchie, Burrell Smith, Bill Atkinson, Richard Stallman
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now just an honorary member.

Stiv

Yeah, what Joe said. I use this script often. It is very handy.

DigiCorn

Ditto Joe and Stiv. Have to do this often - we get a lot of pdfs in reader spreads. Easier than adjusting page position in Preps.
"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

Joe

Quote from: frailer on March 08, 2011, 04:10:38 AMHmm... I think that's where my thinking is currently about Placing individual PDFs on a certain page size, and then centering. This isn't what's happening here, correct?
Here, if I have pages which are trim size = 240mmx330mm, but with Media box set to 10mm all around (260x350), then I'll need to 'set' the initial Page Place at a page size of 260x350, with Import Options set to Media Box.
Am now thinking this won't work too well with Indy set to Spreads. I can't see how spine butts will work using this Script. Single pages will work. Could be missing something though...   :azn:
Shalll play again tomorrow. Thanks for that lead.

It should work but with one bad side effect. Open a new Indy doc made to trim size. Place a PDF. Make sure "Show Import Options" is checked. Select trim box and import. Now delete the PDF and run your script. They will all come in at trim size. Side effect: Frame will be trim size so you won't see the bleed. You can try placing a frame in the master page at bleed size and see if Indy will use it for all pages instead of creating it's own frame. Haven't tried it and I'm doubtful but it's worth a try.

If you make your document at bleed size (260x350) then your page boxes will be screwed up in the resulting PDF as the media size of the new PDF would be the same as the trim size. And the trim size will now be the actual previous PDF bleed size.
Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.

Joe

Correction: Disregard previous post. The PDF import script always uses Crop Media as it is programmed into the Applescript. I've tried changing it to trim but the applescript won't compile after changing it. Of course I'm sure I'm doing something wrong as I'm not a programmer.
Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.

Joe

OK, I got the edited Applescript to compile uisng "Trim Media" instead of "Crop Media". It is attached if anyone wants it. Just uncompress the zip and place into your InDesign Scripts/Applescript folder.
Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.

frailer

Quote from: Joe on March 08, 2011, 11:23:40 AMOK, I got the edited Applescript to compile uisng "Trim Media" instead of "Crop Media". It is attached if anyone wants it. Just uncompress the zip and place into your InDesign Scripts/Applescript folder.

As Charlie Drake said, in "My Boomerang Won't Come Back".... 'Now, slowly back...and...throw!'   :laugh:   I'll give that a shot. Had to  read it a couple of times as the espresso machine's still warming up here. Cheers, Joe.
Forgotten good guys: Dennis Ritchie, Burrell Smith, Bill Atkinson, Richard Stallman
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now just an honorary member.

Joe

I still can't get it to bring it in at crop size with the document set to trim size and have the bleed show with everything positioned correctly. I've opened the javascript version and it seems that it might have the capability if I can figure out what to change. Don't hold your breath though.
Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.