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

Illustrator: Printing in a PDF with printPreset

Explorer ,
May 19, 2017 May 19, 2017

Copy link to clipboard

Copied

Hi there,

I wish to print in a PDF to use the automatic rotation so that the artboards are printed in one direction (portrait). The PDFs are needed for a RIP.

I figured out the possibility to export (save) as PDF but the solution for the automatic rotation is pretty complicated, so I hope this one is easier.

(Putting a rectangle on top of all at the size of the artboard, group the colliding elements, rotate the group if it's landscape with the center of the rectagle and let the artboard fit to the rectangle afterwands and that's for all artboards, see what I mean?)

Here's the point and the script I am working on. I get a failure-response about embedding fonts but I do not know what's missing as the .ps solution at the bottom works.
What is needed is a PDF-X3 with flattened Transparency, Coated FOGRA 39, Spot Colors to 4C

/* var originalInteractionLevel = userInteractionLevel;

userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS; */

var ordner = 'C://_temp//'; //The PDF sould be written to a absolute Path in the Network of a Windows environment 

var dateiNameExt = app.activeDocument.name.split( "." ); //Getting the name of the active Document

var dateiName = dateiNameExt[dateiNameExt.length-2]; //Extract .ai

var druckOptionen = new PrintOptions();

druckOptionen.printPreset = "Netzfeld-test"; //My Print Preset

druckOptionen.PPDName = "Adobe PDF";

druckOptionen.printerName = "Adobe PDF";

var druckJobOptionen = new PrintJobOptions();

druckJobOptionen.name = dateiName;

var dateiPfad = new File (ordner + dateiName + ".pdf"); //Use the document name and the path to save the pdf

druckJobOptionen.file = dateiPfad;

druckOptionen.jobOptions = druckJobOptionen;

//Sone useless stuff I suppose

var fontOpts = new PrintFontOptions();

druckOptionen.fontOptions = fontOpts;

//Set some font options

fontOpts.downloadFonts = PrintFontDownloadMode.DOWNLOADCOMPLETE;

fontOpts.fontSubstitution = FontSubstitutionPolicy.SUBSTITUTETINT;

// Print with options

app.activeDocument.print(druckOptionen);

/* userInteractionLevel = originalInteractionLevel; */

The output I get:

2017-05-19 (7).png

Parts of the printPreset:

printPDF.png

The one that works with .ps:

#target illustrator

var originalInteractionLevel = userInteractionLevel;

userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

//Druckvorgabe waehlen.

var druckVorgabe = "druck-test";

//Output ordner für die ps Datei definieren

var ordner = 'C:/_temp/';

var datRef = activeDocument;

//Dateiname extrahieren

var dateiNameExt = datRef.name.split( "." );

var dateiName = dateiNameExt[dateiNameExt.length-2];

//Druckoptionen einstellen

var druckOptionen = new PrintOptions();

//Druckjoboptionen erstellen

var druckJobOptionen = new PrintJobOptions();

druckJobOptionen.name = dateiName;

//Dateipfad konstruiren

var dateiPfad = new File (ordner + dateiName + ".ps");

druckJobOptionen.file = dateiPfad;

druckOptionen.jobOptions = druckJobOptionen;

//Druckvorgabe waehlen

druckOptionen.printPreset = druckVorgabe;

//alert(dateiPfad);

//Drucken

datRef.print(druckOptionen);

userInteractionLevel = originalInteractionLevel;

//Schliessen

/* datRef.close(SaveOptions.DONOTSAVECHANGES); */

Maybe someone of you might help.

TOPICS
Scripting

Views

395

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
People's Champ ,
May 19, 2017 May 19, 2017

Copy link to clipboard

Copied

Why not save as PDF directly ?

//pdfOptionen einstellen

var pdfOptionen = new PDFSaveOptions(); 

pdfOptionen.pDFXStandard = PDFXStandard.PDFX32003;

//Other PDF options…

datRef.saveAs ( pdfFile, pdfOptionen );

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
Explorer ,
May 19, 2017 May 19, 2017

Copy link to clipboard

Copied

LATEST

The PrintCoordinateOptions are missing in PDFSaveOptions(); especially PrintOrientation.AUTOROTATE. That's what I need for the RIP - all pages must be in portrait-mode. Now I get the files with multiple artboards in portrait and landscape-mode.
At the top of my description I mentioned this in other words. To get this AUTOROTATE feature before save as PDF wouldn't be easy - not impossible, for sure.

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