pdf-renderer
  1. pdf-renderer
  2. PDF_RENDERER-30

fail to render a pdf created with Tahoma font and encoding built-in

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

    • Issuezilla Id:
      30

      Description

      It fails to render a pdf file who was made with Tahoma font. Squares are
      displayed instead of characters. If I change the code in PDFFont class where it
      handles the tt fonts (here: type.equals("TrueType")) making it to always use
      the builtin fonts, then the document is displayed with real characters but wrong
      font.

        Activity

        Hide
        duclad added a comment -

        And the font has the encoding: built-in. For a file with Tahoma and encoding
        Ansi it works

        Show
        duclad added a comment - And the font has the encoding: built-in. For a file with Tahoma and encoding Ansi it works
        Hide
        tomoke added a comment -

        Could you supply a sample PDF to ensure that I will be addressing your bug?

        Show
        tomoke added a comment - Could you supply a sample PDF to ensure that I will be addressing your bug?
        Hide
        erichleipold added a comment -

        I have a very similar issue. We are trying to print documents with Garamond,Bold font, but it is coming through as Helvetica,Italics. I am willing to research and supply the fix, but if someone could point me in the right direction (in terms of the source code), I would appreciate it. Our project is nearing go-live and we need to find a solution for this.

        I would attach the PDF, but it has sensitive information on it.

        I have tried copying the TTF file to JAVA_HOME/jre/lib/fonts, but that didn't work. I installed the TTF font on my Fedora box, opened the PDF in Acrobat Reader, and successfully printed the document. My problem now is that I cannot get the PDF to render with the correct font through PDFRenderer.

        Show
        erichleipold added a comment - I have a very similar issue. We are trying to print documents with Garamond,Bold font, but it is coming through as Helvetica,Italics. I am willing to research and supply the fix, but if someone could point me in the right direction (in terms of the source code), I would appreciate it. Our project is nearing go-live and we need to find a solution for this. I would attach the PDF, but it has sensitive information on it. I have tried copying the TTF file to JAVA_HOME/jre/lib/fonts, but that didn't work. I installed the TTF font on my Fedora box, opened the PDF in Acrobat Reader, and successfully printed the document. My problem now is that I cannot get the PDF to render with the correct font through PDFRenderer.
        Hide
        lujke added a comment -

        The current state of things is such that if the TTF isn't embedded in the PDF than a built-in PDF font (i.e., the packaged substitutes for Helvetica/Times/Courier) is used. I have some local changes that will allow you to specify a search path for local TTFs to pickup, hopefully with some sensible defaults... hopefully I'll be able to check that in in a few days.

        Show
        lujke added a comment - The current state of things is such that if the TTF isn't embedded in the PDF than a built-in PDF font (i.e., the packaged substitutes for Helvetica/Times/Courier) is used. I have some local changes that will allow you to specify a search path for local TTFs to pickup, hopefully with some sensible defaults... hopefully I'll be able to check that in in a few days.
        Hide
        lujke added a comment -

        Oh, and I've also got a local fix to make it stop substituting an italic built-in font when there's no indication in the font descriptor of an italic font being used. With that fix applied, and without a local Garamond, I guess you'd just get non-italic Helvetica; you'd get Times if the font descriptor indicated that it was a serif font, but I guess it doesn't, for whatever reason)

        Show
        lujke added a comment - Oh, and I've also got a local fix to make it stop substituting an italic built-in font when there's no indication in the font descriptor of an italic font being used. With that fix applied, and without a local Garamond, I guess you'd just get non-italic Helvetica; you'd get Times if the font descriptor indicated that it was a serif font, but I guess it doesn't, for whatever reason)
        Hide
        lujke added a comment -

        erichleipold, the new PDFRenderer-0.9.1 release does better built-in font substitution and will also look for local TTF fonts. I didn't try and figure out any good default locations on Linux so you'll need to specify the PDFRenderer.fontSearchPath system property to tell it where to look for those TTFs.

        Show
        lujke added a comment - erichleipold, the new PDFRenderer-0.9.1 release does better built-in font substitution and will also look for local TTF fonts. I didn't try and figure out any good default locations on Linux so you'll need to specify the PDFRenderer.fontSearchPath system property to tell it where to look for those TTFs.

          People

          • Assignee:
            pdf-renderer-issues
            Reporter:
            duclad
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: