Inkscape.org
Beginners' Questions Wrong or missing characters when exporting to PDF
  1. #1
    Ricardo Oliveira Ricardo Oliveira @ward0
    *

    I want to save my Inkscape's SVG to PDF (I don't want to "Print as PDF", as this export rasterize fonts). When I do this, with some fonts (most of them), the PDF has wrong characters or missing ones, when compared to the ones I wrote in the SVG.

    I'm attaching two files: the original SVG and the same file saved as PDF. When I open the PDF file in a PDF viewer (I use MuPDF), it has wrong characters, and when I open it in a browser (Firefox), the PDF is blank.
    This doesn't happen with other software, e.g., LibreOffice Writer. The font is TTF.

     

    Please help! I This is really a bother, I don't know what to do. (I have the font files, but I'm afraid I can't share them publicly, since it'd infringe copyright)

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    I have no issues saving your file with other Arial faces.

    You can send me a link to the font without infringement. Click on my picture and then the orange envelope to DM me a link to the font. As your agent, I will only use the font for resolving the issue.

  3. #3
    Ricardo Oliveira Ricardo Oliveira @ward0

    Done! I use FontForge to convert and analyze fonts. This Arial typeface appears to me as ISO 10646-1, it's Unicode, so it should be alright, shouldn't it? That's why I'm confused.

  4. #4
    Tyler Durden Tyler Durden @TylerDurden
    *

    Ok, I installed the font and saved as PDF retaining the text, no issues. (See attached pdf.)

    Please describe your OS & version, the version of Inkscape and the installer you used, plus any special hardware like tablet/stylus or multiple monitors.

    I used .92.2 on Windows.

    Utf Test Td
  5. #5
    Ricardo Oliveira Ricardo Oliveira @ward0
    *

    Operating System: Windows 10 Pro 64-bit, version 20H2

    Inkscape 1.0.2

    No plugins on my Inkscape, it's a fresh install from the Windows Installer (64-bit)

    Below are some screenshots of how it appears to me.

    Apparently, the font being saved to PDF isn't Arial, it's Times, and it's the Æ character, not á.

    Pdf Browser
    Pdf Mupdf
    Save As Pdf
    Ink
  6. #6
    Roy Torley Roy Torley @Roy_Torley

    When you are saving your file as a PDF, do you check the "Convert text to paths" checkbox in the Text output options section?  I frequently use this option when I have exotic fonts in my work.  Any information about the fonts is stripped away and the text is converted to sequences of lines and curves.  Print shops can then use your file with minimal to no rendering problems.  I also recommend increasing the "Resolution for rasterization (dpi)" to 192 so fine details of a specialized font will render with enhanced precision.  Again, check the "Convert text to paths" option and you should be just fine.

    I wish you success!

  7. #7
    Ricardo Oliveira Ricardo Oliveira @ward0

    Converting text to paths indeed works, but then I can't select the text in the PDF, and I really need that

  8. #8
    Tyler Durden Tyler Durden @TylerDurden

    I'm a little confused... the example utf_test.svg does not show a unicode character when I open it in Inkscape or a text/unix editor.

  9. #9
    Ricardo Oliveira Ricardo Oliveira @ward0

    My later screenshots aren't from the utf_test.svg file. But the result is the same in all files I create. The á character is replaced with the Æ character.

    I tried downloading Inkscape version 0.92.2 to test it out, but when I try to open it, I get a "Inkscape encountered an internal error and will close now." error.

  10. #10
    Ricardo Oliveira Ricardo Oliveira @ward0

    When I replace the "/BaseFont" value of my PDF with yours, my PDF displays correctly. I don't know why nor how. Maybe there's something different with how Inkscape saves PDFs in newer versions?

    Notepad++ C5C1Cnmksi
  11. #11
    Tyler Durden Tyler Durden @TylerDurden

    Could be.

    I inserted a unicode ligature to a new SVG, and saved to PDF with no apparent issue.

    Is Ar Ligature
    Utf Test2 Td
  12. #12
    Tyler Durden Tyler Durden @TylerDurden

    I'm not by my v1.0.1 machine, but will be later to test.

  13. #13
    Tyler Durden Tyler Durden @TylerDurden

    Searched bug reports for "Unicode"... there are a few: https://gitlab.com/inkscape/inkscape/-/issues?scope=all&utf8=%E2%9C%93&state=opened&search=unicode

  14. #14
    Roy Torley Roy Torley @Roy_Torley

    I haven't explored code behind the scenes.  My practice is to convert to PDF as the last operation I need to do when saving.  When I need to edit text, I do it in the .svg window and then save the work again in PDF format.  I'm used to doing it this way and don't think about.  So, I have two files: the native .svg file and the final .pdf.  This part of the work flow works for me and I'm happy with it.  It's almost like taking a step and not being aware that gravity is still pulling you down.  You just take the next step in your journey of 1,000 miles. 

  15. #15
    Aero Aero @Aero◻️
    *🙇👍

    A new version of Inkscape, 1.0.2-2 addressing this issues, was just released.

     

    Screenshot 102 2
  16. #16
    Ricardo Oliveira Ricardo Oliveira @ward0
    👍*

    I agree @Roy_Torley. I have a similar workflow for presentations! I do them in Inkscape, and just consolidate them as images and import them as background in Impress, less hassle with font and objects becoming misplaced on another computer. But for PDFs, I really need the text to be selectable.

    @TylerDurden Thanks for your time and help. In the end, @Aero suggestion did the trick. I don't have this issue on the newest development version, 1.1-alpha (818273d, 2021-02-19).

  17. #17
    Roy Torley Roy Torley @Roy_Torley

    Hi Ricardo,

    This is something I should look into, also.  Working with PDFs piques my interest.  Best wishes!

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Wrong or missing characters when exporting to PDF