Bug 125940 - pdf text overflowing when opened in draw
Summary: pdf text overflowing when opened in draw
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.2.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Import-Draw
  Show dependency treegraph
 
Reported: 2019-06-15 14:42 UTC by Michael Weske
Modified: 2019-06-15 17:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
screen shot of draw with form loaded (129.05 KB, image/jpeg)
2019-06-15 14:44 UTC, Michael Weske
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weske 2019-06-15 14:42:15 UTC
Description:
downloaded https://www.irs.gov/pub/irs-pdf/fw9.pdf
opened in draw 
   Part 1 is overflowing into the block beside it
   Part 2 is running off the page
   General Instructions the columns are overlapping


Steps to Reproduce:
1.download form
2.open in draw
3.

Actual Results:
form text is overflowing its fields

Expected Results:
should look like it does in Acrobat reader or Foxit reader


Reproducible: Always


User Profile Reset: No



Additional Info:
all are x64 versions:
I left the severity as Normal because this is a legal government form and writing into the data fields should get the form rejected.
Tried in 6.2.3.2, 6.2.4.2, 6.3.0.0 beta1
opens correctly in Chrome, Acrobat reader, Foxit reader

Version: 6.2.4.2 (x64)
Build ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 1 Michael Weske 2019-06-15 14:44:32 UTC
Created attachment 152212 [details]
screen shot of draw with form loaded

This is what I am seeing when loaded.  You can open the document in Acrobat or Foxit reader and see what it should be.
Comment 2 V Stuart Foote 2019-06-15 17:39:24 UTC
Sorry but PDF format by design are not "editable".  LibreOffice is not a PDF "editor", nor does it implement a PDF "form filler".

What you see occurring is font fallback by the import filter (pdfio)--you would have to have exactly the font set IRS used to create that form installed locally to your system. Font subsets held in PDF are intended to render the document as produced--not edit it. LibreOffice "import" filter do sane thing of passing unknown fonts for replacement. 

The other LibreOFfice PDF filter for "insert" (pdfium based ipdf) will read the exact PDF structure and render it to document canvas as a bitmap image. Fidelity with the menu Insert -> Image and PDF is very high (but image remains low resolution), and the filter only parses the first page of the PDF. Both limitations in queue for dev effort.

Selecting the inserted image and applying "Break" will render the PDF to Draw object (Text boxes matching internal layout of the PDF not into lexically sensible paragraphs) exposing all the original font and layout. But again fallback font assignments are made--LibreOffice does the correct thing here as well.

You can set a replacement font in advance for any fonts being used in the PDFs with the Tools -> Options -> Fonts: Replacement table mechanism.
Comment 3 V Stuart Foote 2019-06-15 17:42:14 UTC
A nuisance to have to manipulate fonts, but not a bug. Resolved =>NAB