post indesign script
Hello forumers.
today I printed a document, and when I went to the House of printing, the printer told me that my pdf file was huge, so he recommended the next time I have to save my document as a PostScript, and then use Distiller to adobe that reduces file size
for the machines to print faster.is this correct? and if yes, how can I implement this post script?
Thank you.
At Adobe, we are more strongly and respectfully disagree with the advice given to you by your printer. PDF creation via direct export to PDF is highly preferable to the creation of PDF through distillation of PostScript. There are certain circumstances where in fact you pouvez you end up with a smaller PDF file through distillation of the PostScript, but it is also true that these PDF files are generally of lower quality, the lack of support for dynamic transparency, color management and the ability to easily search and/or file editing of PDF in Acrobat.
-Dov
Tags: InDesign
Similar Questions
-
Edit an Indesign script for me?
Hi all!
I'm fairly new to Indesign scripting and I have a script here that I would have changed.
This script puts a several page pdf in an Indesign file and add pages as needed. From now this script appears in a dialog box that asks you what document I want than the PDF to be placed in, and I would like to have this dialog box eleminated and have the script automatically place the pdf file in the document I have active. This script also asked which page to start to put the pdf file on and I would if it would simply just start automatically on the first page of the Indesign document active without even asking me. Someone would be willing to make these changes for the script below and zip code on this thread? Let me know if I did something clear.
var myDocument = app.activeDocument; //Get the current page. main(); function main(){ //Display a standard Open File dialog box. var myPDFFile = File.openDialog("Choose a PDF File"); if((myPDFFile != "")&&(myPDFFile != null)){ var myDocument, myPage; if(app.documents.length != 0){ var myTemp = myChooseDocument(); myDocument = myTemp[0]; myNewDocument = myTemp[1]; } else{ myDocument = app.documents.add(); myNewDocument = false; } if(myNewDocument == false){ myPage = myChoosePage(myDocument); } else{ myPage = myDocument.pages.item(0); } myPlacePDF(myDocument, myPage, myPDFFile); } } function myChooseDocument(){ var myDocumentNames = new Array; myDocumentNames.push("New Document"); //Get the names of the documents for(var myDocumentCounter = 0;myDocumentCounter < app.documents.length; myDocumentCounter++){ myDocumentNames.push(app.documents.item(myDocumentCounter).name); } var myChooseDocumentDialog = app.dialogs.add({name:"Choose a Document", canCancel:false}); with(myChooseDocumentDialog.dialogColumns.add()){ with(dialogRows.add()){ with(dialogColumns.add()){ staticTexts.add({staticLabel:"Place PDF in:"}); } with(dialogColumns.add()){ var myChooseDocumentDropdown = dropdowns.add({stringList:myDocumentNames, selectedIndex:0}); } } } var myResult = myChooseDocumentDialog.show(); if(myResult == true){ if(myChooseDocumentDropdown.selectedIndex == 0){ myDocument = app.documents.add(); myNewDocument = true; } else{ myDocument = app.documents.item(myChooseDocumentDropdown.selectedIndex-1); myNewDocument = false; } myChooseDocumentDialog.destroy(); } else{ myDocument = ""; myNewDocument = ""; myChooseDocumentDialog.destroy(); } return [myDocument, myNewDocument]; } function myChoosePage(myDocument){ var myPageNames = new Array; //Get the names of the pages in the document for(var myCounter = 0; myCounter < myDocument.pages.length;myCounter++){ myPageNames.push(myDocument.pages.item(myCounter).name); } var myChoosePageDialog = app.dialogs.add({name:"Choose a Page", canCancel:false}); with(myChoosePageDialog.dialogColumns.add()){ with(dialogRows.add()){ with(dialogColumns.add()){ staticTexts.add({staticLabel:"Place PDF on:"}); } with(dialogColumns.add()){ var myChoosePageDropdown = dropdowns.add({stringList:myPageNames, selectedIndex:0}); } } } myChoosePageDialog.show(); var myPage = myDocument.pages.item(myChoosePageDropdown.selectedIndex); myChoosePageDialog.destroy(); return myPage; } function myPlacePDF(myDocument, myPage, myPDFFile){ var myPDFPage; app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia; var myCounter = 1; var myBreak = false; while(myBreak == false){ if(myCounter > 1){ myPage = myDocument.pages.add(LocationOptions.after, myPage); } app.pdfPlacePreferences.pageNumber = myCounter; myPDFPage = myPage.place(File(myPDFFile), [0,0])[0]; if(myCounter == 1){ var myFirstPage = myPDFPage.pdfAttributes.pageNumber; } else{ if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){ myPage.remove(); myBreak = true; } } myCounter = myCounter + 1; } } var myPDFFrame = myPlacePDF.parent;
Thank you very much in advance for your help! I greatly appreciate it!
This is a rewrite for you. I also added some code to remove empty pages in the document.
/*
PlaceMulitpagePDF condensed by Skemicle Script
*/
If (parseFloat (app.version)<>
main();
on the other
app.doScript (principal, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Place Multipage PDF");
main() {} function
var myPDFFile is File.openDialog ("choose a PDF file");.
If ((myPDFFile! = "") & (myPDFFile!) (= null)) {}
var = app.activeDocument myDocument,
myPage = myDocument.pages.item (0);
var myPDFPage;
app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
var myCounter = 1;
var myBreak = false;
while(myBreak == false) {}
If (myCounter > 1) {}
my page = myDocument.pages.add (LocationOptions.after, myPage);
}
app.pdfPlacePreferences.pageNumber = myCounter;
myPDFPage = myPage.place (File (myPDFFile), [0,0]) [0];
if(MyCounter == 1) {}
New var features = myPDFPage.pdfAttributes.pageNumber;
} else {}
if(myPDFPage.pdfAttributes.PageNumber == myFirstPage) {}
myPage.remove ();
myBreak = true;
}
} myCounter = myCounter + 1;
}
} var pages = app.activeDocument.pages;
for (c = 0; c<>
If (pages.pageItems.length [c] == 0) {}
pages [c]. Remove();
}
}
}
-
InDesign Scripting - increase of height of 1 mm
Hello
I'm still new to indesign scripting and have struggled to find an answer.
I have an empty rectangle frames page, all different sizes.
Is there a way I could select all images, run a script 'enlarge' via a keyboard shortcut, and all the boxes will increase by 2mm X + Y in the center of the frame.
Example - Frame w: 63mm frame h: 87.3 mm
< run Script - width = width + 2mm, height is height + 2mm >
< result >
Frame w: 65mm h frame: 89.3 mm (from the Center)
< image >
Repeat the <>
I'd appreciate any help I can get on this issue
Thank you!
-
How to pass the content of an xml element in the text frame in inDesign Script
var XMLFile = File.openDialog ("select XML Files... ») ;
var doc = app.activeDocument;
If (!) App.Documents.Length)
{alert ("ERROR: Document not opened");}
return;
}
doc.importXML (XMLFile);
var firstFigureNode = doc.xmlElements [0] .xmlElements [1] .xmlElements [0];
var lableNode = firstFigureNode.xmlElements [0];
var lableNodeText = lableNode.contents;
myFrame var = doc.textFrames.add ({geometricBounds: [-13, 13, 3, -3]});
lableNodeText.move (LocationOptions.AFTER, myFrame.texts [0]);
========================================================
My requirement is: == > > move the content of an xml element in the text by inDesign Script block, but XML InDesign file Structure should not be change & data in the XML Structure should remain as it was before...
I tried to code above, but it does not work...
Please can someone help me in solving this problem...
It does not work correctly...
It moves firstFigureNode in myFrame...
firstFigureNode.placeXML (myFrame);
===>> For Apple Script try below Code ===>>
myFrame markup using firstFigureNode
-
How to change type of police using InDesign scripting (Javascript)?
Hello
I need to change the font type of a document, InDesign using InDesign script (javascript). I found a few online references in the InDesign scripting guide and running extract next, gives me errors.
Delete existing preferences
app.changeTextPreferences = NothingEnum.nothing;
app.findTextPreferences = NothingEnum.nothing;
app.findChangeTextOptions.caseSensitive = false;
app.changeTextPreferences.appliedFont = app.fonts.item ("DEVANAGARI MT");
App.Documents.Item (0) .changeText ();
Download the msg of InDesign server.
Error code: 1
Error description: changeText
The indesign file that is used to change the font is certainly not corrupt, cause the following script to export the file in .png works very well. Any help appreciated.
app.pngExportPreferences.exportResolution = 100.0;
App.Documents.Item (0) .exportFile (ExportFormat.PNG_FORMAT, PreviewDocument don't);
Hello
Try this 1-liner:
app.documents.item(0).stories.everyItem().appliedFont = app.fonts.item("DEVANAGARI MT");
Guess above specified police is available. Some disorders may begin with the name of the font, cause not always WYSIWYG.
To be sure how to refer to a specific font by its name - a console text and notice of runing ESTK select this option:
app.selection[0].appliedFont.name
Jarek
-
I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content
Hello
Can the code below is useful for you, but I do not know how to sort.
Change the tag based on your employment application.
-
InDesign script to run on the action?
Hi, can someone help - is it possible to set up an indesign script to be triggered to perform an action, for example when you export to PDF (instead of manually running the script)? To explain, I have a script that creates a text box to display the size of the indesign document, but if the size of the page change the text box does not update unless you manually run the script again. so I was wondering if it was possible to put the script to run when the document is exported to PDF, so in theory be PDFd with the size of the pages always display up-to-date!
I approach this issue perspective, as altogether new to the am scripts.
Thanks in advance for any suggestions.
Hi Trevor - thank you very much for this - (after a bit of trial and error with changes!) managed to make it work.
Work of great stuff.
Thanks again
-
Canvas support in Indesign scripts?
Hello
short version:
I was wondering if it is possible in any way to include automatically generated content (Using canvas api for example) raster design using JavaScript?
Long version:
I noticed that the In-design supports a very old version of JavaScript, and since I'm pretty new to InDesign scripting, I thought, it's best to inquire about its capabilities / limitations before planing on what to do with it! I wrote a Javascript (not in in-design script) code which generates unique random patterns of patterns, now, I'm interested if I can integrate it into scripts in design so she would put one of these raster images in each page of a design document (IE: left and right of each face relatively pages);
also since my first guess after reviewing documentation of object a little design model has been that it is very limited to what is possible via the user interface software (and not everything/something new/more), so I was wondering (in this case), how is it possible to connect a script for an external script and send and receive the data/vars between them; like putting the two scripts in the same folder, one calls the other is giving some info (size of the document, etc.), the second script runs (outside of ID), put the images on the disk and return to the main script when's done it! :/
I have a few other sketches of solution as well in my mind, but wanted to get your opinion before doing anything ridiculous! :-)))
I really appreciate your in - put on this point.
THX, mim,
And Yes! It seems that I can run an external file of any type!
After reading and looking for some time, finally:
In the page 52nd documentation, it says:
Execute()
fileObj.execute)
Open this file using the appropriate application, as if she had been double-clicked in a file Explorer. You can use this method to run scripts, launch applications and so onVoila! Exactly what I need (if what I think I need is actually what I need! indeed!)
I'll try to see if it works later (actually impatient!) and thx again!
mim
-
View 4 Post synchronization script exact sequence?
Hello
I'm trying to understand the exact sequence of a deployment of linked clone. Especially for the message synchronization script.
I am facing a strange behavior. Sometimes when you connect to a desktop put into service for the first time, he asks to reboot the system and sometimes not. I refer to the same pool, based on the same replica.
I wonder if I should add a synchronization with a reboot in her message. But the question is: reboot will disrupt ongoing deployment process.
This is one of the reasons why I would like to know the sequences of a deployment.
Can someone bring some light on this subject?
Thank you very much
Eric
The postscript runs after the clone has been deployed for a restart should not affect anything. Useful link for postscript.
http://www.thatsmyview.NET/2009/04/16/post-syncronization-scripts/
If you have found this device or any other useful post please consider the use of buttons useful/correct to award points
-
InDesign script to put the excel file
Hi all, I'm new to Indesign Scripting, and I hope someone can help me with the following code:
All I want to do is:
- Open the indesign file
- Open excel file
- ExcelFile place as a table (with active flow)
- export as PDF & save document
Thank you!
//Define file to open var myDocumentFile = new File("/d/Projecten/Indesign Server/document.indd"); //Define file to save //var mySaveFile = new File("/d/Projecten/Indesign Server/document_save.indd"); //Define file to export var exportPDF = new File("/d/Projecten/Indesign Server/document_save.pdf"); //Open xls-file to place as table var myExcelFile = new File ("/d/Projecten/Indesign Server/products.xls"); var result = ""; if(!myDocumentFile.exists) { result = "Unable to find DOCUMENT: " + myDocumentFile.path; $.writeln(result); exit(); } else if(!myExcelFile.exists) { result = "Unable to find EXCEL: " + myDocumentFile.path; $.writeln(result); exit(); } else { // Open file var myDocument = app.open(myDocumentFile); with(app.documents.item(0).pages.item(0)){ myTarget = textFrames.item("tabel"); } var myPage = myDocument.pages.item(0); //Set excel placement properties setXLimportPrefs(); // Place Excel file try { $.writeln("Place Excel file"); //HELP!! HOW TO PLACE EXCEL FILE? //myTextFrame.place(myFile); } catch (e) { $.writeln("Place Excel file " + e + " " + app.excelImportPreferences.errorCode); myDocument.close(); exit(); } if(!exportPDF.parent.exists && !exportPDF.parent.create()) { result = "Not exported. Unable to create the folder: " + exportPDF.parent.fullName; $.writeln(result); } else { app.documents.item(0).exportFile(ExportFormat.pdfType, exportPDF, app.pdfExportPresets.item("[Press Quality]")); } myDocument.exportFile(ExportFormat.PDF_TYPE,exportPDF); myDocument.close(); } function setXLimportPrefs(){ $.writeln("setXLimportPrefs()"); with(app.excelImportPreferences){ //alignmentStyle property can be: //AlignmentStyleOptions.centerAlign //AlignmentStyleOptions.leftAlign //AlignmentStyleOptions.rightAlign //AlignmentStyleOptions.spreadsheet alignmentStyle = AlignmentStyleOptions.spreadsheet; decimalPlaces = 4; preserveGraphics = true; //Enter the range you want to import as "start cell:end cell". rangeName = "A1:B16"; sheetIndex = 1; sheetName = "Appetizers"; showHiddenCells = false; //tableFormatting property can be: //TableFormattingOptions.excelFormattedTable //TableFormattingOptions.excelUnformattedTabbedText //TableFormattingOptions.excelUnformattedTable tableFormatting = TableFormattingOptions.excelFormattedTable; useTypographersQuotes = true; viewName = ""; } } result;
myTextFrame is not defined in your script.
It works for me:
myTextFrame = app.selection[0]; var myExcelFile = new File ("~/Documents/idml/some file.xlsx"); myTextFrame.place (myExcelFile);
-When I select a text block, of course.
To debug this, you can remove the try... catch statements because they're actually hiding the error now: InDesign can place the file, but the variable does not exist.
Thankfully, I fell it many times before.
-
Registering InDesign Script ID/name pair
Hello
I try to record some InDesign Script ID/name pair, but it doesn't seem to work.
These are my pairs:
TFSS, Suite TabFlow
TFob, object of the object TabFlow
TFut, event table update
TFuj, event do update of jobs
TFop, object from the TabFlow property
TFts, model for the table Propetry slug
Patiaudrey, updateJob-ID parameterIf I submit that I return to the site. There are 4 confused red symbols showing, but not a message of error or something like that. You can see in the attached priontscreen.
I want to see the pairs already registered, the site is empty.
What coud be wrong?
Thank you
Hans
My first guess would be the "-" in udateJob-ID.
So please revisit the naming conventions.
-Have a look at docs/references/scripting-dom-applescript-idr60.html for examples, AS linking is closer to the natural formatting.
-capitalization is generally left for the engine, with the exception of acronyms, for example 'suite of XML '.
-for identifiers JS, caps indicate spaces in the original name
-your starting names with generic types such as 'Suite', 'Object' will lead to confusion. Omit those who, with the exception of the suite where you make a suffix (put behind the name). for example 'suite of interactive elements '.
-This TabFlow object looks like a singleton or a preference. I would call it "option TabFlow" or "TabFlow preferably" instead, depends on the question of whether it is persistent.
-the name of the corresponding property is the plural form. See, for example
This AppleScript DOM Qouting: (I hate this wysiwyg forum editor!)
script preferences (property kScriptPrefsPropertyScriptElement)
ScriptID= 'DCPDH', name = 'script preferences '.<--- the="" property="">--->
Description = preferences. Script, Plugin = Scripting.InDesignPlugin
Data type = "script of preference"<---- the="" class="">---->Finally, what makes you choose the "do" in "do update... "for the unique event, then omit it for each other?
Have fun
Dirk
-
I just installed the HP officeJet 7500 A device, which is supposed to be a compatible printer Post Script. I use it with Corel Draw Graphics Suite X 3 Version. Corel does not recognize the printer as being a Post Script printer when I try to print a file.
What is the solution? Is there a post script driver I'm supposed to download or something? Help... I did research on printers and try to get this problem solved for at least a week now.
Oh... and when I download a driver... where shall I put it so the printer will find and recognize?
Alannuts wrote: is there a post script driver I'm supposed to download or something?
Hello
The following link is maybe the one you are looking for:
http://www.Adobe.com/support/downloads/product.jsp?product=pdrv&platform=win
Kind regards
-
InDesign script to accept changes in the stories?
Hi Chaps,
I work for an agency, which manages the customer to translate InDesign documents.
From time to time, we must accept all the 'track changes', as 'InsertedText' has been left by the customer.
Is there an automated process, or a script that can loop through all stories in a document and validate every change?
Thanks in advance
Close.
App.documents [0]. Stories.everyItem ().changes.everyItem (). Accept();
-
Problem with the CentOS post-installation Script
Good afternoon
I use VMware Studio 2.6 to create a couple of CentOS 6.2 VMs. A virtual machine is perfect, the other does not work it's "Script of post-installation of Application." I find it a little strange because if I just copy the script from Studio in the virtual machine, it works fine. But not when I'm deployign the OVF. What?
The two CentOS systems are virtually the same. the only difference is in the FULL domain name and host name lines where I grep for different properties of the FVO.
Someone has ideas how to debug this? Thanks in advance. I've included the script to post below.
#! / bin/bash#################### post.sh sets up a new system with the required configuration## post.sh v1.0 - [email protected]##################### Variables - from the user entered in the OVF properties#FQDN = "/ opt/vmware/share/vami/vami_ovf_process - p |" grep new_hostname | "cut-d" "'-f4"Hostname = "/ opt/vmware/share/vami/vami_ovf_process - p |" grep new_hostname | cut-d ""'-f4 | cut d. "" - f1 "DOMAINNAME = "${FQDN #*.} '"IP_ADDR = "/ opt/vmware/share/vami/vami_ovf_process - p |" grep vami.ip0 | "cut-d" "'-f4"# Set SELINUX to disabledSED 's/SELINUX=.*/SELINUX=disabled/' / etc/selinux/config-iecho 0 >/selinux/apply# Set the host namesed-i "s/HOSTNAME=.*/HOSTNAME=$HOSTNAME/" sysconfigsed-i "s/DOMAINNAME=.*/DOMAINNAME=$DOMAINNAME/" sysconfigecho '$IP_ADDR $FQDN $HOSTNAME' > > / etc/hostshostname $HOSTNAMEservice network restartHmm. This does not resemble a script of post-installation for me at all. This script is run at the end of the installation, but the VM has not been deployed yet, so the properties of the FVO are likely not useful (they are only put in place at the time of the deployment, for the * user * unit and you do this during the compilation, like the * author * the device.) The network parameters that exist in the envionment of the author are almost certainly not this as an end user * deployment * unit is lilkely to use; their domain, dns, and network addresses certainly not will be yours). Also, you don't mention how this script "failed", that might help narrow down the cause. Look at the debug log and the postinstall.log and see if you can find the real cause of the error. But in all cases, property OVF stuff you make here is not part of the postinstall script. Instead, it looks more like something that belongs in a script firstboot, although VAMI already does most of what you do with networking.
-
How to run a co-op start up Indesign script?
Hello
I have a script that works well when it runs manually in inDesign CC.
Now I need this script to run automatically when a file is opened in InDesign.
I put the script in the folder "scripts stratup. But get the error that there is no active document. The script runs before the opening of the document.
on:
sommthing is mentioned, but I can't run!Do I have to install the APID toolkit (only has a plugin for CS4 and low) or APID toolassistent? And when I do? What then?
I'm not a computer scientist.
Can anyone help?
TNX
Just click in the box as ok and reopen your application
Mi_D
Maybe you are looking for
-
I'm looking for the main menu button
-
Hi guys: Sorry to post this question, but I really can't get it to work! I can configure each SPI device and they work only, when I try to config 2 devices, I can't just two lines of CS to go up! Note: Here is my code, I choose slave select 4 so it i
-
Hi all I have an acA4600-10uc of Basler camera. It has the USB3 Vision interface. I'm having a problem on snap/grabbing frames OR MAX. I installed the drivers of IMAQdx, and the camera can be seen with IMAQdx driver in Device Manager. When I opened t
-
Hello world. I'm saving a .vi in an earlier version of LabVIEW 2013 for 2010, but it says there is an error and the message that I show in the attachment. I discovered that the block which is the cause of the pain is one called 'Display Message to u
-
What happens to my email as * address email is removed from privacy? *
I lost all of my emails that I was signing in the * address email is removed from the privacy *.