Skip to main content
egoro92094184
Participating Frequently
August 8, 2016
Question

Can You write a script for PLACING LINKS of multipage PDF?

  • August 8, 2016
  • 3 replies
  • 1251 views

Can You write a script for PLACING LINKS of multipage PDF?

For "imposing" linked PDF files in AI (like Quite, Signa, Preps...)

3 replies

Silly-V
Brainiac
August 10, 2016

I do not think so, because your code worked for me on Win7 CC2015.3

I do have CS5 at home on Windows, maybe I can test on it soon.

CarlosCanto
Community Expert
August 12, 2016

Hi guys, check this thread about increasing the pageToOpen

How to "Place as linked file" (not "import") a multipage PDF file on a single Artboard ?

egoro92094184
Participating Frequently
August 12, 2016

pdfOptions.pageToOpen++;

This function returns error

Silly-V
Brainiac
August 10, 2016

If this part is not inside a

/plugin {

}

then your string would probably be just "PDFImport/PageNumber"

egoro92094184
Participating Frequently
August 10, 2016

Maybe, the function "doc.placedItems.add()" must have an argument?

egoro92094184
Participating Frequently
August 10, 2016

OR

It may be function like  "PageToOpen"  (Specifies which page are used when PLACING a multipage document)?

Silly-V
Brainiac
August 8, 2016

Look up the great Multi-Page PDF script written by the legendary Carlos Canto. I use it sometimes so I do not have to write it, why re-invent the wheel right?

egoro92094184
Participating Frequently
August 9, 2016

This script OPEN pdf.

I need PLACE ONLY LINKED pdf (no problem with fonts etc.) for imposing and output to imagesetter

Silly-V
Brainiac
August 9, 2016

Oh, then, excellent, you inspired me to learn something new. Indeed, the seemingly inaccessible task of choosing a PDF's page link can be accomplished with setting preferences. It works by setting a preference first, then creating a new placed file with script - when it appears, the correct page will show!

#target illustrator

function test(){

  var doc = app.activeDocument;

  var myPDF = File.openDialog("Choose PDF file", "*.pdf");

  if(!myPDF){return;}

  app.preferences.setIntegerPreference("plugin/PDFImport/PageNumber", 2);

  var newPlaced = doc.placedItems.add();

  newPlaced.file = myPDF;

};

test();