Copy link to clipboard
Copied
Hi
I want to export frames (images, texts) using javascript.
After export i need to mark frames as exported (e.g. border colour, background colour)
Important is that user will see which frame was exported.
And important is that file will be print without marks.
Thanks
Copy link to clipboard
Copied
add a stroke values to the frame
//==== Batch PDF =====\\
/* InDesign JavaScript to Create PDFs of a batch of InDesign files using an export PDF preset */
var myPDFExportPreset = app.pdfExportPresets.item("[High Quality Print]"); // Change myPDFpreset to the name of the preset you want to use
var myFileLocation = Folder.selectDialog("Please select path to files"); // file path selection
myFolder = new Folder ([myFileLocation]);
myFolderContents = myFolder.getFiles("*.indd"); // array
myFileAmount = (myFolderContents.length - 1);
// ===== Open, Export as PDF, and Close files ===== \\
for (i = myFileAmount; i >= 0; i--)
{
app.open(File (myFolderContents));
app.activeDocument.exportFile(
ExportFormat.pdfType,
new File(myFolder.fsName + "/" + app.activeDocument.name.split(".indd")[0] + ".pdf"),
false,
myPDFExportPreset
);
app.activeDocument.close(SaveOptions.no);
}
Thanks
Prabu
Copy link to clipboard
Copied
I look at this code and i don't knowe where is frame mark.
I know how to export file but i don't know how to mark frame (e.g selected frames or all frames from file)
Copy link to clipboard
Copied
Hi Rob,
You want display frame to image after exported using JavaScript..?
Thanks
Copy link to clipboard
Copied
Yes.
Export is unimportant. I need to mark frame using javascript. User have to know that frame is marked (frame color, border color)
But important is that document will be printed without marks.
Copy link to clipboard
Copied
Hi,
Add a stroke values to the every frames.
Below code add the stroke values of the frame border color.
var myDoc = app.documents[0];
var color = myDoc.colors.add({name:"Stroke", model:ColorModel.PROCESS, space: ColorSpace.CMYK, colorValue:[0, 100, 100, 0]});
var frame = myDoc.pageItems.everyItem().getElements();
for(i=0; i<frame.length; i++)
{
frame.strokeWeight = "0.5pt";
frame.strokeColor = "Stroke";
}
Thanks
Copy link to clipboard
Copied
But it will be visible when i print document
I know how to change stroke.
My english is so bad that you can understand me.
I repat once more:
Important is that document will be printed without marks.
Copy link to clipboard
Copied
Can you post screenshot..?
Thanks
Copy link to clipboard
Copied
No because i don't know how to solve this problem.
I need mark frame (picture or text)
I don't know how to ilustrate situation when mark( for example border) is on the screen but isn't on the printer.
Thanks
Copy link to clipboard
Copied
Here is an idea: tag the frames with an XML tag. Tagged frames are not visible by default, but you can make it so with "View > Structure > Show Tagged Frames".
The colors on-screen are FYI only, and will not be visible in Preview mode and in an exported PDF.
(Beware that tagged text frames work per story, not per frame. Linked frames will always share their tag. If all of your text frames are separate, this won't be a problem.)
Copy link to clipboard
Copied
Thanks
But how to do it using javascript