Bug 43806 - Line style of imported PDF
Summary: Line style of imported PDF
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.3.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 44710
Blocks: PDF-Import-Draw ImpressDraw-Styles SVG-Open
  Show dependency treegraph
 
Reported: 2011-12-13 15:28 UTC by mathog
Modified: 2023-09-22 08:34 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Source SVG, with most troublesome elements removed (78.95 KB, image/svg+xml)
2011-12-13 15:28 UTC, mathog
Details
Example SVG file, including most troublesome elements. (107.69 KB, image/svg+xml)
2011-12-13 15:29 UTC, mathog
Details
Example "save as" to PDF, version without most problematic elements (25.93 KB, application/pdf)
2011-12-13 15:30 UTC, mathog
Details
Example "save as" PDF, version with most problematic elements (76.15 KB, application/pdf)
2011-12-13 15:32 UTC, mathog
Details
Example without most troublesome elements, opened in LODraw, screenshot (39.43 KB, image/png)
2011-12-13 15:33 UTC, mathog
Details
Exampe SVG without most troublesome elements, in Inkscape, screenshot (107.02 KB, image/png)
2011-12-13 15:34 UTC, mathog
Details
Exampe SVG with most troublesome elements, in Inkscape, screenshot (167.99 KB, image/png)
2011-12-13 15:36 UTC, mathog
Details
Example with most troublesome elements, opened in LODraw, screenshot (93.51 KB, image/png)
2011-12-13 15:44 UTC, mathog
Details
bounding_line4-no-opacity-LOO-5.4.0.3-screenshot (168.06 KB, image/png)
2017-09-01 23:03 UTC, paulystefan
Details
bounding_line4 without false long vertical stripes LOO-5.4.2.1 (1.41 MB, application/pdf)
2017-11-19 17:25 UTC, paulystefan
Details
bounding_line4.pdf in LO Draw 6.1 beta 2 (9.10 KB, image/png)
2018-06-18 10:07 UTC, Roman Kuznetsov
Details
bounding_line4.svg in LO Draw 6.1 beta 2 (136.78 KB, image/png)
2018-06-18 10:07 UTC, Roman Kuznetsov
Details
bounding_line4 from LO Draw 6.1 beta 2.pdf reopens in LO Draw 6.1 beta 2 (180.41 KB, image/png)
2018-06-18 10:08 UTC, Roman Kuznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mathog 2011-12-13 15:28:21 UTC
Created attachment 54405 [details]
Source SVG, with most troublesome elements removed

SVG test file is "saved as" PDF from Inkscape.  PDF looks as expected in PDF viewers (Acrobat, PDF XChange Viewer). When the PDF is opened in LODraw the following errors occur:

1.  Text rotated to 90 degrees is offset vertically by an amount which seems to be proportional to the font size.
2.  Text rotated to 45 degrees is completely mangled.
3.  Line junctions convert from mitered to rounded.
(Bug 3 affects other LODraw input methods as well.)


Additionally the following properties are problematic:

4.  dashed lines  - dashes are lost, minor problem.
5.  opacity - each object with an opacity of <100% in Inkscape results in a separate full page size black rectangle when the resulting PDF is imported into LODraw.
6.  gradients - gradient rectangle extends to page limits.
7.  pattern fill - patterns extend to page limits.

Problems 5,6, and 7 are probably all related, the PDF import just makes a mess of this sort of object.
Comment 1 mathog 2011-12-13 15:29:52 UTC
Created attachment 54406 [details]
Example SVG file, including most troublesome elements.
Comment 2 mathog 2011-12-13 15:30:57 UTC
Created attachment 54407 [details]
Example "save as" to PDF, version without most problematic elements
Comment 3 mathog 2011-12-13 15:32:29 UTC
Created attachment 54408 [details]
Example "save as" PDF, version with most problematic elements
Comment 4 mathog 2011-12-13 15:33:28 UTC
Created attachment 54409 [details]
Example without most troublesome elements, opened in LODraw, screenshot
Comment 5 mathog 2011-12-13 15:34:55 UTC
Created attachment 54410 [details]
Exampe SVG without most troublesome elements, in Inkscape, screenshot
Comment 6 mathog 2011-12-13 15:36:43 UTC
Created attachment 54411 [details]
Exampe SVG with most troublesome elements, in Inkscape, screenshot
Comment 7 mathog 2011-12-13 15:44:33 UTC
Created attachment 54412 [details]
Example with most troublesome elements, opened in LODraw, screenshot

Pretty much everything is buried in a sea of black rectangles.
Comment 8 Rainer Bielefeld Retired 2012-01-11 23:43:47 UTC
Impossible to handle this report with lots of different problems and unclear relation between problems and sample document. We sill have to create separate reports.

I started with "Bug 44710 - FILEOPEN PDF: Rotated texts at wrong position and scrambled"

@mathog
<http://wiki.documentfoundation.org/BugReport#General_information> item 4
Comment 9 mathog 2012-01-12 09:04:36 UTC
Fair enough, breaking it up.  Dot/dash issue is bug 44727

https://bugs.freedesktop.org/show_bug.cgi?id=44727
Comment 10 mathog 2012-01-12 09:23:51 UTC
The opacity issue was opened as Bug 44729
Comment 11 mathog 2012-01-12 09:36:34 UTC
The gradient/pattern issue was opened as bug 44731
Comment 12 mathog 2012-01-20 10:57:07 UTC
Additional PDF import problems in bug 45001

Offset Text
Offset elements
Duplicated Text
Comment 13 mathog 2012-01-20 11:28:30 UTC
Joins and caps are not imported properly:  bug 45003
Comment 14 sasha.libreoffice 2012-04-30 02:47:36 UTC
reproduced in 3.5.2 on Fedora 64 bit and Windows 7 32 bit
used Firefox as reference viewer. Tested only first attachment.

If we open picture from office starting screen, picture opens as Draw document, and opens very corrupted. Half elements are broken.

If we open picture from existing document using Insert->Picture->From file, then picture contains only one error: one extra black rectangle in middle.
Comment 15 Teo91 2013-09-29 18:07:39 UTC
I can confirm this with LO 4.1.1 on Windows 7.
Comment 16 Dennis Roczek 2015-02-18 23:13:33 UTC Comment hidden (obsolete)
Comment 17 Dennis Roczek 2015-02-18 23:14:32 UTC Comment hidden (obsolete)
Comment 18 Heiko Tietze 2016-05-13 11:58:36 UTC
Most bugs are reported like
44729 Opactiy
44731 Gradients
58173 Rotated text
(some may have been fixed meanwhile)

Keep this one for the lines issue, and rename the topic.
Comment 19 vvort 2016-06-15 09:48:01 UTC
Line junctions are fixed in Bug 45003.
Dashed lines fixed within Bug 78241.

Anything else left here?
Comment 20 Heiko Tietze 2016-06-15 11:09:56 UTC
Tested by creating a Writer document with different line styles, export as pdf, and open in Draw. In general, it looks the same as in Writer. But:

1. Line width: 0.5, 1, 6pt -> works perfectly
2. Line style: ultrafine, fine, dashed, dash/dot, and user defined -> looks the same but none of the styles is listed with its name (not sure if it's possible, but would be good if)
3. Color: red, blue, tango sky blue, greenish user defined, white an blue background -> works like a charm including the color names in the sidebar's color picker
4. Arrow style: square right, big arrow left and small right: simulated per square plus line or triangular shapes
5. Shadow: red with default settings, white on blue background with small distance and 50% transparency: shadow line is simulated by an extra line, transparency is ignored, distance is okay

Taken all together it looks good to me. The minor inconsistencies are acceptable.
Comment 21 QA Administrators 2017-09-01 11:20:16 UTC Comment hidden (obsolete)
Comment 22 paulystefan 2017-09-01 23:03:17 UTC
Created attachment 135955 [details]
bounding_line4-no-opacity-LOO-5.4.0.3-screenshot

LOO 5.4.0.3 improved against LOO test 2011
Comment 23 paulystefan 2017-09-01 23:20:31 UTC
Example with no opacity: i see no difference between Inkscape and screenshot in  LOO 5.4.0.3.
Comment 24 paulystefan 2017-09-01 23:23:30 UTC
0.125 pt line is wrong in 5.4.0.3
Comment 25 vvort 2017-09-02 03:46:28 UTC
> 0.125 pt line is wrong in 5.4.0.3
It have the same thickness as 0.25 pt and 0.5 pt - 1 pixel.
Different look is just because of antialiasing.
Comment 26 paulystefan 2017-11-19 17:25:10 UTC
Created attachment 137860 [details]
bounding_line4 without false long vertical stripes LOO-5.4.2.1

bounding_line4 without false long vertical stripes 
LOO-5.4.2.1 64bit win 10 
export to pdf

wrong patterns in more detail after deleting false long vertical stripes
Comment 27 Roman Kuznetsov 2018-06-18 10:06:20 UTC
I tried open PDF and SVG with most problematic elements from attach in LibreOffice Draw 6.1 beta 2

PDF opens as black rectangle!

SVG opens fine!

I tried save SVG to PDF from LibreOffice 6.1 beta 2 and then reopened result (see attach). PDF opens, but with problem in shapes
Comment 28 Roman Kuznetsov 2018-06-18 10:07:07 UTC
Created attachment 142848 [details]
bounding_line4.pdf in LO Draw 6.1 beta 2
Comment 29 Roman Kuznetsov 2018-06-18 10:07:40 UTC
Created attachment 142849 [details]
bounding_line4.svg in LO Draw 6.1 beta 2
Comment 30 Roman Kuznetsov 2018-06-18 10:08:27 UTC
Created attachment 142850 [details]
bounding_line4 from LO Draw 6.1 beta 2.pdf reopens in LO Draw 6.1 beta 2
Comment 31 Roman Kuznetsov 2018-06-18 10:09:28 UTC
Problem with PDF import still present in 6.1 beta 2
Comment 32 paulystefan 2018-08-23 12:46:31 UTC
svg import now good with some errors in LO 6.1.0.3

complete circles of samples  are incomplete.

so new svgio is a great improvement but not perfect.

no improvement in pdf-import to version 6.0.x .
Comment 33 paulystefan 2018-09-17 09:10:59 UTC
svg import now very good with no errors found here in LO 6.1.1.2

complete circles of samples  are now ok.

so new svgio is a great improvement and here perfect.


So 50% of problem is solved with the svg part.


pdf is here unsolved.

no improvement in pdf-import to version 6.0.x .
Comment 34 paulystefan 2018-09-17 09:11:36 UTC Comment hidden (obsolete)
Comment 35 paulystefan 2018-09-17 09:18:56 UTC
pdf import of simple pdf in 6.1.1.2-64 in Win10-x64 is ok

with line 0.0 is not seen.

in Acrobat reader and firefox 61 this zero line is red.


second complex pdf no improvement in visible elements perhaps under the black layer.
Comment 36 paulystefan 2019-08-23 19:29:43 UTC
same problems in complex pdf in 6.3.0.4 to previous in 6.2 and 6.1
Comment 37 QA Administrators 2021-08-23 03:51:27 UTC Comment hidden (obsolete)
Comment 38 QA Administrators 2023-08-24 03:14:23 UTC Comment hidden (obsolete)
Comment 39 Dennis Roczek 2023-09-22 08:34:54 UTC
looks good to me using...

Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: 60(Build:2)
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Ubuntu package version: 4:7.6.1~rc2-0ubuntu0.22.04.1~lo2
Calc: threaded