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

Mark frames

Participant ,
Apr 10, 2017 Apr 10, 2017

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

TOPICS
Scripting

Views

542

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
Engaged ,
Apr 10, 2017 Apr 10, 2017

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

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.

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
Participant ,
Apr 10, 2017 Apr 10, 2017

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)

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
Engaged ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

Hi Rob,

You want display frame to image after exported using JavaScript..?

Thanks

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.

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
Participant ,
Apr 10, 2017 Apr 10, 2017

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.

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
Engaged ,
Apr 10, 2017 Apr 10, 2017

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

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.

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
Participant ,
Apr 10, 2017 Apr 10, 2017

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.

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
Engaged ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

Can you post screenshot..?

Thanks

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.

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
Participant ,
Apr 10, 2017 Apr 10, 2017

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

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
Community Expert ,
Apr 10, 2017 Apr 10, 2017

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.)

taggedframe.png

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
Participant ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

LATEST

Thanks

But how to do it using javascript

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