poppler issueshttps://gitlab.freedesktop.org/poppler/poppler/-/issues2020-03-24T11:19:36Zhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/598libpoppler cannot recreate pdftotext output, because physical_layout is not h...2020-03-24T11:19:36ZBugzilla Migration Userlibpoppler cannot recreate pdftotext output, because physical_layout is not handled correctly## Submitted by dum..@..gmx.fr
Assigned to **poppler-bugs**
**[Link to original bug (#103798)](https://bugs.freedesktop.org/show_bug.cgi?id=103798)**
## Description
Dear maintainer, this bug concerns poppler 0.48.0 up to at least ...## Submitted by dum..@..gmx.fr
Assigned to **poppler-bugs**
**[Link to original bug (#103798)](https://bugs.freedesktop.org/show_bug.cgi?id=103798)**
## Description
Dear maintainer, this bug concerns poppler 0.48.0 up to at least 0.60.1
in file .../gcc/poppler-page.cpp
the function
ustring page::text(const rectf &r, text_layout_enum layout_mode) const
when called with physical_layout as layout_mode incorrectly creates a
TextOutputDev with second parameter (supposed to be true for physical_layout) always set to gFalse, because the corresponding code in lines 272 and 273 (poppler 0.60.1) are
const GBool use_raw_order = (layout_mode == raw_order_layout);
TextOutputDev td(0, gFalse, 0, use_raw_order, gFalse);
By contrast the pdftotext.cc creates TextOutputDev with second parameter set to gTrue when called with the -layout command line option.
THE EFFECT, is that the text produced inside a program using libpoppler differs from the more faithful text (which has, for example, blank lines where required) produced by invoking pdftotext with the -layout option.
Would the following be a solution?
const GBool use_raw_order = (layout_mode == raw_order_layout);
const GBool use_physical_layout = !use_raw_order;
TextOutputDev td(0, use_physical_layout, 0, use_raw_order, gFalse);
I would be grateful, if this could be fixed.
The alternative I do not relish, would appear to be to compile virtually all of the poppler source code into my program, just to give it access to TextOutputDev and thus be able to call it with gTrue as second parameter. This does not appear to be what libpoppler is supposed to be for.https://gitlab.freedesktop.org/poppler/poppler/-/issues/597Please provide configure option to compile without fontconfig2018-10-06T23:44:22ZBugzilla Migration UserPlease provide configure option to compile without fontconfig## Submitted by Otfried Cheong
Assigned to **poppler-bugs**
**[Link to original bug (#98043)](https://bugs.freedesktop.org/show_bug.cgi?id=98043)**
## Description
Please make it possible to compile poppler without fontconfig.
Fon...## Submitted by Otfried Cheong
Assigned to **poppler-bugs**
**[Link to original bug (#98043)](https://bugs.freedesktop.org/show_bug.cgi?id=98043)**
## Description
Please make it possible to compile poppler without fontconfig.
Fontconfig is quite a large dependency when you need to bundle it with your application (this is for OSX), in particular since it also pulls in libexpat and probably some other things.
It is also only used in borderline cases. Since PDF 1.5, PDF fonts are strongly recommended to embed all fonts - so fontconfig is actually only useful for ill-formed PDF files.
My application uses poppler only for parsing PDF files and provides its own renderer, so it's somewhat annoying that I need to bundle a large library that's completely useless or hack the poppler build process myself.
Note that Freetype supports building without fontconfig since 2009 (see #19253), so this has no impact on the dependency on Freetype - which is really all you need to render fonts embedded in the PDF file.
### See also
* https://bugs.freedesktop.org/show_bug.cgi?id=19253https://gitlab.freedesktop.org/poppler/poppler/-/issues/596PDF reflow2022-06-01T21:02:10ZBugzilla Migration UserPDF reflow## Submitted by D W
Assigned to **poppler-bugs**
**[Link to original bug (#20652)](https://bugs.freedesktop.org/show_bug.cgi?id=20652)**
## Description
I am using pdftohtml to reformat e-books in PDF format for easier reading on h...## Submitted by D W
Assigned to **poppler-bugs**
**[Link to original bug (#20652)](https://bugs.freedesktop.org/show_bug.cgi?id=20652)**
## Description
I am using pdftohtml to reformat e-books in PDF format for easier reading on handheld devices.
The handheld Adobe reader software supports a "reflow" mode in which the PDF text is adjusted to the screen size, just like normal HTML text. In this mode, paragraphs are preserved as paragraphs and the lines wrap at the width of the screen, so it is not necessary to scroll the document or have lines broken in their original spots in the document. Reading documents in reflow mode is a huge improvement, especially on small screens, and it would be an very useful addition to pdftohtml.
I have been testing a patch someone else wrote and posted at
http://lists.freedesktop.org/archives/poppler/2008-September/004126.html
I have been testing it and it works pretty well, although it's not perfect, perhaps it could be applied a first step?https://gitlab.freedesktop.org/poppler/poppler/-/issues/595pdftoppm: X and Y scaling are swapped2019-12-05T12:04:12ZBugzilla Migration Userpdftoppm: X and Y scaling are swapped## Submitted by Jason Crain
Assigned to **poppler-bugs**
**[Link to original bug (#95268)](https://bugs.freedesktop.org/show_bug.cgi?id=95268)**
## Description
A similar bug for pdftocairo was fixed in bug #94655. The ZIP archive...## Submitted by Jason Crain
Assigned to **poppler-bugs**
**[Link to original bug (#95268)](https://bugs.freedesktop.org/show_bug.cgi?id=95268)**
## Description
A similar bug for pdftocairo was fixed in bug #94655. The ZIP archive in that bug (https://bugs.freedesktop.org/attachment.cgi?id=122468) has two files, good.pdf and bad.pdf.
Running the following command:
pdftoppm -png -singlefile -f 1 -scale-to-x 1275 -scale-to-y 1650 bad.pdf bad
creates a 1651 x 1275 png image. With those -scale-to-x/y arguments, it should be 1275 x 1651. The x and y scaling gets swapped because the PDF is internally rotated. The page dictionary specifies /Rotate 270.https://gitlab.freedesktop.org/poppler/poppler/-/issues/5940.31: Stack underflow when printing PDF file2018-10-26T15:24:24ZBugzilla Migration User0.31: Stack underflow when printing PDF file## Submitted by Patrick Schönbach
Assigned to **poppler-bugs**
**[Link to original bug (#89324)](https://bugs.freedesktop.org/show_bug.cgi?id=89324)**
## Description
poppler 0.31
Brother printers using BR-Script3
When printing PD...## Submitted by Patrick Schönbach
Assigned to **poppler-bugs**
**[Link to original bug (#89324)](https://bugs.freedesktop.org/show_bug.cgi?id=89324)**
## Description
poppler 0.31
Brother printers using BR-Script3
When printing PDFs, I only get an error page with a stack underflow error.
Such an error existed before, in 0.25 IIRC. It was fixed, but now it happens again.https://gitlab.freedesktop.org/poppler/poppler/-/issues/593Incorrect radial shading in cairo output2018-08-21T11:16:04ZBugzilla Migration UserIncorrect radial shading in cairo output## Submitted by Adrian Johnson `@ajohnson`
Assigned to **poppler-bugs**
**[Link to original bug (#40164)](https://bugs.freedesktop.org/show_bug.cgi?id=40164)**
## Description
Created attachment 50304
test case
The attached PDF fi...## Submitted by Adrian Johnson `@ajohnson`
Assigned to **poppler-bugs**
**[Link to original bug (#40164)](https://bugs.freedesktop.org/show_bug.cgi?id=40164)**
## Description
Created attachment 50304
test case
The attached PDF file demonstrates incorrect radial shading colors in the cairo backend. Splash renders this pdf correctly.
**Attachment 50304**, "test case":
[radial.pdf](/uploads/ffa07ba8002b2940eb6e7e8881ced085/radial.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/592PDF shows top ~5% of lines missing2018-08-21T11:15:59ZBugzilla Migration UserPDF shows top ~5% of lines missing## Submitted by Germán Poo-Caamaño
Assigned to **poppler-bugs**
**[Link to original bug (#100866)](https://bugs.freedesktop.org/show_bug.cgi?id=100866)**
## Description
Created attachment 131116
Output of pdftocairo
This bug was ...## Submitted by Germán Poo-Caamaño
Assigned to **poppler-bugs**
**[Link to original bug (#100866)](https://bugs.freedesktop.org/show_bug.cgi?id=100866)**
## Description
Created attachment 131116
Output of pdftocairo
This bug was reported originally in Launchpad and GNOME's bugzilla. In Launchpad was marked as regression.
The problem is reproducible with pdftocairo, but not with pdftoppm.
**Attachment 131116**, "Output of pdftocairo":
![test-01](/uploads/975e7be607a207cff9c1274a8ef68437/test-01.png)
### See also
* [Bug 741704](https://bugzilla.gnome.org/show_bug.cgi?id=741704)
* https://launchpad.net/bugs/1150112https://gitlab.freedesktop.org/poppler/poppler/-/issues/591crashing when converting pdf2018-10-22T18:52:57ZBugzilla Migration Usercrashing when converting pdf## Submitted by xmi..@..il.com
Assigned to **poppler-bugs**
**[Link to original bug (#43950)](https://bugs.freedesktop.org/show_bug.cgi?id=43950)**
## Description
I downed a pdf from http://www.deelin.com/downloads/books/java_conc...## Submitted by xmi..@..il.com
Assigned to **poppler-bugs**
**[Link to original bug (#43950)](https://bugs.freedesktop.org/show_bug.cgi?id=43950)**
## Description
I downed a pdf from http://www.deelin.com/downloads/books/java_concurrency_in_practice.pdf
When I tried to convert it to MOBI using calibre, it had the following error.
I was told by the calibre team that this is a poppler issue, so here I am.
calibre, version 0.8.31
ERROR: Conversion Error: `<b>`Failed`</b>`: Convert book 1 of 1 (Java Concurrency In Practice)
Convert book 1 of 1 (Java Concurrency In Practice)
Resolved conversion options
calibre version: 0.8.31
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'change_justification': u'original',
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part|prologue|epilogue\\s+', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': 'c:\\users\\ming\\appdata\\local\\temp\\calibre_0.8.31_tmp_skdlbl\\gxxwic.jpeg',
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_compress': False,
'duplicate_links_in_toc': False,
'enable_heuristics': False,
'extra_css': None,
'extract_to': None,
'filter_css': u'',
'fix_indents': True,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x058448D0>,
'insert_blank_line': False,
'insert_blank_line_size': 0.5,
'insert_metadata': False,
'isbn': None,
'italicize_common_cases': True,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'markup_chapter_headings': True,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'mobi_ignore_margins': False,
'mobi_toc_at_start': False,
'new_pdf_engine': False,
'no_chapters_in_toc': False,
'no_images': False,
'no_inline_navbars': True,
'no_inline_toc': False,
'output_profile': <calibre.customize.profiles.KindleDXOutput object at 0x05844C10>,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'personal_doc': u'[PDOC]',
'prefer_author_sort': False,
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': 'c:\\users\\ming\\appdata\\local\\temp\\calibre_0.8.31_tmp_skdlbl\\1bocnx.opf',
'remove_fake_margins': True,
'remove_first_image': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'renumber_headings': True,
'replace_scene_breaks': u'',
'rescale_images': False,
'series': None,
'series_index': None,
'share_not_sync': False,
'smarten_punctuation': False,
'sr1_replace': None,
'sr1_search': None,
'sr2_replace': None,
'sr2_search': None,
'sr3_replace': None,
'sr3_search': None,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'toc_title': None,
'unsmarten_punctuation': False,
'unwrap_factor': 0.45,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: PDF Input running
on c:\users\ming\appdata\local\temp\calibre_0.8.31_tmp_skdlbl\xpeorn.pdf
Converting file to html...
Python function terminated unexpectedly
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
(Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 187, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 31, in gui_convert_override
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 959, in run
File "site-packages\calibre\customize\conversion.py", line 204, in __call__
File "site-packages\calibre\ebooks\pdf\input.py", line 51, in convert
File "site-packages\calibre\ebooks\pdf\pdftohtml.py", line 74, in pdftohtml
calibre.ebooks.ConversionError:
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.https://gitlab.freedesktop.org/poppler/poppler/-/issues/590A picture in the pdf file appears with white lines2018-08-21T11:15:46ZBugzilla Migration UserA picture in the pdf file appears with white lines## Submitted by Germán Poo-Caamaño
Assigned to **poppler-bugs**
**[Link to original bug (#98001)](https://bugs.freedesktop.org/show_bug.cgi?id=98001)**
## Description
As reported in https://bugzilla.gnome.org/show_bug.cgi?id=74541...## Submitted by Germán Poo-Caamaño
Assigned to **poppler-bugs**
**[Link to original bug (#98001)](https://bugs.freedesktop.org/show_bug.cgi?id=98001)**
## Description
As reported in https://bugzilla.gnome.org/show_bug.cgi?id=745411
"
The pdf file was created by an old version of Publisher. It includes pictures and text.
When this file is viewed by acrobat under windows 7, it's OK.
When viewed with Evince 3.14.1 and Gnome 3.14.2 white lines appear on the pictures (and not on the text)."https://gitlab.freedesktop.org/poppler/poppler/-/issues/589horizontal white lines on the background image2018-08-21T11:15:39ZBugzilla Migration Userhorizontal white lines on the background image## Submitted by Thibaud Lutellier
Assigned to **poppler-bugs**
**[Link to original bug (#97485)](https://bugs.freedesktop.org/show_bug.cgi?id=97485)**
## Description
Created attachment 126040
PDF that triggers the problem (see fir...## Submitted by Thibaud Lutellier
Assigned to **poppler-bugs**
**[Link to original bug (#97485)](https://bugs.freedesktop.org/show_bug.cgi?id=97485)**
## Description
Created attachment 126040
PDF that triggers the problem (see first page)
Summary:
There are some white horizontal lines on the background of the 1st page of the attached PDF file. This is visible with Evince, but not with Okular.
I also get the white lines with pdftocairo (version 0.44.0)
Steps to Reproduce:
Open the file with Evince and look at the first page, or:
1) pdftocairo -singlefile -png 014231.pdf
2) eog 014231.png
Actual Results:
014231.png contains some horizontal white lines.
Expected Results:
The background image should not contains any white lines.
**Attachment 126040**, "PDF that triggers the problem (see first page)":
[014231.pdf](/uploads/43a253fa0fed788c5dadafda16f8b7bc/014231.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/588Fail to display pdf2018-10-06T23:47:34ZBugzilla Migration UserFail to display pdf## Submitted by Robert
Assigned to **poppler-bugs**
**[Link to original bug (#105536)](https://bugs.freedesktop.org/show_bug.cgi?id=105536)**
## Description
Evince is having quite some issues regarding displaying fonts in some PDF...## Submitted by Robert
Assigned to **poppler-bugs**
**[Link to original bug (#105536)](https://bugs.freedesktop.org/show_bug.cgi?id=105536)**
## Description
Evince is having quite some issues regarding displaying fonts in some PDFs. I created a bug report here: https://bugzilla.gnome.org/show_bug.cgi?id=794315
but got instructed that this is actually a poppler issue.https://gitlab.freedesktop.org/poppler/poppler/-/issues/587[pdftotext] rotated text layout breaks output text2018-08-21T11:15:22ZBugzilla Migration User[pdftotext] rotated text layout breaks output text## Submitted by Dm
Assigned to **poppler-bugs**
**[Link to original bug (#92888)](https://bugs.freedesktop.org/show_bug.cgi?id=92888)**
## Description
Created attachment 119537
PDF with watermark
I try to extract text from pdf wi...## Submitted by Dm
Assigned to **poppler-bugs**
**[Link to original bug (#92888)](https://bugs.freedesktop.org/show_bug.cgi?id=92888)**
## Description
Created attachment 119537
PDF with watermark
I try to extract text from pdf with rotated text layout (like watermark). Text from this layout is splitted into parts and that parts break main text.
Example output from the attached pdf:
rm
ar
k
Verdana
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
...
**Attachment 119537**, "PDF with watermark":
[pdf-example-watermarks.original.pdf](/uploads/3eb6dd8d8cb6d565e71570e4f278878f/pdf-example-watermarks.original.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/586Contents of PDF Annotations (Pop-up notes) not output by pdftotext2018-10-06T23:44:47ZBugzilla Migration UserContents of PDF Annotations (Pop-up notes) not output by pdftotext## Submitted by Jeffrey Ratcliffe
Assigned to **poppler-bugs**
**[Link to original bug (#10300)](https://bugs.freedesktop.org/show_bug.cgi?id=10300)**
## Description
PDF can contain annotations (pop-up notes). It would be highly u...## Submitted by Jeffrey Ratcliffe
Assigned to **poppler-bugs**
**[Link to original bug (#10300)](https://bugs.freedesktop.org/show_bug.cgi?id=10300)**
## Description
PDF can contain annotations (pop-up notes). It would be highly useful if their contents were output by pdftotext to allow them to be indexed by
Beagle.
I am the author of gscan2pdf (http://gscan2pdf.sourceforge.net/), an
application to make it easy to scan to a PDF. Having added OCR functionality,
the most obvious way of using the OCR output in the PDF is in an annotation -
thereby having the original scan, and idealy searchable text.https://gitlab.freedesktop.org/poppler/poppler/-/issues/585annotation cannot be opened2018-10-05T22:00:27ZBugzilla Migration Userannotation cannot be opened## Submitted by Felix Möller
Assigned to **poppler-bugs**
**[Link to original bug (#34762)](https://bugs.freedesktop.org/show_bug.cgi?id=34762)**
## Description
I originally reported this at https://bugzilla.gnome.org/show_bug.cgi...## Submitted by Felix Möller
Assigned to **poppler-bugs**
**[Link to original bug (#34762)](https://bugs.freedesktop.org/show_bug.cgi?id=34762)**
## Description
I originally reported this at https://bugzilla.gnome.org/show_bug.cgi?id=643029
The relevant file is at https://bugzilla.gnome.org/attachment.cgi?id=181664.
Carlos already analyzed the following:
That annotation has a 0 size rectangle:
/Rect [ 55.0306 782.177 55.0306 782.177 ]
I see the annotation icon, but can't open the popup window, maybe we should
always force note annotations to have the same size than the icon. In any case
it's not an evince issue, but poppler, could you please forward this bug report
to freedesktop.org bugzilla?
Thanks for reporting.
I think it might make sense to use the icon size in case of zero size ...https://gitlab.freedesktop.org/poppler/poppler/-/issues/584Evince removes a Checkbox Formelement on saving data2018-10-27T15:06:01ZBugzilla Migration UserEvince removes a Checkbox Formelement on saving data## Submitted by Tobias Mueller
Assigned to **poppler-bugs**
**[Link to original bug (#22493)](https://bugs.freedesktop.org/show_bug.cgi?id=22493)**
## Description
Created attachment 27160
Vanilla document
The bug was reported her...## Submitted by Tobias Mueller
Assigned to **poppler-bugs**
**[Link to original bug (#22493)](https://bugs.freedesktop.org/show_bug.cgi?id=22493)**
## Description
Created attachment 27160
Vanilla document
The bug was reported here: http://bugzilla.gnome.org/show_bug.cgi?id=585574
I opened a PDF, checked one box (the one with "des Ehegatten") and saved a
copy. I then reopened the PDF with evince, and the form field was gone!
I expected Evince to not drop the form element so that I can edit that form
later.
**Attachment 27160**, "Vanilla document":
[nbb_fbl_3-saved.pdf](/uploads/f2551c7b8a71fd79482933a59f3d4a40/nbb_fbl_3-saved.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/583Object generation numbers aren't updated (except in the xref table)2018-08-21T11:15:01ZBugzilla Migration UserObject generation numbers aren't updated (except in the xref table)## Submitted by Jakub Alba
Assigned to **poppler-bugs**
**[Link to original bug (#97092)](https://bugs.freedesktop.org/show_bug.cgi?id=97092)**
## Description
If you update an object, its generation number will only be incremented...## Submitted by Jakub Alba
Assigned to **poppler-bugs**
**[Link to original bug (#97092)](https://bugs.freedesktop.org/show_bug.cgi?id=97092)**
## Description
If you update an object, its generation number will only be incremented in the cross-reference table, but e.g. not in the object header or, if it is the "Info" dictionary, in the "Info" entry of the trailer dictionary.
To reproduce this bug, update an object (e.g. modify a single annotation in evince) and use "tail" unix utility with the "-n" option big enough (e.g. 100) to see the object header of the updated object. No matter how many times you update the object, the generation number is still the same. The generation number in the cross-reference table will be updated though.https://gitlab.freedesktop.org/poppler/poppler/-/issues/582Copy Chinese punctuation become English punctuation.2024-03-05T20:42:51ZBugzilla Migration UserCopy Chinese punctuation become English punctuation.## Submitted by Germán Poo-Caamaño
Assigned to **poppler-bugs**
**[Link to original bug (#106789)](https://bugs.freedesktop.org/show_bug.cgi?id=106789)**
## Description
Created attachment 139977
PDF test case with Chinese punctuat...## Submitted by Germán Poo-Caamaño
Assigned to **poppler-bugs**
**[Link to original bug (#106789)](https://bugs.freedesktop.org/show_bug.cgi?id=106789)**
## Description
Created attachment 139977
PDF test case with Chinese punctuation
As reported in https://gitlab.gnome.org/GNOME/evince/issues/384:
When open a Chinese pdf file and copy the Chinese punctuation text, the Chinese punctuation will become English punctuation.
For example:
。,:!
will become
.,:!
**Attachment 139977**, "PDF test case with Chinese punctuation":
[punctuation.pdf](/uploads/1628ee7d633f50e978fb06d7cc7730c0/punctuation.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/581Web browsers displays artifacts for svg images generated from pdf documents2018-08-21T11:14:55ZBugzilla Migration UserWeb browsers displays artifacts for svg images generated from pdf documents## Submitted by Alex
Assigned to **poppler-bugs**
**[Link to original bug (#103296)](https://bugs.freedesktop.org/show_bug.cgi?id=103296)**
## Description
Created attachment 134865
original pdf file
After converting some pdf docu...## Submitted by Alex
Assigned to **poppler-bugs**
**[Link to original bug (#103296)](https://bugs.freedesktop.org/show_bug.cgi?id=103296)**
## Description
Created attachment 134865
original pdf file
After converting some pdf documents to svg images by pdftocairo all web browsers (at least Firefox 56.0, Safari 11.0, Chrome 61.0.3163.100 in MAC OSX) show artifacts on images.
To reproduce the issue make the following steps:
- convert the attached pdf to SVG:
pdftocairo -svg -f 1 -l 1 err-doc-5.pdf err-doc-5.svg
- open the SVG image by any mentioned web browser and check how it looks. It expects no any artifacts on the image but it contains black rectangles. Researching the SVG content showed that these elements have the following structure:
<path xmlns="http://www.w3.org/2000/svg" style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 394.175781 101.183594 L 570.613281 102.773438 L 571.117188 40 L 394.679688 38.410156 Z M 394.175781 101.183594 "/>
This issue has been tested with latest poppler versions 0.60 and 0.60.1. Previous versions of pdftocairo also contain this problem.
PS: here is the environment info on my Ubuntu 14.04 after running "cmake .."
-- checking for module 'nss>=3.19'
-- package 'nss>=3.19' not found
-- Could NOT find NSS3 (missing: NSS3_LIBRARIES NSS3_CFLAGS)
-- Found Qt-Version 4.8.6 (using /usr/bin/qmake)
-- checking for modules 'glib-2.0>=2.41;gobject-2.0>=2.41;gio-2.0>=2.41'
-- package 'glib-2.0>=2.41' not found
-- package 'gobject-2.0>=2.41' not found
-- package 'gio-2.0>=2.41' not found
-- Could NOT find GLib (missing: GLIB2_LIBRARIES GLIB2_CFLAGS)
-- checking for module 'libopenjp2'
-- package 'libopenjp2' not found
-- Found lcms version 2.05, /usr/lib/x86_64-linux-gnu/liblcms2.so
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
Building Poppler with support for:
font configuration: fontconfig
splash output: yes
cairo output: yes
qt4 wrapper: yes
qt5 wrapper: yes
glib wrapper: no
introspection: no
gtk-doc: no
cpp wrapper: yes
use libjpeg: yes
use libpng: yes
use libtiff: yes
use zlib compress: yes
use zlib uncompress: no
use nss3: no
use curl: no
use libopenjpeg: yes
with openjpeg1
use cms: yes
with lcms2
command line utils: yes
test data dir: /home/alex/poppler/../test
-- Configuring done
**Attachment 134865**, "original pdf file":
[err-doc-5.pdf](/uploads/234fdd9630fcd6c4ba8f68a8f85c7ad5/err-doc-5.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/580heap-use-after-free on GooFile::read2018-10-05T22:15:58ZBugzilla Migration Userheap-use-after-free on GooFile::read## Submitted by Antti Husa
Assigned to **poppler-bugs**
**[Link to original bug (#78182)](https://bugs.freedesktop.org/show_bug.cgi?id=78182)**
## Description
Created attachment 98332
PDF that causes heap-use-after-free
ASAN repo...## Submitted by Antti Husa
Assigned to **poppler-bugs**
**[Link to original bug (#78182)](https://bugs.freedesktop.org/show_bug.cgi?id=78182)**
## Description
Created attachment 98332
PDF that causes heap-use-after-free
ASAN reports heap-use-after-free when pdf viewer is closed as it starts to load the pdf, i.e. before the pdf is fully loaded.
Poppler version: 0.24.5 and Git Master
Zathura version: 0.2.7
Zathura-pdf-poppler version: 0.2.5
Could not reproduce this with Evince.
At times when the viewer is closed right as it starts to load the pdf, ASAN reports another bug (SEGV) in addition to the previous one. Also gdb gives two different reports depending on if there's a breakpoint at __asan_report_error or not, since the program seems to hang without the breakpoint.
ASAN report:
==22456== ERROR: AddressSanitizer: heap-use-after-free on address 0x6004000c5310 at pc 0x7ff39b448b10 bp 0x7ff397e59710 sp 0x7ff397e59708
READ of size 4 at 0x6004000c5310 thread T4 (pool)
ASAN:SIGSEGV
==22456== AddressSanitizer: while reporting a bug found another one.Ignoring.
gdb backtrace with a breakpoint at __asan_report_error:
```
#0 __asan_report_error (pc=0x7fffea140b10, bp=0x7fffe6b51710, sp=0x7fffe6b51708, addr=0x6004000c5310, is_write=0x0, access_size=0x4) at ../../.././libsanitizer/asan/asan_report.cc:628
#1 0x00007ffff4e5f824 in __asan::__asan_report_load4 (addr=<optimized out>) at ../../.././libsanitizer/asan/asan_rtl.cc:228
#2 0x00007fffea140b10 in GooFile::read (this=0x6004000c5310, buf=0x602e0000eec9 "\004G\025\240\203\204\030B\"8\351W\255\a\r\250&)\240\302\f,DDzK\341\204\302P\316\070\":\f!:B#\370\232\256\342\"\"\">W>\222i \376\237\024\020\177\206\223C\370\240\301u\r\017A\215\064\035\006%\252R\251\226\272|\202\024K_B\v)\216AA\345\060\344Wv\362ڄGF\021\206J\230_\226\300q.eA\227E@R8b\"<\034\231\347\342\206y\374\265\315Q$\301\003\b8\207\004\f\020\062\060M'j\277-QFA\003(\340.\025\027\r\027a\203\240\203\tݵ_\371i\202\"O'eb\b3@\201\020\256\020\062\"\245\004\030h&\333\374r\205\276\376d$r\323)#Ff0U"..., n=0x100, offset=0x4095) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/goo/gfile.cc:648
#3 0x00007fffea31ae10 in FileStream::fillBuf (this=0x602e0000ee60) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Stream.cc:821
#4 0x00007fffea32d605 in FileStream::getChar (this=0x602e0000ee60) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Stream.h:458
#5 0x00007fffea3282ca in CCITTFaxStream::lookBits (this=0x60180006b800, n=0x7) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Stream.cc:2328
#6 0x00007fffea32761e in CCITTFaxStream::getTwoDimCode (this=0x60180006b800) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Stream.cc:2163
#7 0x00007fffea322b39 in CCITTFaxStream::lookChar (this=0x60180006b800) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Stream.cc:1749
#8 0x00007fffea32eb76 in CCITTFaxStream::getChar (this=0x60180006b800) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Stream.h:793
#9 0x00007fffea1d4f91 in Stream::doGetChars (this=0x60180006b800, nChars=0x136, buffer=0x60280000fdc0 '\377' <repeats 117 times>, "\003\376\037\340?\200\377\377\377\377\377\377\374?\376\f\037\370\a\377\377\300\177\340\177\377\003\377\377\377\377\377\377") at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Stream.h:126
#10 0x00007fffea31724a in ImageStream::getLine (this=0x600c00071900) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Stream.cc:517
#11 0x00007fffea9c6428 in RescaleDrawImage::getRow (this=0x7fffe6b51d10, row_num=0x493, row_data=0x607400007900) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/CairoOutputDev.cc:2838
#12 0x00007fffea9c79ff in CairoRescaleBox::downScaleImage (this=0x7fffe6b51d10, orig_width=0x9b0, orig_height=0xdb3, scaled_width=0x1a5, scaled_height=0x254, start_column=0x0, start_row=0x0, width=0x1a5, height=0x254, dest_surface=0x602c0001fa00) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/CairoRescaleBox.cc:346
#13 0x00007fffea9c6248 in RescaleDrawImage::getSourceImage (this=0x7fffe6b51d10, str=0x60180006b800, widthA=0x9b0, height=0xdb3, scaledWidth=0x1a5, scaledHeight=0x254, printing=0x0, colorMapA=0x60440002f880, maskColorsA=0x0) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/CairoOutputDev.cc:2819
#14 0x00007fffea9c10c9 in CairoOutputDev::drawImage (this=0x603600000080, state=0x603e0001f340, ref=0x7fffe6b52350, str=0x60180006b800, widthA=0x9b0, heightA=0xdb3, colorMap=0x60440002f880, interpolate=0x0, maskColors=0x0, inlineImg=0x0) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/CairoOutputDev.cc:2904
#15 0x00007fffea2428e5 in Gfx::doImage (this=0x60240008f4c0, ref=0x7fffe6b52350, str=0x60180006b800, inlineImg=0x0) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Gfx.cc:4653
#16 0x00007fffea23f997 in Gfx::opXObject (this=0x60240008f4c0, args=0x7fffe6b52580, numArgs=0x1) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Gfx.cc:4179
#17 0x00007fffea219541 in Gfx::execOp (this=0x60240008f4c0, cmd=0x7fffe6b524e0, args=0x7fffe6b52580, numArgs=0x1) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Gfx.cc:903
#18 0x00007fffea21872a in Gfx::go (this=0x60240008f4c0, topLevel=0x1) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Gfx.cc:762
#19 0x00007fffea21837e in Gfx::display (this=0x60240008f4c0, obj=0x7fffe6b529c0, topLevel=0x1) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Gfx.cc:728
#20 0x00007fffea2fb95e in Page::displaySlice (this=0x602200017a40, out=0x603600000080, hDPI=72, vDPI=72, rotate=0x0, useMediaBox=0x0, crop=0x1, sliceX=0xffffffff, sliceY=0xffffffff, sliceW=0xffffffff, sliceH=0xffffffff, printing=0x0, abortCheckCbk=0x0, abortCheckCbkData=0x0, annotDisplayDecideCbk=0x0, annotDisplayDecideCbkData=0x0, copyXRef=0x0) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/poppler/Page.cc:585
#21 0x00007fffea982034 in _poppler_page_render (page=0x605200064f40, cairo=0x604a0002f280, printing=0x0, print_flags=POPPLER_PRINT_DOCUMENT) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/glib/poppler-page.cc:362
#22 0x00007fffea98215b in poppler_page_render (page=0x605200064f40, cairo=0x604a0002f280) at /var/tmp/portage/app-text/poppler-9999/work/poppler-9999/glib/poppler-page.cc:385
#23 0x00007fffeac06d8f in pdf_page_render_cairo (page=0x600800024f10, poppler_page=0x605200064f40, cairo=0x604a0002f280, printing=0x0) at render.c:19
#24 0x00000000004519a4 in zathura_page_render (page=0x600800024f10, cairo=0x604a0002f280, printing=0x0) at page.c:360
#25 0x0000000000426511 in render (job=0x6004000c08d0, request=0x60520004c080, renderer=0x6062000064f0) at render.c:691
#26 0x0000000000426aee in render_job (data=0x6004000c08d0, user_data=0x6062000064f0) at render.c:750
#27 0x00007ffff36f1ea6 in ?? () from /usr/lib64/libglib-2.0.so.0
#28 0x00007ffff36f14e5 in ?? () from /usr/lib64/libglib-2.0.so.0
#29 0x00007ffff4e65c08 in __asan::AsanThread::ThreadStart (this=0x7fffe6b54000) at ../../.././libsanitizer/asan/asan_thread.cc:99
#30 0x00007ffff3269f3a in start_thread (arg=0x7fffe6b53700) at pthread_create.c:308
#31 0x00007ffff2a89c3d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
```
gdb backtrace with no breakpoint at __asan_report_error:
```
#0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1 0x00007ffff326c1b7 in _L_lock_1055 () from /lib64/libpthread.so.0
#2 0x00007ffff326c049 in __GI___pthread_mutex_lock (mutex=0x7ffff7ffd930 <_rtld_global+2352>) at pthread_mutex_lock.c:85
#3 0x00007ffff7deeb65 in _dl_close_worker (map=map@entry=0x604600016b80) at dl-close.c:518
#4 0x00007ffff7def36c in _dl_close (_map=0x604600016b80) at dl-close.c:775
#5 0x00007ffff7de9986 in _dl_catch_error (objname=0x7ffff75d79f0 <__interceptor_calloc::calloc_memory_for_dlsym+16>, errstring=0x7ffff75d79f8 <__interceptor_calloc::calloc_memory_for_dlsym+24>, mallocedp=0x7ffff75d79e8 <__interceptor_calloc::calloc_memory_for_dlsym+8>, operate=0x7ffff27992a0 <dlclose_doit>, args=0x604600016b80) at dl-error.c:177
#6 0x00007ffff279978c in _dlerror_run (operate=operate@entry=0x7ffff27992a0 <dlclose_doit>, args=0x604600016b80) at dlerror.c:163
#7 0x00007ffff27992cf in __dlclose (handle=<optimized out>) at dlclose.c:47
#8 0x00007ffff347f489 in ?? () from /usr/lib64/libgmodule-2.0.so.0
#9 0x00007ffff347f602 in g_module_close () from /usr/lib64/libgmodule-2.0.so.0
#10 0x0000000000434935 in zathura_plugin_free (plugin=0x60200000e440) at plugin.c:345
#11 0x00007ffff36c9578 in g_list_foreach () from /usr/lib64/libglib-2.0.so.0
#12 0x00007ffff36c959b in g_list_free_full () from /usr/lib64/libglib-2.0.so.0
#13 0x00007ffff4c3cc2f in girara_list_clear () from /usr/lib64/libgirara-gtk3.so.1
#14 0x00007ffff4c3cc5e in girara_list_free () from /usr/lib64/libgirara-gtk3.so.1
#15 0x0000000000434385 in zathura_plugin_manager_free (plugin_manager=0x6006000039d0) at plugin.c:251
#16 0x00000000004363e8 in zathura_free (zathura=0x60300000f040) at zathura.c:300
#17 0x00000000004122e7 in main (argc=0x2, argv=0x7fffffffe0a8) at main.c:199
```
--
Antti Husa
Research Assistant, OUSPG
**Attachment 98332**, "PDF that causes heap-use-after-free":
[test.pdf](/uploads/63f107d2624329787f1c092ba7b0037d/test.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/579GNOME (evince) Bug 792943 - A single character is drawn incorrectly2018-08-22T03:39:27ZBugzilla Migration UserGNOME (evince) Bug 792943 - A single character is drawn incorrectly## Submitted by Vladimir G. Ivanovic
Assigned to **poppler-bugs**
**[Link to original bug (#105789)](https://bugs.freedesktop.org/show_bug.cgi?id=105789)**
## Description
Created attachment 138396
A PDF of a PPTX file
On p.52 of ...## Submitted by Vladimir G. Ivanovic
Assigned to **poppler-bugs**
**[Link to original bug (#105789)](https://bugs.freedesktop.org/show_bug.cgi?id=105789)**
## Description
Created attachment 138396
A PDF of a PPTX file
On p.52 of the attached PDF, the title is drawn incorrectly at some magnifications larger than 100%, the exact magnification depends on which program/library is being used (acroread, xpdf, epfdview, evince, …).
One of the reviewers of GNOME bug (https://bugzilla.gnome.org/show_bug.cgi?id=792943#c7) commented that the characters are being drawn twice, but that you might still want to Do the Right Thing (tm) and draw the characters so they overlay each other exactly … when you have the spare time, of course ;-)
**Attachment 138396**, "A PDF of a PPTX file":
[Schips-Burst_Tries.pdf](/uploads/bbd925d6257162eba79e1f29c8f2871c/Schips-Burst_Tries.pdf)