Issue 92909 - pdf import applies transformation matrix wrongly
Summary: pdf import applies transformation matrix wrongly
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: extensions
Classification: Extensions
Component: pdfimport (show other issues)
Version: current
Hardware: Sun All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact: wolframgarten
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-19 13:43 UTC by frank_markesteijn
Modified: 2020-11-08 19:23 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
example pdf file with transformation errors (244.08 KB, text/plain)
2008-08-19 13:44 UTC, frank_markesteijn
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description frank_markesteijn 2008-08-19 13:43:25 UTC
The Sun PDF Import extension Beta 0.3.1 Solaris x86 on ooo3.0 Beta 2 Build
BEB300_m3 produces a rotation when a skew is applied, after that other
transformations are somewhat garbled. In the attached file Leers.text.pdf, when
viewed in ooo or a pdf viewer, in the top right corner of every page you find a
legend with some short text strings, the third line in every legend is a latin
species name that should be skewed not rotated, when you open this pdf file in a
text editor then line 4980 reads "q 1 0 0.2 1 632 533 cm", q saves the current
graphics state, then a transformation is applied. If this file is saved as an
ooo drawing and that new file is then unzipped, form a terminal: "unzip
Leers.text.odg", then in the file Contents.xml this transformation is translated
to "draw:transform="rotate (-0.197396738401708) translate (22.295cm 1.933cm)",
this would have been correct had the pdf transformation matrix been "1 -0.2 0.2
1 632 533 cm", it appears that the third component of the matrix is duplicated
into the second component of the matrix, however i am not certain that the sign
is inversed, it appears to be the case but there is probably more to it than
that, the translation in the xml file does also not match the translation in the
pdf file (fifth and sixth components of the matrix), when viewed in ooo however
the text appears in the correct position. Objects on the same page that appear
after this skewed/rotated object in the pdf file are placed in wrong positions,
thus it seems the "Q" instruction on line 4987 in the pdf file does not fully
restore the graphics state, or at least not the current transformation matrix,
this incomplete or incorrect restoration does not always produce the same error
in the placement of objects, on different pages in the pdf document the text
objects in the legend (upper right) are misplaced in a different manner on
different pages.
There are other things wrong when this file is imported
but those are different bugs.
The attached file Leers.txt.pdf is a plain ascii file, so you can open it in any
text editor.
Comment 1 frank_markesteijn 2008-08-19 13:44:32 UTC
Created attachment 55854 [details]
example pdf file with transformation errors
Comment 2 wolframgarten 2008-08-19 14:04:05 UTC
Reproducible. Reassigned.
Comment 3 Martin Hollmichel 2008-10-08 09:51:46 UTC
change component.
Comment 4 philipp.lohmann 2009-05-08 16:05:06 UTC
partially fixed in CWS pdfextfix02; the sample doc graphics now import correct.
However I expect further sample documents to come up with different
rotations/scalings/shearings, that still go wrong. But at least we have a slight
improvement

frank_markesteijn: the rotation defined in ODF is in the other direction, which
makes the matrix to directly translatable (and causes all kinds of havoc).
Comment 5 philipp.lohmann 2009-05-10 10:45:27 UTC
please verify in CWS pdfextfix02
Comment 6 philipp.lohmann 2009-05-10 10:57:56 UTC
set milestone
Comment 7 norbert2 2009-05-11 08:03:41 UTC
When will there be a fixed build of the extension available?

What about Issue 92908? Isn't it a duplicate of this one?
Comment 8 philipp.lohmann 2009-05-11 10:25:29 UTC
@norbert2: soon. issue 92908 is not a duplicate however. In fact I made a
mistake when setting this one to fixed, what I fixed is the flipped image in
issue 92908. Sorry.

Comment 9 Marcus 2017-05-20 11:35:13 UTC
Reset assigne to the default "issues@openoffice.apache.org".
Comment 10 oooforum (fr) 2020-11-08 17:04:41 UTC
PDFImport is not in OpenOffice core but provided as an OXT:
https://extensions.openoffice.org/en/project/pdf-import-apache-openoffice

So, report any issue directly to the author.