4 Replies Latest reply on Mar 23, 2010 2:45 AM by Emanuele Radaelli

    CS4 / JavaScript - Exporting PostScript problem...

    Emanuele Radaelli Level 1

      Hi everybody,

      I did a script to export an ID document as a PostScript file.

      Pretty simple, but sometimes I have to work with ID documents that contains PDF files with missing fonts.

      If I perform the print command manually from ID to export the PostScript file I get an alert showing me the name of those PDF documents and their missing fonts.

      Is it possible to handle this informations even within scripting?

      Try / Catch doesn't seem to work, and I need to set the document.print() first parameter to false in order to hide dialog boxes.

       

      Thanks anticipately.

        • 1. Re: CS4 / JavaScript - Exporting PostScript problem...
          [Jongware] Most Valuable Participant

          Try .. catch was a good idea, but it only handles errors in your Javascript. Since ID catches the missing fonts, it's never propagated as a "real" error.

           

          Read this: Ignore warnings on open() (especially the part on restoring it a.s.a.p. to catch real errors -- an often-heard related symptom is "Dialogs in ID refuse to show up", and now you know why).

          • 2. Re: CS4 / JavaScript - Exporting PostScript problem...
            Emanuele Radaelli Level 1

            The real problem for me is that I can't use the font-check ID perform on my document because it resolve all missing instances. The good thing about that warning is that it display PDF files and their missing fonts, a very useful thing for me because I need to write those informations in a log file.

            I will try to use the ignoreWarning method hoping to solve this problem.

            Thanks a lot.

            • 3. Re: CS4 / JavaScript - Exporting PostScript problem...
              [Jongware] Most Valuable Participant

              Okay, I see (now) what the problem is.

               

              Switching the warnings off only helps you if you really want that file exported, missing fonts or not. The Scripting interface does not list anything for checking missing fonts inside a PDF. And I cannot try without a "bad" file, but I am not sure if the fonts "in" a PDF (missing or present) are even listed in the active document's Fonts list. (I don't think so, because in that case you would have to have a font.status value of "Embedded" -- which is not in the list.)

              • 4. Re: CS4 / JavaScript - Exporting PostScript problem...
                Emanuele Radaelli Level 1

                I compose my document dinamically so I only get errors when exporting it inPostScript.

                This is the warning panel I have when a PDF file is missing some fonts:

                 

                http://farm3.static.flickr.com/2782/4456217465_c77f187df3_o.jpg

                It says: "Following fonts are not found:", and give me the name of the PDF document and the missing font.

                If I check through Find fonts command I also get the PDF attachment missing fonts, but I get any instance (the one following is another document missing other fonts...):

                 

                http://farm3.static.flickr.com/2684/4456217469_9fb7836f2f_o.jpg

                The good thing for me in order to create a log file is to be able to read and use the informations I get from the first warnig panel.

                 

                P.S. If you try to place a PDF file whose missing fonts ID gives you the same warning panel.