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

Vectorize paths in InDesign

Explorer ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

Looking for a script to vectorize paths in InDesign.

Or someone to show me where is the InDesign's vectorize command (for paths, not types)…

TOPICS
Scripting

Views

33.0K

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 ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

Paths in InDesign are (non-arguably) already vectors ...

Can you give an example of what you want to do?

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 ,
Mar 19, 2010 Mar 19, 2010

Copy link to clipboard

Copied

Yes, you are right, paths are vectors. I meant: how to spread a simple vector path in vector shape? If there is no command at this time to to this in InDesign (as in Illustrator), I think a javascript may do the job.

how-to-vectorize-path-indesign.jpg

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
Guru ,
Mar 19, 2010 Mar 19, 2010

Copy link to clipboard

Copied

Can I ask how you are doing this in Illustrator as I have NOT been able to find this method in the object model?

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 ,
Mar 19, 2010 Mar 19, 2010

Copy link to clipboard

Copied

In Illustrator, you have the choice:

  1. Object > Path > Outline Stroke
  2. Object > Expand… > Stroke

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 ,
Mar 19, 2010 Mar 19, 2010

Copy link to clipboard

Copied

Aha -- Illustrator's "Expand Appearance" option.

Possible ... sure. Up to a certain level, it's even easy (and after that level it rapidly becomes incredibly difficult!).

Every object always has a Paths array -- InDesign always allows multiple paths in any single object (making a hole into something with the pathfinder adds another path in the same object). Every path, in turn, has a single property entirePath, which you can use to loop over and inspect every single path point.

The easiest way I can think of is creating a circle with a diameter of the path's line width on each of the path's points, calculate the extents of each circle in the direction of the next point, then add a rectangle to fill up the middle:

expand.png

That's only covering (so to speak) straight lines. To do the same with curves, you can decompose them into lots of straight lines (but not too short -- not any shorter than your line width) and hope no-one notices, or do some horribly complicated maths.

If you're interested in this stuff, check http://www.antigrain.com/ -- it's mainly targeted at raster (pixel) graphics, but a large part of that includes expanding mathematical lines to thick strokes.

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 ,
Mar 19, 2010 Mar 19, 2010

Copy link to clipboard

Copied

Thank you for your response.

And sorry, because English is not my native language, it's a bit difficult for me to find the right words.

My question with more accuracy: "How to expand the stroke of a vector path in InDesign, perhaps using a javascript?"

We now know where to find this command in Illustrator's object menu. InDesign do not have one*. And I think a javascript could be a way…

Thanks again for your interest and for your help

*QuarkXPress do have one

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 ,
Mar 19, 2010 Mar 19, 2010

Copy link to clipboard

Copied

QuarkXPress has it!? Oh well, let's wait for CS5 then ...

Generally, stuff like this is best done with illustrating software (yup, Illustrator). Is there a special reason you need to do this with InDesign, or were you just curious if it was possible at all?

I can have a go at it with Javascript, using the method I described above, but I'm drawing the line (pun intended ) at curves. Straight line segments ought not to be a problem -- would that be enough? For anything moderately more difficult, I'd recommend copying the path and pasting it straight into Illustrator, do your stuff, then save as AI and place into InDesign.

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 ,
Mar 19, 2010 Mar 19, 2010

Copy link to clipboard

Copied

[Jongware] a écrit:

QuarkXPress has it!? Oh well, let's wait for CS5 then ...

Generally, stuff like this is best done with illustrating software (yup, Illustrator). Is there a special reason you need to do this with InDesign, or were you just curious if it was possible at all?

I can have a go at it with Javascript, using the method I described above, but I'm drawing the line (pun intended ) at curves. Straight line segments ought not to be a problem -- would that be enough? For anything moderately more difficult, I'd recommend copying the path and pasting it straight into Illustrator, do your stuff, then save as AI and place into InDesign.

The reason is: some people I know are using InDesign… and Illustrator not at all… InDesign is also a good app for vector drawing: pen tool, pathfinder, gradients, layers… I am always searching tips about InDesign vector tools and drawing methods. Expand stroke in Illustrator is a pretty good tip. And I miss it in InDesign.

If not possible fast and easy, with javascript, well, let's have say: "get illustrator to draw complex vector graphics and if necessary copy and paste between Illustrator and InDesign".

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
Guru ,
Mar 19, 2010 Mar 19, 2010

Copy link to clipboard

Copied

The 2 options that you quote are both available thru the GUI of the app but I have found NO way (to date) of calling this method via JavaScript.

I could do this with AppleScript calling actions but you can't do this with JavaScript. When I looked up doing the math for this in JavaScript I gave up… Too much has been forgotten since school…

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 ,
Mar 19, 2010 Mar 19, 2010

Copy link to clipboard

Copied

LATEST

Muppet Mark a écrit:

The 2 options that you quote are both available thru the GUI of the app but I have found NO way (to date) of calling this method via JavaScript.

I could do this with AppleScript calling actions but you can't do this with JavaScript. When I looked up doing the math for this in JavaScript I gave up… Too much has been forgotten since school…

Oh, AppleScript may be a good way, that's right. I use sometimes Automator with my Mac. But zero skill to write an Apple script by myself.

2 or 3 PC users ask me about a method for expanding stroke in InDesign ; no Mac on the horizon! My first reflex was to answer: "copy and paste between InDesign and Illustrator". But again, no Illustrator on the Horizon.

Please, don't bother much more with this question… but if sometime you write an Apple script*, make me know, because I will use it

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