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

How to render image without blue border using script?

Participant ,
Aug 22, 2020 Aug 22, 2020

Hello,

 

I'm wondering are there any wat that i can render/place an image without the blue borders?

img0.pngexpand image

To change the color or i dont know if there is a way to make it disappear becuase when the designers work on the images and change the postions of the image via the anchore, become very hard!

I tried to use textftame and rectangulr and still having the borders.

This is my code:

		var rect = doc.pages[pageIdx].textFrames.add({
											geometricBounds: a
										});
										
										rect.place(xTest)
										rect.fit(FitOptions.PROPORTIONALLY)
										rect.fit(FitOptions.FRAME_TO_CONTENT)
										rect.select(SelectionOptions.ADD_TO)

I'm using JS,

THANKS ALL.

TOPICS
Activation billing and install , Bug , EPUB , Feature request , How to , Import and export , InCopy workflow , Performance , Print , Publish online , Scripting , SDK , Sync and storage , Type
648
Translate
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

correct answers 1 Correct answer

Community Expert , Aug 23, 2020 Aug 23, 2020

Hi,

You can find out all list of colors from following link. 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#UIColors.html

 

What you can do, you can create separate layer for placed items and assign color WHITE. In that case all placed images in the document will have WHITE, so white will not be visible. This is a workaround to your problem.

 

app.activeDocument.activeLayer.layerColor = UIColors.WHITE;

 Let us know if this helps you.

Translate
Community Expert ,
Aug 22, 2020 Aug 22, 2020

Hi,

As far as I know, it is not possible to hide this border around the image. And the color is depends on the layer color. If the layer color is pink then box color will also be pink.  See screnshot

Screenshot 2020-08-23 at 12.12.45 PM.pngexpand image

If you know in which layer are you placeing the image, then you can change color of layer via script. For an example, below line will change color of active layer to RED

app.activeDocument.activeLayer.layerColor = UIColors.RED;

 

Best regards
Translate
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 ,
Aug 23, 2020 Aug 23, 2020

I understand that. It's possiple to make it transparency?

Translate
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 ,
Aug 23, 2020 Aug 23, 2020

Hi,

You can find out all list of colors from following link. 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#UIColors.html

 

What you can do, you can create separate layer for placed items and assign color WHITE. In that case all placed images in the document will have WHITE, so white will not be visible. This is a workaround to your problem.

 

app.activeDocument.activeLayer.layerColor = UIColors.WHITE;

 Let us know if this helps you.

Best regards
Translate
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 ,
Aug 23, 2020 Aug 23, 2020

I am not sure how this is affecting you? This color is just a visual que for the person working on the document. It is a non-printing thing, so the final pdf would not have this color shown. If it is still bothering, then you can switch these borders off by selecting View>Extras>Hide Frame Edges menu

-Manan

Translate
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 ,
Aug 23, 2020 Aug 23, 2020

THANKS it wokrs! The designers botherd not me at all!  

Translate
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 ,
Aug 23, 2020 Aug 23, 2020

Is there a reason that the designers can't just hide their frame using the hide frame edges option in the view menu;

Screen Shot 2020-08-23 at 23.30.30.pngexpand image

or go to overprint preview or separation preview?

Perhaps I've misunderstood the question.

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
Translate
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 ,
Aug 23, 2020 Aug 23, 2020

Nope you didn't misundertstood it. I don't know why the designers are botherd or don't like it, maybe they want to work and see the reasult at the same time without exporting. THANKS it works!

Translate
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 ,
Aug 24, 2020 Aug 24, 2020
LATEST

You can toggle Hide Frame Edges on and off using the invoke method, most menu items have an invoke ID, so this should work to hide edges:

 

 

app.menuActions.itemByID(24331).invoke(); 

 

Translate
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 ,
Aug 24, 2020 Aug 24, 2020

becuase when the designers work on the images and change the postions of the image via the anchore, become very hard

 

Could you clarify what you mean by anchor? Your script is placing the image in a text frame, which converts the frame into a graphic frame. To anchor an image in the text frame’s text, your code would need to be something like this, which anchors the image at the beginning of first line:

 

rect.parentStory.insertionPoints[0].place

 

When the image is selected with the black selection tool there is a link icon to the upper left, which simply indicates that the image is linked, and not embedded.

 

The anchor icon to the right indicates the image and its frame are anchored into a textflow and would move with the text—it is a solid square when the image is not anchored. Neither icon is used for manually moving the image:

 

Screen Shot.pngexpand image

Translate
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