Clean up of pdf in illustrator

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[i];
    if (ipath.pathPoints.length==1)
        straypoints.push(ipath);
for (j=0; j<idoc.textFrames.length; j++) {
    var itext = idoc.textFrames[j];
    if (itext.textRange.length==0)
        straypoints.push(itext);
for (k=0; k<straypoints.length; k++)
    straypoints[k].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?

Works fine. Here's a picture of an AI file in outline mode with path items and empty text frames both before and after.
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.

Similar Messages

  • Why can't I print a PDF in Illustrator CC for the Mac-Yosemite?

      I've tried PPDs and Save as mentioned here.  Nothing works.  I get blank PDFs.   This worked fine on the PC, but as soon as I switched to Mac I get no PDFs in illustrator.  I need this functionality.  Thanks in advance for your help.

    If both file >>  save as >> .pdf work f and printer to the pdf writer are not working try reinstalling/upating acrobat.
    If you have distiller try reprinter to a .ps file, and distilling that to a .pdf.
    What is the fils size on your .pdfs are they really low as if empty?

  • Use Artboards disabled when trying to save as PDF in Illustrator CC

    Use Artboards disabled when trying to save as PDF in Illustrator CC

    Then there's no reason to "Use Artboards". If you had multiple artboards in the file, then you could choose among them for the output but with a single artboard, only one will be output.

  • Text moving when opening a pdf in illustrator

    I opened 2 separate hi res pdfs (the front and back of a postcard) in illustrator 5.1. The type on both sides had been outlined and we just relinked the background image on both sides after we did some color adjustments to it. The only type on the front was the name of the company and the headline. Both were white type in separate magenta bars. The type was centered both horizontally and vertically in each bar.
    When I opened the front, the headline text moved from being centered horizontally on the pdf to EXACTLY flush right with the company name. There were no problems with the text moving on the back side.
    We have been receving files from this client for several years and always make color adjustments due to the uncoated paper stock we print on and have never encountered this before. The original files that the supplied pdfs were made from were also created in illustrator 5.
    Is this a known issue? If not, is it acrobat or illustrator problem.

    Was the original PDF created in Illustrator? To find out, open the PDF in Acrobat and go to File> Properties, it should show you what program created the PDF. Illustrator is not a universal PDF editor. A safer work flow would be to use Edit Object in Acrobat to make your color corrections. If you decide to use Illustrator, go to Select> All text objects, I suspect there are some un-outlined and un-embedded type elements.
    If the fonts are properly embedded, there is almost no reason to outline the type.

  • Creating a correctly separated PDF from Illustrator in Acrobat Reader 7,8,9

    I work in an organisation with users having various versions of Acrobat Pro and Acrobat Reader.
    We need to create a PDF from Illustrator, I guess by using 'save as', that can be correctly displayed in Acrobat 7 onwards.
    A flattened PDF views correctly in all versions, but doesn't allow some users to view separations as it converts to CMYK.
    My understanding is that PDF-X could ensure overprint is on, so the PDF will display correctly.  But, for versions 7 and 8 overprint preview will need to be activated in order for the PDF to be correctly displayed.
    Does anyone know of another solution, in that we could create a PDF, correctly separated and viewable in Acrobat Reader 7, 8, 9.
    Thanks

    Why are your Reader users using different versions? It's a free download. Get them all on the current version.
    JET

  • Gradients dropping out when opening PDFs in Illustrator

    Hi everyone. I work for a large format printing company. We receive thousands of files every year from many different designers. We started to notice that gradients would drop out of some PDFs when opening them in Illustrator but they would preview fine when opened in Acrobat. I searched high and low for an explanation for this glitch. The only response I received is "Stop opening exported PDFs in Illustrator." This is an unsatisfactory answer for someone that needs to preflight directly in the Illustrator program. I've done a ton of research and have been racking my brain for the last 2 years and have finally found sufficient workarounds for this issue. The downfall with these workarounds: all spot colors located in the gradients will convert to CMYK mixes. I'm still researching to see if there is a way to keep spot colors intact in these areas.
    A little back story: InDesign is converting the gradients into something called NChannel. It enables more accurate handling of color blending by including additional dot gain and color mixing info. Both InDesign and Acrobat have the ability to display these elements whereas Illustrator, from what I’m finding, does not. Which is why we’re seeing gradient elements drop out when opened in Illustrator.
    Workaround for CMYK Gradients
    Open PDF exported from INDD in Acrobat
    Go to Tools > Print Production > Convert Colors
    Object Type: Smooth Shade (this tells Acrobat to hone in on Gradients only)
    Color Type: DeviceCMYK
    Check Embed next to Conversion Profile (should be SWOP)
    Expand Document Colors on the right and Select DeviceCMYK in Color Spaces then click ok
    Save the PDF
    Workaround for 1 Spot Color in Gradients (Converts Spot Color located in Gradient to CMYK – all other Spots stay intact)
    Open PDF exported from INDD in Acrobat
    Go to Tools > Print Production > Convert Colors
    Object Type: Smooth Shade (this tells Acrobat to hone in on Gradients only)
    Color Type: Spot Color
    Check Embed next to Conversion Profile (should be SWOP)
    Expand Document Colors on the right and Select the Spot that is located in the Gradient in Color Spaces then click ok
    Save the PDF
    Workaround for 2 Spot Colors in Gradients (Converts Spot Colors located in Gradient toCMYK – all other Spots stay intact)
    Open PDF exported from INDD in Acrobat
    Go to Tools > Print Production > Convert Colors
    Object Type: Smooth Shade (this tells Acrobat to hone in on Gradients only)
    Color Type: Spot Color
    Check Embed next to Conversion Profile (should be SWOP)
    Expand Document Colors on the right and Select the DeviceN spot color that is located in the Gradient in Color Spaces then click ok
    Save the PDF
    Please test it and let me know if you run into any issues with these workarounds.  I'm always looking for new problems to solve!
    - Jenny

    you said--"...needs to preflight directly in the Illustrator program. I've done a ton of research and have been racking my brain for the last 2 years and have finally found sufficient workarounds for this issue"
    Your workarounds seem time consuming and (possibly) unnecessary for the following reasons:
    1. large format printers use 4-8 colors to achieve color (so spot colors shouldn't be an issue)
    2. Acrobat Pro has it's own 'preflight' function that works fairly well
    additionally (don't know if you know this) there is an add-on to acrobat called 'Pitstop' (google it) that allows just about any change/correction/alteration to be made to a PDF
    ...and...opening a PDF in illustrator (that wasn't created in illustrator--do you know how to determine this?) can lead to many problems i.e. gradients dropping out, text reflow, etc.
    as far as testing your workarounds, seriously, who has the time when there are tools available that make using them unnecessary (this assumes that you have created these 'workarounds' to match your worflow--but a nearly pure PDF workflow should work in this day and age, depending on your RIP and software).

  • Importing PDF to illustrator. Text does not display.

    I am using Illustrator CS6 on windows 7. I created a document on Illustrator CS4 on mac osx and exported the file to a pdf. Now when I want to edit the pdf in illustrator the images and drawings display correctly, but only certain text is shown. Not any text in particular, but just random lines of text within paragraphs. The rest of the text does not show up at all. What could be the issue?

    Why not open the AI file?
    In any case, as Monika points out, the PDF really needs to eb created with the AI editing capability turned on. That way, AI is opening the AI data contained in the PDF, not the PDF data.
    Take care, Mike
    ***Oops, cross-post. I see you did preserve the AI data now.***

  • Opening PDF in Illustrator. Some font characters outlined, some not.

    Here's what I'm experiencing...
    Let's say I create a poster with a couple of blocks of text in Illustrator, using a single font. Then, I generate a PDF of the poster.
    Now, on the same computer, I open the PDF in Illustrator, and Illustrator pops-up an alert saying some text has been outlined to preserve appearance. And, indeed, here and there throughout the text, some words, combination of words, or whole lines of text have been outlined, but most of the text is still live.
    Why does this happen? There's no difference, font-wise, between the text that is untouched, and the text that got outlined. Same face, same weight. In fact, the same word, set the same way, will be untouched in one line, and be outlined elsewhere in the text. It's really baffling.

    No, there are no transparency effects or objects in the final file.
    As a matter of fact, the file is purposely made without transparency effects because the printer my client sends the pdf to still uses an ancient RIP that cannot accurately process anything newer than PDF 1.3.
    I'm not at my studio right now, so I can't get a screenshot for you.

  • Unable to save a 'smallest size file' pdf from illustrator 5.5

    We recently insalled Adobe Standard 5.5
    I often save PDF files from Illustrator using the built in PDF options available from the PDF drop down menu bar when saving files. Usually I will save a visual as a 'smallest file size' or make use of the 'high quality print' option for other files etc.
    Why cant I do this on CS5.5?
    In addition, the colour is not acurate at all!
    Please help

    Hi Scott - I found the following thread on the net. So I had a look on my time machine back-ups and copied the files from there, which I then pasted into my Settings folder as you suggested.
    Ta da!! All working again!
    Any idea how I could restore these settings from a backup?
    Thanks!
    The PDF presets reside in Root/Library/Application Support/Adobe/Adobe PDF/Settings/
    After I had installed 10.6.5, 6 preset files were removed from the Settings folder. The folder tree itself remained, it was just that some of the contents of "Settings" were deleted. I have fixed the problem by copying the deleted settings files from a backup.
    These are the files which were deleted:
    Smallest File Size.joboptions
    Press Quality.joboptions
    PDFX4 2008.joboptions
    PDFX3 2002.joboptions
    PDFX1 2001.joboptions
    High Quality Print.joboptions
    These files were not deleted:
    Standard.joboptions
    PDFA1b 2005 RGB.joboptions
    PDFA1b 2005 CMYK.joboptions
    Oversized Pages.joboptions
    Somebody at Adobe community support for Indesign directed me to restore these files from a backup, which solved the problem.
    Re: Unable to save a 'smallest size file' pdf from illustrator 5.5 

  • Error opening Adobe PDF in Illustrator

    I'm getting the following message when I try to open a specific Adobe PDF file in Illustrator: "Could not open the file"
    The details:
    - I created the file yesterday in Illustrator and saved is as an Adobe PDF
    - I opened the PDF in Illustrator this morning and have been working on it all day.  The file started getting slow (i.e., objects moving slowly), so I saved the file and closed out.  When I tried opening the file again in Illustrator, I got the message above.
    - Other PDF files will open in Illustrator.  The file itself will open in Adobe PDF and in Photoshop - just not in Illustrator.  I also tried opening the file in Illustrator on a different computer, and that didn't work, either.
    Is there any way to save this file (i.e., preserve all of the layers) and open it in Illustrator again?
    Any help would be much appreciated!

    Hi Monika,
    Thanks for getting back to me.  What do you mean by "save to networked or
    removable media"?  I'm working off a networked computer, but I'm saving to
    the desktop, so I don't think that should be an issue, right?
    Any ideas about what could have damaged the file?  I can't think of anything
    strange or different that I did.  Is there any way at all to salvage the
    file and be able to open it in Illustrator?
    Thanks so much for your help,
    Amanda

  • Printing to PDF from Illustrator CS4

    Hi,
    I have been having serious issues with Illustrator  CS4, working on my files and then at the end going to print to PDF and the message reads; "can't print the illustration" ... It is happening even if I have a blank document containing nothing. Could someone please shed some light on this, as I am working on such large files and the 'save to pdf' is not really a great option as it barely reduces the file size.
    Thanks!

    pcdgolf
    If you don't tell us about your system and your fonts and all that stuff and what you are doing then there is no way of seeing what is going wrong being as vague as is humanly possible is not helpful.
    Tell us about the OS your application fonts, telling us what is important and not important is not a good idea if you do not understand what is going on.
    For instance Mylenium's posting suggestion it is not necessary to save to print to pdf because Illustrator is native to pdf. It means you can open an Illustrator file in Acrobat no need to even save it as a pdf unless someone requests it. Or if you turn off the pdf compatibility option.
    So if you tell us what information you like and don't like or what information you want us to know and not know we can't help.
    By the way even if the you do not use fonts in a document there still may be a problem with the fonts and font cache, even if that does not make sense to you.

  • Gradient disappears from pdf in Illustrator

    I created a logo graphic in Illustrator, placed that into an InDesign file for text formatting and exported as a pdf. When the customer sent it to get printed (silk screen) onto shirts, the gradient in the logo vanished.  The printer was opening and performing pre-flight in Illustrator.  How and why would this be happening? How can it be avoided?
    Thank you,
    KMHaus

    PDF was never meant for editing.
    Have you tried the same - opening the PDF in Illustrator?

  • Opening Photoshop PDF in Illustrator problem

    Hi,
    I've got a problem with opening pdf file from photoshop in illustrator. I've got a psd file with a rasterized background (photo) and about 100 shape layers over it. I'm trying to save it as a photoshop pdf to keep the vector elements unflattened for use in illustrator. The saved pdf is about three times larger than the original psd file. Then I'm trying to open the pdf in illustrator but I get a message that illustrator can't preview it. It only shows the outline of the shapes. Do you know how can I save this pdf to be able to work on it in illustrator? or maybe some trick to copy all of the shapes at once from photoshop to illustrator with correct placement? Thank you in advance:)
    Mark

    Thanks a lot for your help guys. The option with opening psd file in illustrator works best:)
    I've tried opening pdf before but it seems to work fine when there are just a few simple shapes.
    @Mylenium: I didn't have different blending modes, only normal. One rasterized layer as background and about 100 shapes layers above. Most of them being text layers converted to shapes. Nothing too fancy:)
    I've also thought that different opacities might be the problem but I've saved one pdf with different opacities and the other one with every layer at 100% opacity and both pdf files had exactly the same size and both couldn't be opened.
    Thanks again and have a nice day,
    Mark

  • When I place a PDF in Illustrator the size is distorted.

    I'm running Adobe Illustrator 8.0 (sorry for the old version). I've always placed TIF images with no problem but when I try to place a PDF the size comes in distorted in both directions. It comes in a couple inches narrow and at least an inch taller than the image. I also found that opening a PDF in Illustrator results in the same distortion. I've confirmed that the size properties of the PDF are correct. Does anyone have any ideas what I need to do to allow the PDF to come in at the correct size?? Thanks all.

    Illustrator 8 was released around 1998 or so, if I remember right. That would have been around pdf 1.2 (acrobat 3). Acrobat is now at, what, 9? (pdf 1.6 or 7) The plain fact is, pdfs are much more complex, containing more data, than they did 12 years ago. Probably, Illustrator 8 just doesn't know what to do with it, or how to interpret it.
    I'm amazed that it works at all, actually.
    Sorry I don't have a better answer for you.

  • White Lines on Live Traced Artwork in PDF from Illustrator CS3

    Hi,<br /><br />I've recently been using the Live Trace feature in Adobe Illustrator CS3 on my artwork so that my artwork becomes a vector image instead of a raster (I'm told it's better for Web because it works better with varying resolutions - doesn't become pixelated).  For my live trace, I use a custom preset:<br /><br />ADJUSTMENTS-<br />Mode: Color<br />Threshold: 128 (grayed out)<br />Palette: Automatic<br />Max Colors: 256<br />Output to Swatches: OFF<br />Blur: 0 px<br />Resample: 600 px<br />Fills: ON <grayed out><br />Strokes: OFF (grayed out)<br /><br />TRACE SETTINGS-<br />Max Stroke Weight: 10 px (grayed out)<br />Min Stroke Length: 20 px (grayed out)<br />Path Fitting: 1 px<br />Minimum Area: 1 px<br />Corner Angle: 1<br />Ignore White: OFF<br /><br />VIEW-<br />Raster: No Image<br />Vector Tracing Result<br /><br />The preview info, located under the dialogue bubble with the i states:<br />Paths: 4894<br />Anchors: (no number)<br />Colors: 148<br />Areas: 4822<br />Image PPI: 200<br /><br />I don't know if that helps anyone, but that's just the preset I've used to get a sharper, almost fully preserved vector version of my raster image.<br /><br />When I want to convert it to a PDF file using the File > Save As... > Save as type: PDF with the following preset:<br /><br />Adobe PDF Preset: Illustrator Default<br />Standard: None<br />Compatibility: Acrobat 8 (PDF 1.7)<br /><br />Then, my image as viewed in the Adobe Acrobat 8 Professional has several white lines, outlining areas of color.  You can see it here: <br /><br />http://i6.photobucket.com/albums/y218/Mont-ImmortalSquirrel/Ai-PDF_whitelines.jpg<br /><br />The image connected to this link was captured with PrntScrn and copied into Photoshop, cropped, and saved as a jpeg.  The issue is perfectly preserved, as you can see the white lines outlining areas of color.  This problem is persistent despite the zoom level in Acrobat 8.  <br /><br />Just another little bit of information, the problem is most noticeable in the red area and not the cream/white and yellow areas.  When I was working on the original raster image in Photoshop CS3, the cream/white area was done with the Ellipse Tool, using Bevel and Emboss in the Blending Options.  The same goes for the yellow area, which was done with the Line Tool.  The red area was done manually, with the Brush Tool, Smudge, Blur, Burn, etc.<br /><br />I'm telling you guys just about everything I've done leading up to this issue.  But, if there's something you need to know more, I'll try to figure out what I could've possibly done wrong to get this result.

    I too get this result when using LiveTrace. My simple solution to this problem was to just place a solid color shape behind that section of the trace where it occurs that is the same color as the trace. Simple...but it worked.

Maybe you are looking for