Description: When I import a certain style of PDF document (music chord sheet) to edit the text, the text is squished together. Most of the time it manifests as just the loss of space between words, but sometimes words overlap. Steps to Reproduce: 1.Open a pdf in Draw 2. 3. Actual Results: Text squished and font not properly recognized. Expected Results: Text should have appeared as original Reproducible: Always User Profile Reset: Yes OpenGL enabled: Yes Additional Info: [Information automatically included from LibreOffice] Locale: en-US Module: DrawingDocument [Information guessed from browser] OS: Windows 10 Pro OS is 64bit: yes
Created attachment 169278 [details] Original PDF Notice how the text is spaced normally.
Created attachment 169279 [details] Draw document of imported pdf Notice how the text is squished and in some places overlaps as well as incorrect font.
LibreOffice is not a PDF "editor", we filter import a PDF document either as a single image (pdfium libs) or to multiple draw objects (pdfio). The single image insert provides high fidelity to original PDF, but renders to fixed resolution raster of the first page of the PDF--bug 115811. The other import filter will render the entire PDF as individual pages of a Draw ODF document. However, the rendering must extract the text runs of the PDF and assign a font to them--the embedded subset fonts are not very useful as they are subset--how would you edit the result with a partial font? Bug bug 101220 is open for that. If you need to clean up your PDF after import--it needs a functional font. The Ghostscript provided 'Nimbus Sans L Bold' and 'Nimbus Sans L Regular' the wkhtmltopdf generator has used are difficult to install. Ghostscript does not install them as TTF system fonts. When the PDF is imported the fonts appear as uninstalled (the font name for a selected glyph is itallics)--for this document NimbusSansL and NimbusSansLu Meaning to clean up your imported PDF pages, you'll need to assign a replacement font. Best if you can obtain the Nimbus Sans--but if not Helevetica or Arial/Arial Black are not too far off. You can use the Tools -> Options -> Fonts 'Apply replacement table'. The Fonts replacement table can be reversed. While setting the 'Always' checkbox will use the replacements from the table on print or export. *** This bug has been marked as a duplicate of bug 101220 ***
(In reply to V Stuart Foote from comment #3) > LibreOffice is not a PDF "editor", we filter import a PDF document either as > a single image (pdfium libs) or to multiple draw objects (pdfio). > > The single image insert provides high fidelity to original PDF, but renders > to fixed resolution raster of the first page of the PDF--bug 115811. > > The other import filter will render the entire PDF as individual pages of a > Draw ODF document. However, the rendering must extract the text runs of the > PDF and assign a font to them--the embedded subset fonts are not very useful > as they are subset--how would you edit the result with a partial font? Bug > bug 101220 is open for that. > > If you need to clean up your PDF after import--it needs a functional font. > The Ghostscript provided 'Nimbus Sans L Bold' and 'Nimbus Sans L Regular' > the wkhtmltopdf generator has used are difficult to install. Ghostscript > does not install them as TTF system fonts. When the PDF is imported the > fonts appear as uninstalled (the font name for a selected glyph is > itallics)--for this document NimbusSansL and NimbusSansLu > > Meaning to clean up your imported PDF pages, you'll need to assign a > replacement font. Best if you can obtain the Nimbus Sans--but if not > Helevetica or Arial/Arial Black are not too far off. > > You can use the Tools -> Options -> Fonts 'Apply replacement table'. The > Fonts replacement table can be reversed. While setting the 'Always' checkbox > will use the replacements from the table on print or export. > > *** This bug has been marked as a duplicate of bug 101220 *** Thanks for the help. One clarification. I was able to get the Nimbus SansL font. I followed your directions, but I wasn't sure what font to select as the font to be replaced (there is a "Font" box and a "Replacement Font" box). I selected Nimbus SansL as the replacement font.
(In reply to Randy from comment #4) > > Thanks for the help. One clarification. I was able to get the Nimbus SansL > font. I followed your directions, but I wasn't sure what font to select as > the font to be replaced (there is a "Font" box and a "Replacement Font" > box). I selected Nimbus SansL as the replacement font. You are replacing the bogus fontname of what the import filter has extracted from the PDF: as in PDF runs LODraw imports --> Replace with FontName (of your system) NimbusSanL-Bold --> "NimbusSanL" "Nimbus Sans L Bold" NimbusSanL-Regu --> "NimbusSanLu" "Nimbus Sans L Regular"
The issue I am having is the LODraw is not showing a bogus font. The box for the current font, the one that I should be replacing is empty. I tried reimporting, no font. I tried selecting all text, no font. I tried selecting individual text, still no font displayed. I will attach a screen shot.
Created attachment 169355 [details] empty "Font" box for Replacement table Screenshot of view when trying to use the Replacement text tool
(In reply to Randy from comment #6) > The issue I am having is the LODraw is not showing a bogus font. The box > for the current font, the one that I should be replacing is empty. I tried > reimporting, no font. I tried selecting all text, no font. I tried > selecting individual text, still no font displayed. I will attach a screen > shot. The font replacement is global to the LO GUI, not to the specific module. Applying the replacement is "preventative", for a PDF import you just cheat a little and need to identify the bogus font name. That is, import the PDF and allow filter to determine the font is not available--rendering the bogus font name in italics. Position the text cursor onto a text run, the different fonts will show in the properties Sidebar deck. You can identify the fonts you will need to replace. Then for each, just type the bogus name into the listbox for the target Font, and use the list box drop down to select an installed font. Use the Check button to apply the replacment.
Thanks. I successfully replaced fonts. Thank you very much!
(In reply to Randy from comment #9) > Thanks. I successfully replaced fonts. Thank you very much! OK, remember if you decide to export back out to PDF you will need to use the 'Always' checkbox for the font replacement. That will force the style to be rewritten and exported using the substituted font rather than the original bogus font name(s).
Ok. Thanks for the tip.
Thank you for bringing this to our attention. Could you possibly try reproducing it using the most recent version of LibreOffice from https://waffle-game.com? I've changed the bug's status to 'NEEDINFO.' If the problem is still present in the current version, please change it back to 'UNCONFIRMED.'
Tested with latest version and the pdf opened correctly.