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

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

Participant ,
Nov 02, 2020 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).

TOPICS
Print , Scripting

Views

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

correct answers 2 Correct answers

Community Expert , Nov 02, 2020 Nov 02, 2020

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();

Votes

Translate

Translate
Community Expert , Nov 12, 2020 Nov 12, 2020

Hi Jan,

to make a transparent item, just draw out a rectangle the size of the page.

Fill it with color [Paper] and set the blend to 0% in the Effects panel. So that in effect you can clearly look through.

 

Regards,
Uwe Laubender

( ACP )

Votes

Translate

Translate
Community Expert ,
Nov 02, 2020 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();

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 ,
Nov 02, 2020 Nov 02, 2020

Copy link to clipboard

Copied

@brainp311,

 

WHOOO, great, thanks!

 

regards, Jan

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 ,
Nov 09, 2020 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

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 ,
Nov 03, 2020 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 )

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 ,
Nov 03, 2020 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

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 ,
Nov 10, 2020 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 )

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 ,
Nov 10, 2020 Nov 10, 2020

Copy link to clipboard

Copied

@Laubender 

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

Regards,

Jan

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

 

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 ,
Nov 10, 2020 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 )

 

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 ,
Nov 10, 2020 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();
            }
        }
    }

 

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 ,
Nov 10, 2020 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();
            }
        }
    }

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 ,
Nov 10, 2020 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

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 ,
Nov 10, 2020 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

 

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 ,
Nov 10, 2020 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 )

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 ,
Nov 10, 2020 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

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 ,
Nov 10, 2020 Nov 10, 2020

Copy link to clipboard

Copied

Hi Jan,

please read through this article that David Blatner wrote in 2008:

https://creativepro.com/converting-text-to-outlines-the-right-way/

 

This is still working with InDesign CS6 and InDesign 2021 as well.

 

FWIW: What you cannot achieve with scripting is outlining text in placed InDesign pages, placed PDFs, AIs or EPS files.

However, with the method described by David it can be done. Provided the transparent element is covering the whole page!

 

( Trying to do that with scripting is tinkering around and you may easily end up in a blind alley ).

 

Regards,
Uwe Laubender

( ACP )

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 ,
Nov 12, 2020 Nov 12, 2020

Copy link to clipboard

Copied

@Laubender 

Thanks for reply.... (I have missed your reply, and see it just later).

* text outlining, that is in placed stuff, does not work (I understand (?): for InDesign placed stuff is not real text, it is a "black-box").

Text Blatner:

z-BlatnerText.jpg

So if I understand well pointing to Blatner's part of text above (step 3 is not clear for me):

1) make transparent image, i.g. PNG-file : with size of InDesign-page, + with nothing in it.

2) place this PNG-file on master-page ... covering whole page (master-page is working on all pages).

3) ???

4) export PDF with transparency flattener selected

 

Regards,

Jan

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 ,
Nov 12, 2020 Nov 12, 2020

Copy link to clipboard

Copied

Hi Jan,

to make a transparent item, just draw out a rectangle the size of the page.

Fill it with color [Paper] and set the blend to 0% in the Effects panel. So that in effect you can clearly look through.

 

Regards,
Uwe Laubender

( ACP )

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 ,
Nov 12, 2020 Nov 12, 2020

Copy link to clipboard

Copied

@Laubender 

Thank you for the reply.
At first I saw problems, but it may be easier than I thought.
So if I'm correct these are the steps:
1) Draw a rectangle on the ENTIRE main page
2) fill that with PAPER (color)
3) set transparency to 0%
4) make custom flattener setting: choosing Edit > Transparency Flattener Presets
5) choose High Resolution and click NEW
6) turn on the Convert All Text to Outlines checkbox
7) choose suitable name for NEW-preset
8) (export PDF file), with Compatibility set to Acrobat 4
9) (export PDF file), in panel ADVANCED (PDF) choose your NEW-preset in Transparency Flattener
10) click OK, make PDF
11) open PDF, check text in PDF (if text can not be selected then PDF-text is flatten = OK

 

Above 1...11 works for ALL pages in document.

Have I forgotten something?

 

Regards,

Jan

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 ,
Nov 12, 2020 Nov 12, 2020

Copy link to clipboard

Copied

Have you been in direct communication with the printer? Usually the reason printers ask for type to be outlined is they don’t want to accidentally output a substitution font if the fonts you are using are not embedded in the print PDF, and are not available in their system.

 

The request for outlining is often part of generic boilerplate recommendations, and can be ignored if you doublecheck that the font license allows embedding and the font has been embedded in the PDF. In Acrobat check document Properties > Fonts. There’s no modern output device that is going to have a problem with properly embedded fonts.

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 ,
Nov 12, 2020 Nov 12, 2020

Copy link to clipboard

Copied

I think the printer is playing on save!
I asked him and the answer was: under normal circumstances it is no problem to embed fonts in PDF,
but he does not give a 100% guarantee.
His printer is (probably? I see on pictures): Kodak NexPress 2500 Digital Production Color Press

If I do not flatten the PDF, the font is embedded,see below.
z-fondsAcrobat.jpg

Regards,
Jan

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 ,
Nov 12, 2020 Nov 12, 2020

Copy link to clipboard

Copied

LATEST

If you look at the Export>Advanced tab the font embedding doesn’t change with the Acrobat Compatibility setting—you can export to PDF/X-1a (flattened) and embed as long as the font allows embedding:

 

Screen Shot 16.png

 

In the end outlining type potentially creates bigger problems than it solves.

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