Highlighted

convert text to contour in whole doc with one-button-click (jsx)

Participant ,
Nov 02, 2020

Copy link to clipboard

Copied

Hi,

 

I have multiple page document. On each page there are multiple images and multiple text boxes.

Printer man ask to convert all text to contours for printing.

How to do that with 'one button-click" jsx script?

or... is it possible without jsx script and select all text in document and convert by manual (in one go).

Adobe Community Professional
Correct answer by brianp311 | Adobe Community Professional

a) You should find a new printer. 

b) Here's a one-liner that should cover it: 

app.documents[0].stories.everyItem().texts.everyItem().createOutlines();
TOPICS
Print, Scripting

Views

112

Likes

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

convert text to contour in whole doc with one-button-click (jsx)

Participant ,
Nov 02, 2020

Copy link to clipboard

Copied

Hi,

 

I have multiple page document. On each page there are multiple images and multiple text boxes.

Printer man ask to convert all text to contours for printing.

How to do that with 'one button-click" jsx script?

or... is it possible without jsx script and select all text in document and convert by manual (in one go).

Adobe Community Professional
Correct answer by brianp311 | Adobe Community Professional

a) You should find a new printer. 

b) Here's a one-liner that should cover it: 

app.documents[0].stories.everyItem().texts.everyItem().createOutlines();
TOPICS
Print, Scripting

Views

113

Likes

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
Nov 02, 2020 0
Adobe Community Professional ,
Nov 02, 2020

Copy link to clipboard

Copied

a) You should find a new printer. 

b) Here's a one-liner that should cover it: 

app.documents[0].stories.everyItem().texts.everyItem().createOutlines();

Likes

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
Reply
Loading...
Nov 02, 2020 2
Participant ,
Nov 02, 2020

Copy link to clipboard

Copied

@brainp311,

 

WHOOO, great, thanks!

 

regards, Jan

Likes

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
Reply
Loading...
Nov 02, 2020 0
Participant ,
Nov 09, 2020

Copy link to clipboard

Copied

@brianp311 

Few weeks ago I tried your suggestion in a test file Indesign, which worked fine.

Now I did the job in the real document.

I got an error, see screen shot.

The line number points to the command:

app.documents[0].stories.everyItem().texts.everyItem().createOutlines();

Do you have any suggestion what's wrong?

z-ErrorIndesign.jpg

Likes

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
Reply
Loading...
Nov 09, 2020 0
Adobe Community Professional ,
Nov 03, 2020

Copy link to clipboard

Copied

Hi jan99x,

if you provide an exported PDF to the printers you could convert all texts in the PDF with Acrobat Pro's Preflight functionality. When in Acrobat Pro switch to: Print Production > Preflight > Acrobat Pro DC 2015 Profiles

 

Use the Single fixup "Convert fonts to outlines":

ConvertFontsToOutlines-AcrobatProDC.png

 

Regards,
Uwe Laubender

( ACP )

Likes

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
Reply
Loading...
Nov 03, 2020 2
Participant ,
Nov 03, 2020

Copy link to clipboard

Copied

@Laubender 

Thanks.

That's in Acrobat Pro.

It is an extra step. I prefer the one-button solution because it is not myself who is working with InDesign, but someone with les "technical expirience".

Thanks anyway.

Regards,

Jan

Likes

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
Reply
Loading...
Nov 03, 2020 0
Adobe Community Professional ,
Nov 10, 2020

Copy link to clipboard

Copied

Hi Jan,

as you can see the "One-Button-Method" does not always work. Why?

My assumption is that there is at least one text frame without contents.

Or with white space contents, only.

 

So: Convert text to outlines with Acrobat Pro.

 

Regards,
Uwe Laubender

( ACP )

Likes

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
Reply
Loading...
Nov 10, 2020 2
Participant ,
Nov 10, 2020

Copy link to clipboard

Copied

@Laubender 

You are right: indeed empty text boxes are the problem.

Regards,

Jan

Likes

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
Reply
Loading...
Nov 10, 2020 0
Participant ,
Nov 10, 2020

Copy link to clipboard

Copied

@Laubender 

I do not have Acrobat Pro latest version.

Friend has older Acrobat version 10.

I can't find your suggestion in version 10 under "Print Production > Preflight >" as you discribe.

 

Likes

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
Reply
Loading...
Nov 10, 2020 0
Adobe Community Professional ,
Nov 10, 2020

Copy link to clipboard

Copied

Hi Jan,

the alternative is to use some advanced method of transparency flattening while exporting to PDF that would yield in path objects for texts in the exported PDF. You need three ingredients for this workflow:

 

[1] A transparent object that covers every page and is stacked on top of every other object.

A rectangle with a [Paper] fill and transparency blend reduced to 0% will fit.

Best put it in an extra layer stacked on top of all other layers on all of your master pages.

[2] A transparency flattener preset that will enforce texts to be outlined as paths.

[3] A PDF export setting for PDF/X-1a that uses that flattener preset.

 

Is your InDesign a German one? What's the exact version number?
Maybe I could guide you through the necessary steps.

 

Regards,
Uwe Laubender

( ACP )

 

Likes

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
Reply
Loading...
Nov 10, 2020 0
Participant ,
Nov 10, 2020

Copy link to clipboard

Copied

@Laubender 

Hi Uwe,

Indesign CS6 version=8. dutch

Thanks for suggestion, and help with steps, but I think that's not my way, I am sorry.


I am still busy with script. As you said: white spaces is a problem

The earlier one-line command I have cut in peaces like( https://community.adobe.com/t5/indesign/my-for-loop-isn-t-working/m-p/10842623?page=1)


Make outlines is working OK, but there is a new problem: The shadow box around the textbox is now also removed (box 1 + 2), I do not want that (see part of screenshot) box around 1, 2 are disapeared when making outline of text 1 + 2.

How only outline text in that textframe?

 

z-contour.jpg

    var i;
    for (i = 0; i < app.activeDocument.pages.length; i++)
    {
        myPage = app.activeWindow.activePage = app.activeDocument.pages[i];
        for (j=myPage.textFrames.length- 1; j >= 0; j--)
        {
            myTekst = myPage.textFrames[j].contents;
  alert (myTekst.length+"======="+ myTekst+"++");
            if (myTekst.length > 1)
            {
                myPage.textFrames[j].createOutlines();
            }
        }
    }

 

Likes

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
Reply
Loading...
Nov 10, 2020 0
Adobe Community Professional ,
Nov 10, 2020

Copy link to clipboard

Copied

Try this modification to your script below. I changed the last main line. 

var i;
    for (i = 0; i < app.activeDocument.pages.length; i++)
    {
        myPage = app.activeWindow.activePage = app.activeDocument.pages[i];
        for (j=myPage.textFrames.length- 1; j >= 0; j--)
        {
            myTekst = myPage.textFrames[j].contents;
  alert (myTekst.length+"======="+ myTekst+"++");
            if (myTekst.length > 1)
            {
                myPage.textFrames[j].texts.everyItem().createOutlines();
            }
        }
    }

Likes

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
Reply
Loading...
Nov 10, 2020 0
Participant ,
Nov 10, 2020

Copy link to clipboard

Copied

@brianp311 

Thanks!... I was near by, but could not find it: my last try was:

myPage.textFrames[j].texts.createOutlines();

But that results in an error.

I think I have now solved my problem:

1) text >> outline = ok

2) only text (not the box) = ok

 

The if-statement determined to modify text to outline yes or no, maybe this should be adjusted in the future. The if-statement prevents the "white-space" error.

 

Regards,

Jan

Likes

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
Reply
Loading...
Nov 10, 2020 0
Participant ,
Nov 10, 2020

Copy link to clipboard

Copied

@Laubender 

Your alternative way:

In advance... I'll be glad to see the steps (1,2,3) you suggest, I suppose it are steps to solve this problem by hand (not script).

 

If there's a script solution, i will prefer that.

Regards,

Jan

 

Likes

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
Reply
Loading...
Nov 10, 2020 0
Adobe Community Professional ,
Nov 10, 2020

Copy link to clipboard

Copied

Hi Jan,

there are many pitfalls with outlining text in an InDesign document.

You discovered just one. Fills and strokes of text frames will vanish. Also applied effects as you discovered. Also text formattings like Underline will not carry over to text paths, auto-numbering or bullets in paragraphs. If you are using texts with strokes, the stroke width and position could change, texts in tables are a problem etc.pp.

 

If you follow the steps I outlined above all that will be no issue.

 

Regards,
Uwe Laubender

( ACP )

Likes

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
Reply
Loading...
Nov 10, 2020 0
Participant ,
Nov 10, 2020

Copy link to clipboard

Copied

@Laubender 

Thanks for reply Uwe.

For now, my document has no things you mentioned above.

But I'll keep your solution in mind (if I have more time in about 14 days).

Regards,

Jan

Likes

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
Reply
Loading...
Nov 10, 2020 0