Pdf import images upside down

Bug #189495 reported by mahfiaz
70
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Unassigned

Bug Description

When importing a inkscape produced pdf, the images get flipped upside down.
(4th February build, libcairo2 1.5.8-0ubuntu1)

Revision history for this message
mahfiaz (mahfiaz) wrote :
Revision history for this message
Tom Davidson (tjd-mit) wrote :

Hi, thanks for the bug report.
This issue has already been reported at bug 169126. Please have a look at that report, and add anything that you experienced that isn't already listed there.

Revision history for this message
Rygle (rygle) wrote : Re: [Bug 189495] Re: Pdf import images upside down

Hi Tom,

I'm the originator of bug 169126, and I'm not dead sure this is the same.

My bug report was that you can import a PDF, and everything looks fine,
but then you go to draw a text box, and the text box - not the contents
of the PDF - are upside down.

Thus, Bug 189495 is probably related to the problem I reported, but not
the same. I think both possibly relate to matrix transform statements in
the SVG source, but bug 169126 involves a new element beyond the
original PDF contents, while 189495 doesn't.

Kind Regards,

Mike Pittman.

Tom Davidson wrote:
> *** This bug is a duplicate of bug 169126 ***
> https://bugs.launchpad.net/bugs/169126
>
> Hi, thanks for the bug report.
> This issue has already been reported at bug 169126. Please have a look at that report, and add anything that you experienced that isn't already listed there.
>
> ** This bug has been marked a duplicate of bug 169126
> Text boxes appear upside-down after PDF import
>
>

Revision history for this message
Tom Davidson (tjd-mit) wrote :

Mike--thanks for the correction. Unmarked this one as a dupe.

Revision history for this message
theAdib (theadib) wrote :

Rygle, what is the status about that issue? Adib.

Revision history for this message
mahfiaz (mahfiaz) wrote :

Sorry for a little misuse of words, but the original bug report was about opening PDF file, so I am not sure what it did when using import dialog (opening PDF file IS importing, since it is not native format).

Now, in 2008 03 18 build, the bug is still there, when opening PDF.
When I use the import dialog, the image appears right.

Hystrix (hystrix-)
Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
John Gutwin (jgutwin) wrote :

This is easily repeated. In a new svg place an image on the page. Make a couple of duplicates. Save as pdf. Re-open the pdf and the images are upside down. Note the open pdf dialog shows a thumbnail of the file with the images correctly oriented.

tags: added: bitmaps importing pdf
su_v (suv-lp)
tags: added: bitmap
removed: bitmaps
Revision history for this message
su_v (suv-lp) wrote :

still present in Inkscape 0.47+devel r9165 on OS X 10.5.8
(tested as described in comment #7)

Revision history for this message
Philipp Prause (inkscape-phipra) wrote :

This still happens in 0.47. As in comment #7, the preview is correct, but then in the document the images are flipped.
If you flip the image again, save the pdf, then reopen it, the image appears blank, and the message bar says it were a group. Moving the image sometime makes it reappear partly; doing anything on this group will get you into trouble (white squares in the image, strange things.)

Basically, its more than just filpping the images again - you will LOOSE the data of the pdf file, if you save it again!!

This really needs to be fixed soon!

(We want to use Inkscape to draw errows into screenshots, and save them to pdf for LaTeX. It would be very handy to use the PDF format directly, without needing to keep the original png files, or save extra svg files.)

Revision history for this message
Kjohrf (kjohrf) wrote :

I've run into this too.

Revision history for this message
Praetor77 (geramses) wrote :

Still there on Inkscape 0.47 r22583, built Apr 4 2010.

Exactly what Philipp Prause detailed. Including the image-ruining errors. These are inkscape-created pdfs with embedded PNGs by the way...

Revision history for this message
Praetor77 (geramses) wrote :

BTW, I am using Inkscape on completely updated Ubuntu 10.04.

Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.48+devel r10067 built with cairo 1.8.10
Not reproduced with Inkscape 0.48+devel r10067 built with cairo 1.10.2

Tested as described in comment #7 repeated on Mac OS X 10.5.8 (i386), and confirmed with PDFs created on linux and win32 with cairo 1.10.x (see <http://www.inkscapeforum.com/viewtopic.php?f=5&t=8731>).

AFAICT the bug is not in Inkscape's code (nor in poppler used for the PDF import), but only depends on the cairo version used in Inkscape when exporting to PDF. Even Inkscape 0.47 opens PDF files exported with Inkscape/cairo 1.10.2 correctly.

@JazzyNico - can you confirm above findings? Proposing to close as 'Invalid' in Inkscape (bug no longer occurs with cairo >= 1.10).

Changed in inkscape:
status: Confirmed → Incomplete
Revision history for this message
jazzynico (jazzynico) wrote :

@~suv - Confirmed on Windows XP.
The image is upside down when exporting with 0.48 (old cairo lib) but not when exporting with the trunk version (cairo 1.10).

The Windows stable devlibs still embed the old cairo libs, and Inkscape devs are in charge of the update (cairo is not in the Windows update system ;), thus I'd keep the report open. It's fixed for cairo, almost fixed for Gnu/Linux distros, but only in progress for Windows versions.

su_v (suv-lp)
Changed in inkscape:
status: Incomplete → Confirmed
status: Confirmed → Triaged
su_v (suv-lp)
tags: added: cairo
Revision history for this message
Bob Harvey (bobharvey) wrote :

I just made report Bug #840625 against Ubuntu, listing two import problems, one of which may or may not be this one. I got rather lost reading this. Mine is about graphics already in the pdf file. The other problem was text importing as graphics

Revision history for this message
Alvin Penner (apenner) wrote :

on Windows XP, Inkscape 0.48.2, I can no longer reproduce the problem.

- begin with upsidedown.tar.bz2
- extract drawing.svg and load it into Inkscape.
- save it as pdf, confirm that the drawing orientation is correct, confirm that it uses Cairo 1.10.2
- load pdf back into Inkscape and confirm that the orientation is still correct.

Revision history for this message
Alvin Penner (apenner) wrote :

it looks as though this particular issue was related to the Cairo version (comments 13 and 14 above)
For Windows, Inkscape 0.48.2 now ships with Cairo 1.10.2
- would it be alright to close this report?

Revision history for this message
su_v (suv-lp) wrote :

> - would it be alright to close this report?

I'd rather wait until 0.48.2 is officially released (see comment #14) - Inkscape 0.48.1 still has cairo 1.8.x.

Revision history for this message
Florian Ludwig (dino-phidev) wrote :

I can still reproduce the problem.

 - begin with upsidedown.tar.bz2
 - extract pdf (!)
 - open with pdfviewer and confirm the drawing is correct
 - open with inkscape -> drawing is upside down

inkscape: 0.48.1-4.fc15
cairo: 1.10.2-3.fc15

I used evince 3.0.2 to view the pdf - which is based on poppler and cairo and shows the image correctly.

Revision history for this message
Alvin Penner (apenner) wrote :

yes, if you begin with the pdf file that was in the zip file, then you will see the bug.

I believe the original bug occurred on export and then was first visible on import. So you'll need to do the pdf export yourself using the new Cairo.

Revision history for this message
Alvin Penner (apenner) wrote :

wrt Inkscape version 0.48.2, sorry about that, I thought 0.48.2 was already officially released, I'm running a pre-packaged version of it...

su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.48.2
Revision history for this message
su_v (suv-lp) wrote :

Closing based on the earlier comments: The issue has not been reproducible with cairo >= 1.10, and the latest Inkscape packages for Windows and Mac OS X (0.48.2) now include cairo 1.10.2.

Issue remains when importing old PDF files created by Inkscape with lower cairo versions and certain PDF files created by other applications -> see Bug #840625.

Changed in inkscape:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.