View Issue Details

IDProjectCategoryView StatusLast Update
0016069ScribusPDFpublic2020-03-22 15:13
ReporterPontobart Assigned Tojghali  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.5.6.svn 
Target VersionFixed in Version1.5.6.svn 
Summary0016069: PDF import distorts images
DescriptionCurrently the PDF import has problems with images that are rotated or clipping. The attached tarfile contains two example PDF files that show the problem. The file f.pdf contains pictures of the letter F rotated by steps of 15 degree with normal and mirrored orientation. There should be one F per square. The document uses different image types and masks on the different pages. Scribus currently fails to import the document and shows all kind of errors. Just compare it in a PDF viewer with the imported file. (../path/to/scribus/bin/scribus f.pdf)
The second file head.pdf shows a red head inside a white polygon. Again compare a PDF viewer with the imported file.
I tried to fix the problems and provide according patches against HEAD:

- fix_adjust_size_flipped_images.diff

Use the absolute position of the lower and right clip borders to adjust the internal offset of images. This prevents the following bug: https://photos.app.goo.gl/wjTG2E8g8E1ip6xJ9 (last 5 seconds are most interesting). This one is a prerequisite for the following one.

- fix_pdf_image_import.diff

Fix image import from PDF files:
a) For rotated images do not use the internal image rotation but rotate the whole Image Frame.
b) Factor out the ImageFrame generation from the four image generating function.
c) Correctly identify images that switch orientation.
d) Try to apply the correct offset to generated patterns.

- filename_in_debug_output.diff

Print the filename if the PDF analyzer fails to process a file.

If you apply the patches and want to attribute them to me please use: bartoschek@google.com
TagsNo tags attached.
PatchNo

Activities

Pontobart

2020-03-21 09:54

reporter  

scribus_patch.tgz (72,284 bytes)

jghali

2020-03-22 15:13

administrator   ~0047450

Applied, thanks!

Issue History

Date Modified Username Field Change
2020-03-21 09:54 Pontobart New Issue
2020-03-21 09:54 Pontobart File Added: scribus_patch.tgz
2020-03-22 15:13 jghali Assigned To => jghali
2020-03-22 15:13 jghali Status new => resolved
2020-03-22 15:13 jghali Resolution open => fixed
2020-03-22 15:13 jghali Fixed in Version => 1.5.6.svn
2020-03-22 15:13 jghali Note Added: 0047450