2 Replies Latest reply on Mar 31, 2011 6:38 AM by Neal G. Davies

    How to retain all fonts during flattening

    Asim_Adobe

      I am trying to flatten a PDF using OutputService's transformPDF method. When I use the TransformationFormat.PDFA option so that I retain the fonts, I get an error saying similar to "Unable to find the font 'Impact'. Font substitution not allowed for PDF/A". Now the questions I have are:

       

      1. If I want to flatten a PDF using APIs while retaining the fonts, is transformPDF method with TransformationFormat.PDFA argument the right choice? Will the size be so high that I do not get any benefit out of flattening?

      2. If that is the right choice, how do I add/install fonts to LiveCycle server so that all the fonts I use are available during the transformPDF process?

       

      Please note that I have the fonts embedded in the non-flattened PDF, thus making it look as designed in any computer it opens. I have thousands of forms which uses a variety of forms are they were designed and developed over many years with little or no style guidelines in the initial stages. Now if I flatten these forms as TransformationFormat.PDF, the fonts are substituted which make the text overflow or overlap and thus the form ugly and sometimes unacceptable. This is the reason why I looked at the TransformationFormat.PDFA option.

        • 1. Re: How to retain all fonts during flattening
          Hodmi Level 4

          PDF/A is very restrictive as to what is acceptable. Its all related to it being an archive format, so it cannot ever change (font embedding is one part of that).

           

          If the font (or a subset of the font) is not already embedded in the PDF, then you will need to make sure the Font is on the LiveCycle server.  That way LC can embed it when it transforms the PDF.

           

          There can also be issues as some fonts cannot be embedded due to the font's licensing restrictions.  That is, the font creator has said that it cannot be embedded.

           

          The larger question is; do you really need a PDF/A?  If you just need to flatten the document you can use the OutputService.generatePDFOutput to make the document non-interactive with a Transformation Format of PDF.

          1 person found this helpful
          • 2. Re: How to retain all fonts during flattening
            Neal G. Davies

            There is no way to retain the fonts in the incoming PDF when flattening. The fonts used need to be on the server when you run the transformPDF (which is the right API). 

            You ask how these can be installed – don’t know off hand but this must be documented – same place as the fonts required for a rendering using Forms/Output – the transform is a very similar operation under the covers.

            A Windows situation is easier since MS provides a bunch of fonts for you to use. On a UNIX or /Linux box you need to acquire legal copies.

            When you use PDF/A as a format it is flagging the unavailable font (a useful side benefit of sorts); non PDF/A formats just substitute if the font is not found (with no warning) thus the behavior you see. A PDF/A-1b will be a similar size to a regular PDF with embedded fonts; fonts will be embedded always for PDF/A. A PDF/A-1a will also have a bunch of tagging and so will be bigger.

            Hope that helps.