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

clean up of pdf in illustrator

Participant ,
Feb 27, 2012 Feb 27, 2012

Does this script also cleans up unpainted objects and empty text frames?

Personally, I don't think so because the check of the script in extendscript and illustrator results negative.

var idoc = app.activeDocument;
var straypoints = [];

for (i=0; i<idoc.pathItems.length; i++) {
    var ipath = idoc.pathItems;
    if (ipath.pathPoints.length==1)
        straypoints.push(ipath);
}

for (j=0; j<idoc.textFrames.length; j++) {
    var itext = idoc.textFrames;
    if (itext.textRange.length==0)
        straypoints.push(itext);
}

for (k=0; k<straypoints.length; k++)
    straypoints.remove();

I also want to automatically remove all objects who have a white fill (white background) and no stroke.

Problem is a created pdf-file of an html-file of a table that must be cleaned up. There are a lot of stray points, empty text frames, unpainted objects, white "cells" that are also be painted in the pdf.

Who can help me further?

TOPICS
Scripting
1.2K
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

LEGEND , Feb 27, 2012 Feb 27, 2012

Works fine. Here's a picture of an AI file in outline mode with path items and empty text frames both before and after.

Screen shot 2012-02-27 at 10.16.13 AM.pngScreen shot 2012-02-27 at 10.17.02 AM.png

You might want to include the line #target Illustrator at the start to make sure the ESTK is sending the request to the proper application. As for the white fill only you can use the Select Same fill and stroke from the Select menu to do it.

Translate
Adobe
LEGEND ,
Feb 27, 2012 Feb 27, 2012
LATEST

Works fine. Here's a picture of an AI file in outline mode with path items and empty text frames both before and after.

Screen shot 2012-02-27 at 10.16.13 AM.pngScreen shot 2012-02-27 at 10.17.02 AM.png

You might want to include the line #target Illustrator at the start to make sure the ESTK is sending the request to the proper application. As for the white fill only you can use the Select Same fill and stroke from the Select menu to do it.

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