poppler issueshttps://gitlab.freedesktop.org/poppler/poppler/-/issues2022-07-04T15:22:07Zhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/917pdftoppm -png lossless conversion2022-07-04T15:22:07Zvstepaniukpdftoppm -png lossless conversionIs possible to get `pdftoppm -png` to do a lossless conversion of PDF images, without any antialiasing or smoothing?Is possible to get `pdftoppm -png` to do a lossless conversion of PDF images, without any antialiasing or smoothing?https://gitlab.freedesktop.org/poppler/poppler/-/issues/1258Crash again in Form::ensureFontsForAllCharacters()2022-07-03T17:39:37ZNelson Benítez LeónCrash again in Form::ensureFontsForAllCharacters()Reproducer file: [proKlima-Antrag-Formularsammlung-1655003920629nn.pdf](/uploads/03089bad291499444529d3cbe1150029/proKlima-Antrag-Formularsammlung-1655003920629nn.pdf)
Steps:
1. Open the pdf file
2. Fill some of the text input fields (l...Reproducer file: [proKlima-Antrag-Formularsammlung-1655003920629nn.pdf](/uploads/03089bad291499444529d3cbe1150029/proKlima-Antrag-Formularsammlung-1655003920629nn.pdf)
Steps:
1. Open the pdf file
2. Fill some of the text input fields (like Strabe, Telefon, etc)
3. Crash happens.
Backtrace:
```
(gdb) bt
#0 0x00007fffe4e8db32 in Form::ensureFontsForAllCharacters (this=this@entry=0x7fffd140fe30, unicodeText=unicodeText@entry=0xce1bf0, pdfFontNameToEmulate="Arial-Black", fieldResources=fieldResources@entry=0x0)
at /home/nelson/jhbuild/checkout/poppler/poppler/poppler/Form.cc:2954
#1 0x00007fffe4e8e0a4 in FormFieldText::setContentCopy (this=0x7fffd13f0c70, new_content=new_content@entry=0xce1bf0) at /home/nelson/jhbuild/checkout/poppler/poppler/poppler/Form.cc:1683
#2 0x00007fffe4e8e0c5 in FormWidgetText::setContent (this=<optimized out>, new_content=new_content@entry=0xce1bf0) at /home/nelson/jhbuild/checkout/poppler/poppler/poppler/Form.cc:425
#3 0x00007fffe5163cda in poppler_form_field_text_set_text (field=0x7fffd8010940, text=text@entry=0x4e1450 "dola") at /home/nelson/jhbuild/checkout/poppler/poppler/glib/poppler-form-field.cc:757
```
The bug is very similar to that of !1202 . Crash also happens in Okular (tested the flathub version).
Downstream issue: https://gitlab.gnome.org/GNOME/evince/-/issues/1809https://gitlab.freedesktop.org/poppler/poppler/-/issues/744Feature request: Make search being able to ignore hyphen at the end of the line2022-06-30T15:37:39ZUniverseIsProprietary2Feature request: Make search being able to ignore hyphen at the end of the lineIn a large documents there are many words with a hyphen at the end of the line. It would be good if it would be possible to include words with hyphen at the end of the line in a search results.
For example, in [this](https://www.gnu.org...In a large documents there are many words with a hyphen at the end of the line. It would be good if it would be possible to include words with hyphen at the end of the line in a search results.
For example, in [this](https://www.gnu.org/licenses/quick-guide-gplv3.pdf) PDF file we have sentence like:
> We update the GPL to protect its copyleft from being undermined by legal or technological devel(-)opments.
I would like to do a search for the word "developments" and that the search would include the word which contains hyphen at the end of the line (no need to display hyphen itself in search results).
Thank you for taking your time to read my msg.https://gitlab.freedesktop.org/poppler/poppler/-/issues/991pdftocairo fails to convert a specific PDF2022-06-27T19:15:18ZShai4shepdftocairo fails to convert a specific PDFsample pdf: https://www.math.ku.dk/english/research-files/conference-papers/CopenhagenD-Tuesday.pdf
```
pdftocairo -png -f 1 -l 1 CopenhagenD-Thursday.pdf
```
gets nothing, while
```
pdftoppm -png -f 1 -l 1 CopenhagenD-Thursday.pdf
```
...sample pdf: https://www.math.ku.dk/english/research-files/conference-papers/CopenhagenD-Tuesday.pdf
```
pdftocairo -png -f 1 -l 1 CopenhagenD-Thursday.pdf
```
gets nothing, while
```
pdftoppm -png -f 1 -l 1 CopenhagenD-Thursday.pdf
```
gets the correct image.
Reference: https://gitlab.gnome.org/GNOME/evince/-/issues/1517#note_960597https://gitlab.freedesktop.org/poppler/poppler/-/issues/1262Misrendering for a path with a gradient2022-06-27T09:57:34ZJussi PakkanenMisrendering for a path with a gradientThe attached PDF file renders incorrectly. Both Inkscape and Adobe Reader render it correctly.
I have also attached an image showing the difference between the two.
This happens with Okular on Kubuntu 22/04.
Thanks,
![renderings](/up...The attached PDF file renders incorrectly. Both Inkscape and Adobe Reader render it correctly.
I have also attached an image showing the difference between the two.
This happens with Okular on Kubuntu 22/04.
Thanks,
![renderings](/uploads/361ab5ca8a5ab81dcd4ab74f68f54db2/renderings.png)
[renderbug.pdf](/uploads/3b755897207f41410cfa3f149787634c/renderbug.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1263pdfsig: How to make self-generated certificate Trusted2022-06-24T08:39:45ZGhost Userpdfsig: How to make self-generated certificate TrustedAlongside the signature itself, I'd like to validate the certificate used to sign a pdf.
The autogenerated root certificate (Company_CA.pem) is located at `/usr/certs`
But, when I run `pdfsig -nssdir /usr/certs /usr/pdfs/file.pdf` I get:...Alongside the signature itself, I'd like to validate the certificate used to sign a pdf.
The autogenerated root certificate (Company_CA.pem) is located at `/usr/certs`
But, when I run `pdfsig -nssdir /usr/certs /usr/pdfs/file.pdf` I get:
```
- Signature Validation: Unknown Validation Failure.
NSS_Shutdown failed: NSS is not initialized.
```
Am I missing anything here?
For completion's sake if I run `pdfsig /usr/pdfs/file.pdf` I get:
```
- Signer Certificate Common Name: Sig D
- Signer full Distinguished Name: E=sig@company.com,CN=Sig D,O=Company,L=Marina Del Rey,ST=CA,C=USA
- Signing Time: Jan 11 2022 12:46:49
- Signing Hash Algorithm: SHA-256
- Signature Type: adbe.pkcs7.detached
- Signed Ranges: [0 - 115717], [120036 - 257774]
- Not total document signed
- Signature Validation: Signature is Valid.
- Certificate Validation: Certificate issuer isn't Trusted.
```
What should I do to have the issuer recognized as trusted?
I'm running
```
pdfsig -v
pdfsig version 22.02.0
Copyright 2005-2022 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011 Glyph & Cog, LLC
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1256gradient image in pdf renders incorrectly2022-06-22T09:15:31Zhack_arsenicgradient image in pdf renders incorrectlyThe image in attached pdf renders incorrectly on both poppler backends (splash and cairo). The gradient is red instead of orange and is not rendered right.
Tried with xpdf and result was correct.
[test_red.pdf](/uploads/984fe6df7534a1b7...The image in attached pdf renders incorrectly on both poppler backends (splash and cairo). The gradient is red instead of orange and is not rendered right.
Tried with xpdf and result was correct.
[test_red.pdf](/uploads/984fe6df7534a1b7a8c55c5cfebb4486/test_red.pdf)
<details><summary>adobe reader</summary>
![adobe_reader](/uploads/e16697936e0e0c6dfce53ec6ccfc1839/adobe_reader.jpg)
</details>
<details><summary>poppler rendered</summary>
![poppler_rendered](/uploads/694901684079480283e74720b0e3dd40/poppler_rendered.jpg)
</details>
<details><summary>xpdf rendered</summary>
![xpdf_rendered](/uploads/f950dabea0e1bff9ae2f943e703de722/xpdf_rendered.png)
</details>https://gitlab.freedesktop.org/poppler/poppler/-/issues/1260Cleanup cmake files2022-06-21T21:53:05ZFabian KeßlerCleanup cmake filesAll cmake files currently contain a lot of boilerplate code, which is also very old.
This leads to hardly debuggable and fixable bugs with modern cmake and for example msvc.All cmake files currently contain a lot of boilerplate code, which is also very old.
This leads to hardly debuggable and fixable bugs with modern cmake and for example msvc.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1247Missing symbols after reloading some pdf files2022-06-16T19:52:14ZibbemMissing symbols after reloading some pdf filesI use evince to view pdf files created by pdflatex. After recompiling a pdf file, evince reloads the pdf and shows the updated content.
Since version 42.2 (packaged by arch linux) the reloading of some pdf files isn't working correctly....I use evince to view pdf files created by pdflatex. After recompiling a pdf file, evince reloads the pdf and shows the updated content.
Since version 42.2 (packaged by arch linux) the reloading of some pdf files isn't working correctly. The issue is that not all symbols are displayed. (I think only new symbols are affected.) After restarting evince the new pdf looks correctly.
What works:
- The recompilation of the pdf files.
- File changes are identified.
- The pdf file is reloaded.
- The display is updated (I see some changes).
- The layout/spacing of the symbols seems to be correct.
What's the problem:
- Some symbols (I think only ones that were introduced in the new pdf) are missing.
I checked the following version for this regression:
- 22.03.0 (packaged by arch linux) does *not* have this regression
- 22.05.0 (packaged by arch linux) has this regression
- b2f48cfc89b0ef73e0eed56ca819bf6add04eb96 (compiled by myself) has this regression
- The versions suggested by `git bisect` (See the attached [git bisect log](/uploads/c6e4c355a41fa57fd8e7756c15450e3b/bisect-log))
According to `git bisect` the first bad commit is
> 11c63a7bb9bfc2c997883ba81ff5f39f81697704 Rewrite Cairo font caching without hashing the entire font
which sounds plausible to me.
The evince version used for these tests was 42.2 (packaged by arch linux).
For compilation I used the following commands:
```bash
git clone https://gitlab.freedesktop.org/poppler/poppler.git
cd poppler
mkdir build
cd build
cmake ..
make
alias my_evince='LD_PRELOAD="$(pwd)/libpoppler.so:$(pwd)/glib/libpoppler-glib.so" evince'
```
You can reproduce this issue by downloading [1.pdf](/uploads/febba9d9a13125dbf84f9f31869dcb7a/1.pdf) and [2.pdf](/uploads/bea9f36a8f39c0f29464471c26cf9baa/2.pdf) followed by issuing these commands:
```bash
cp 1.pdf test.pdf
my_evince test.pdf &
cp 2.pdf test.pdf
# close evince
my_evince test.pdf
```
Note: The issue in this example are missing brackets around the matrix.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1257Use the full gperf path to call gperf, instead of just calling gperf2022-06-16T17:15:22ZFabian KeßlerUse the full gperf path to call gperf, instead of just calling gperffind_program(GPERF gperf) can find gperf in paths distinct from the PATH ENV, the actual path is stored in GPERF. But you use gperf to call ist instead of ${GPERF}. This leads to errors, when gperf is not in the PATH ENV.find_program(GPERF gperf) can find gperf in paths distinct from the PATH ENV, the actual path is stored in GPERF. But you use gperf to call ist instead of ${GPERF}. This leads to errors, when gperf is not in the PATH ENV.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1246The top side of the glyphs of Chinese text in text annotations in Ocular with...2022-06-14T18:03:02Z林博仁(Buo-ren, Lin)The top side of the glyphs of Chinese text in text annotations in Ocular with Poppler 22.05 is partially clipped.![screenshot](/uploads/c7c0a9612842dc6c9d913f750247b83d/圖片.png)
## Bug reproduce instructions
1. Launch the latest release of [flathub Ocular](https://flathub.org/apps/details/org.kde.okular)
1. Create a text annotation, in the textbox...![screenshot](/uploads/c7c0a9612842dc6c9d913f750247b83d/圖片.png)
## Bug reproduce instructions
1. Launch the latest release of [flathub Ocular](https://flathub.org/apps/details/org.kde.okular)
1. Create a text annotation, in the textbox paste: `測試中文顯示`
1. Profit.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1240PDF is incompatible with Linux?2022-06-14T15:23:23ZEthan Glasser-CampPDF is incompatible with Linux?I had cause recently to view tax forms for New York state, available here:
https://www.tax.ny.gov/pit/ads/efile_addit201-2d.htm
Blithely disregarding the statement that "This form is not compatible with Linux operating systems", I down...I had cause recently to view tax forms for New York state, available here:
https://www.tax.ny.gov/pit/ads/efile_addit201-2d.htm
Blithely disregarding the statement that "This form is not compatible with Linux operating systems", I downloaded and tried to view both form IT-201 and form IT-2:
https://www.tax.ny.gov/pdf/current_forms/it/it201_fill_in_2d.pdf
https://www.tax.ny.gov/pdf/current_forms/it/it2_fill_in_2d.pdf
Both of these PDFs appear to have some kind of deliberate incompatibility such that when I open them with Evince, they show a yellow screen telling me that the PDF is only compatible with Adobe Reader.
Following the instructions in https://gitlab.gnome.org/GNOME/evince/-/issues/1517#note_960597, I decided to try to render the PDF using Poppler:
`pdftocairo -png -f 1 -l 1 nys\ it-2.pdf -o cairo-output`
![cairo-output-1](/uploads/15c3ba3abe2d861555479f49eb387259/cairo-output-1.png)
In Evince, although the yellow screen is shown, I can click and drag to highlight text, and what is highlit is the underlying tax form ("... return, enter spouse's name on line below ...").
The form is visible normally and appears to be editable in Firefox, although it won't let me scroll to the second page.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1255SIGABRT when finalizing a poppler document2022-06-11T20:46:46ZGaël BonithonSIGABRT when finalizing a poppler documentPoppler 22.06.0 on Arch Linux
Not reproducible, I don't think the problem comes from the calling code: https://gitlab.xfce.org/xfce/tumbler/-/blob/1e9e40da3da216f838a1c188edbdf02eae38334e/plugins/poppler-thumbnailer/poppler-thumbnailer....Poppler 22.06.0 on Arch Linux
Not reproducible, I don't think the problem comes from the calling code: https://gitlab.xfce.org/xfce/tumbler/-/blob/1e9e40da3da216f838a1c188edbdf02eae38334e/plugins/poppler-thumbnailer/poppler-thumbnailer.c#L337
Console output:
```
corrupted double-linked list
```
Backtrace:
```
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f6a6988e36c in () at /usr/lib/libc.so.6
#1 0x00007f6a6983e838 in raise () at /usr/lib/libc.so.6
#2 0x00007f6a69828535 in abort () at /usr/lib/libc.so.6
#3 0x00007f6a6988245e in () at /usr/lib/libc.so.6
#4 0x00007f6a698980cc in () at /usr/lib/libc.so.6
#5 0x00007f6a69898bf4 in () at /usr/lib/libc.so.6
#6 0x00007f6a69899ca3 in () at /usr/lib/libc.so.6
#7 0x00007f6a6989c8f3 in free () at /usr/lib/libc.so.6
#8 0x00007f6a618a45da in operator delete(void*) (ptr=<optimized out>) at /usr/src/debug/gcc/libstdc++-v3/libsupc++/del_op.cc:49
#9 0x00007f6a618a45ea in operator delete(void*, unsigned long) (ptr=<optimized out>) at /usr/src/debug/gcc/libstdc++-v3/libsupc++/del_ops.cc:33
#10 0x00007f6a47bc13d7 in std::__new_allocator<PageLabelInfo::Interval>::deallocate(PageLabelInfo::Interval*, unsigned long) (__n=<optimized out>, __p=<optimized out>, this=<optimized out>) at /usr/include/c++/12.1.0/bits/new_allocator.h:158
#11 std::allocator_traits<std::allocator<PageLabelInfo::Interval> >::deallocate(std::allocator<PageLabelInfo::Interval>&, PageLabelInfo::Interval*, unsigned long) (__n=<optimized out>, __p=<optimized out>, __a=<optimized out>) at /usr/include/c++/12.1.0/bits/alloc_traits.h:496
#12 std::_Vector_base<PageLabelInfo::Interval, std::allocator<PageLabelInfo::Interval> >::_M_deallocate(PageLabelInfo::Interval*, unsigned long) (this=<optimized out>, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/12.1.0/bits/stl_vector.h:387
#13 std::_Vector_base<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Object>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Object> > >::_M_deallocate(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Object>*, unsigned long) (__n=<optimized out>, __p=<optimized out>, this=0x7f6a41fea098) at /usr/include/c++/12.1.0/bits/stl_vector.h:383
#14 std::_Vector_base<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Object>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Object> > >::~_Vector_base() (this=0x7f6a41fea098, this=<optimized out>) at /usr/include/c++/12.1.0/bits/stl_vector.h:366
#15 std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Object>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Object> > >::~vector() (this=0x7f6a41fea098, this=<optimized out>) at /usr/include/c++/12.1.0/bits/stl_vector.h:733
#16 Dict::~Dict() (this=0x7f6a41fea090, this=<optimized out>) at /usr/src/debug/poppler-22.06.0/poppler/Dict.h:47
#17 Object::free() (this=0x7f6a402fa0b8) at /usr/src/debug/poppler-22.06.0/poppler/Object.cc:132
#18 0x00007f6a47bfd248 in Object::~Object() (this=0x7f6a402fa0b8, this=<optimized out>) at /usr/src/debug/poppler-22.06.0/poppler/Object.h:171
#19 ObjectStream::~ObjectStream() (this=0x7f6a40049ee0, this=<optimized out>) at /usr/src/debug/poppler-22.06.0/poppler/XRef.cc:221
#20 0x00007f6a47bfd4b1 in std::default_delete<ObjectStream>::operator()(ObjectStream*) const (this=<optimized out>, __ptr=0x7f6a40049ee0) at /usr/include/c++/12.1.0/bits/unique_ptr.h:89
#21 std::default_delete<ObjectStream>::operator()(ObjectStream*) const (__ptr=0x7f6a40049ee0, this=<optimized out>) at /usr/include/c++/12.1.0/bits/unique_ptr.h:89
#22 std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> >::~unique_ptr() (this=0x7f6a40312d08, this=<optimized out>) at /usr/include/c++/12.1.0/bits/unique_ptr.h:396
#23 std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >::~pair() (this=0x7f6a40312d00, this=<optimized out>) at /usr/include/c++/12.1.0/bits/stl_pair.h:185
#24 std::_Destroy<std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > > >(std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >*) (__pointer=0x7f6a40312d00) at /usr/include/c++/12.1.0/bits/stl_construct.h:151
#25 std::_Destroy_aux<false>::__destroy<std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >*>(std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >*, std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >*) (__last=0x7f6a40312d20, __first=0x7f6a40312d00) at /usr/include/c++/12.1.0/bits/stl_construct.h:163
#26 std::_Destroy<std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >*>(std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >*, std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >*) (__last=0x7f6a40312d20, __first=<optimized out>) at /usr/include/c++/12.1.0/bits/stl_construct.h:196
#27 std::_Destroy<std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >*, std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > > >(std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >*, std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >*, std::allocator<std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > > >&) (__last=0x7f6a40312d20, __first=<optimized out>) at /usr/include/c++/12.1.0/bits/alloc_traits.h:850
#28 std::vector<std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > >, std::allocator<std::pair<long long, std::unique_ptr<ObjectStream, std::default_delete<ObjectStream> > > > >::~vector() (this=0x7f6a4002f190, this=<optimized out>) at /usr/include/c++/12.1.0/bits/stl_vector.h:730
#29 PopplerCache<long long, ObjectStream>::~PopplerCache() (this=0x7f6a4002f190, this=<optimized out>) at /usr/src/debug/poppler-22.06.0/poppler/PopplerCache.h:23
#30 XRef::~XRef() (this=0x7f6a4002f130, this=<optimized out>) at /usr/src/debug/poppler-22.06.0/poppler/XRef.cc:357
#31 0x00007f6a47bd0da8 in PDFDoc::~PDFDoc() (this=0x7f6a402d6940, this=<optimized out>) at /usr/src/debug/poppler-22.06.0/poppler/PDFDoc.cc:301
#32 0x00007f6a481756c0 in poppler_document_finalize(GObject*) (object=0x7f6a40004540) at /usr/src/debug/poppler-22.06.0/glib/poppler-document.cc:677
#33 0x00007f6a69b939ef in g_object_unref () at /usr/lib/libgobject-2.0.so.0
#34 0x00007f6a481f1c73 in poppler_thumbnailer_create (thumbnailer=0x55f6b0739b40, cancellable=<optimized out>, info=0x55f6b0b42040) at poppler-thumbnailer.c:337
#35 0x000055f6aeb1e602 in tumbler_lifo_scheduler_thread (data=0x55f6b0758010, user_data=0x7f6a5c005f00) at tumbler-lifo-scheduler.c:501
#36 0x00007f6a69aa95e3 in () at /usr/lib/libglib-2.0.so.0
#37 0x00007f6a69aa6405 in () at /usr/lib/libglib-2.0.so.0
#38 0x00007f6a6988c54d in () at /usr/lib/libc.so.6
#39 0x00007f6a69911874 in clone () at /usr/lib/libc.so.6
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/130Support for GoToE links2022-06-08T16:36:36ZBugzilla Migration UserSupport for GoToE links## Submitted by Carlos Campos `@carlosgc`
Assigned to **poppler-bugs**
**[Link to original bug (#6511)](https://bugs.freedesktop.org/show_bug.cgi?id=6511)**
## Description
Since poppler already supports embedded files, it should a...## Submitted by Carlos Campos `@carlosgc`
Assigned to **poppler-bugs**
**[Link to original bug (#6511)](https://bugs.freedesktop.org/show_bug.cgi?id=6511)**
## Description
Since poppler already supports embedded files, it should also support links to
those files (Embedded Go-To Actions on page 617 of the PDF1.6 spec)https://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/1250Shapes Rendering Upside-Down2022-05-28T23:13:24ZNelson Benítez LeónShapes Rendering Upside-DownEric Scott encountered a certain kind of plot (as generated by `matplotlib`/`sns`) that, when saved to PDF, renders incorrectly in Evince, but correctly in other viewers.
This file: [2022-03_permuted_maxones_barplot_20d_w_crossover.pdf]...Eric Scott encountered a certain kind of plot (as generated by `matplotlib`/`sns`) that, when saved to PDF, renders incorrectly in Evince, but correctly in other viewers.
This file: [2022-03_permuted_maxones_barplot_20d_w_crossover.pdf](/uploads/607d7036ddb73b0809eb971ea20d451a/2022-03_permuted_maxones_barplot_20d_w_crossover.pdf)
Should render like so:\
![render_good](/uploads/76a4e637bcf51790ead763136dcf3120/render_good.png)
but instead renders like so:\
![render_bad](/uploads/4218b1050839a6a125c436a5003dd119/render_bad.png)
The issue appears to be with Evince, rather than with the `matplotlib` stack used to generate the plot. But see [discussion here](https://github.com/mwaskom/seaborn/issues/2765) in the `seaborn` issue tracker as well.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1079pdf attachment different character encoding/decoding2022-05-24T21:21:55ZYug Yorsenpdf attachment different character encoding/decodingAttachment names are encoded and decoded in some incompatible way. While pdfdetach has a commandline option for specifying the encoding, pdfattach has not. Is there a "right" and a "wrong" encoding for pdf attachment names? Or is this un...Attachment names are encoded and decoded in some incompatible way. While pdfdetach has a commandline option for specifying the encoding, pdfattach has not. Is there a "right" and a "wrong" encoding for pdf attachment names? Or is this unspecified in PDF?
$ touch Fără.txt
$ pdfattach /tmp/any.pdf Fără.txt out.pdf
$ pdfdetach -list out.pdf
1 embedded files
1: Fãrã.txthttps://gitlab.freedesktop.org/poppler/poppler/-/issues/1251Annotation cut off2022-05-16T14:51:57ZDmitry ShubinAnnotation cut offSteps to reproduce:
- Open the attached [greysheet_sample.pdf](/uploads/ec9f45bf9b1b79999748c3b73d985d95/greysheet_sample.pdf)
- Convert page 2 to svg and to png, by executing
```
pdftocairo -svg -f 2 -l 2 greysheet_sample.pdf greyshee...Steps to reproduce:
- Open the attached [greysheet_sample.pdf](/uploads/ec9f45bf9b1b79999748c3b73d985d95/greysheet_sample.pdf)
- Convert page 2 to svg and to png, by executing
```
pdftocairo -svg -f 2 -l 2 greysheet_sample.pdf greysheet_sample.pdf.p2.poppler2205.svg
pdftocairo -png -f 2 -l 2 greysheet_sample.pdf greysheet_sample.pdf.p2.poppler2205.png
```
- Expected: the watermark looks the same way in svg and png and consistent to other PDF viewers
- Actual: while the PNG output looks good, the watermark in the SVG output is cut off on right and bottom sides: [greysheet_sample.pdf.p2.poppler2205.png-02](/uploads/00bf5125f7acc9d5490e97da07f8ddd8/greysheet_sample.pdf.p2.poppler2205.png-02.png), [greysheet_sample.pdf.p2.poppler2205.svg](/uploads/03045a6d33789fbbb49ed4cba1f631dc/greysheet_sample.pdf.p2.poppler2205.svg)
![greysheet_sample.png-vs-svg](/uploads/88de1e4e8c32bc731542d887ee27c995/greysheet_sample.png-vs-svg.png)
Reproduced against poppler 22.05.0https://gitlab.freedesktop.org/poppler/poppler/-/issues/1249pdfimages won't export images in hidden elements2022-05-14T08:15:04ZSven Hessepdfimages won't export images in hidden elements**TL;DR:**
Since pdfimages works by creating a fake output device that ignore all draw calls except for images, and poppler of course doesn't issue draw calls for hidden elements, this means that pdfimages doesn't extract images on such...**TL;DR:**
Since pdfimages works by creating a fake output device that ignore all draw calls except for images, and poppler of course doesn't issue draw calls for hidden elements, this means that pdfimages doesn't extract images on such hidden elements.
There should be a way in poppler, probably to ignore or override all "hidden" settings, so that all elements are always displayed. This option can then be used by pdfimages to grab all images.
**Long explanation follows:**
Note: the PDFs I talk about are non-free/commercial in nature, so I can't provide a sample. One example is here, but again, proprietary: https://paizo.com/products/btpy8src?Pathfinder-Adventure-Path-Skull-Shackles-Interactive-Maps . Hopefully, my description is enough to give a clue on what is going on and could be done about it.
My use-case is the following: I GM several groups of Pathfinder and because of the pandemic, this has mostly shifted online now. Luckily, Paizo offers PDFs for all their Pathfinder products and I can use pdfimages to grab those images and use them in my personal games. Several PDFs I use of theirs are their "Interactive Maps", which are PDFs with several pages of battlemaps used in their adventure modules, with buttons that allow you to show/hide the grid and sometimes show/hide GM-only information (that makes them "interactive", I guess).
Now, evince or any other Linux PDF viewer don't seem to support those buttons. Clicking on them does nothing and only the gridded versions of the maps are show. When I run pdfimages over such a file, I only get the gridded versions of the map.
However, one program that runs on Linux does support the buttons: masterpdfeditor (it's a commercial program, tho, and I only used the demo version). And while it can normally save images, it can't save the images on the elements that holds the maps. But: when I use masterpdfeditor to click on a button that switches a map to the gridless version, save a copy of the PDF (which adds a watermark to the PDF in the demo version, but here it doesn't matter) and then run pdfimages on that copy, I _do_ get the gridless version of the map!
Looking at the PDF in masterpdfeditor, I can see that the way Paizo implemented that feature is a bit of a hack: those elements that hold the map, they're not image elements. Instead, they're _form_ elements, also buttons to be precise, with custom icons, and those icons are the map images. So, if you click on the button to switch display of the map from gridded to gridless, the buttons that you click has Actions on it that first shows the button that contains the gridless version of the map, then hides the button that contains the gridded version of the map, giving the illusion of switching off the grid. (And then the button you click also does the same switcheroo with itself, so the text on the button you click changes to show the changed state.)
This explains why masterpdfeditor can't save the images here: because save image is only implemented for image elements, not form buttons.
It also explains why pdfimages only grabs the current state (which I had to find out afterwards, when I looked up how pdfimages is actually implemented): for a hidden form element, there's of course no draw calls issued.
I sat down and traced pdfimages/poppler to see where the hidden state is decided, and found that the check at the top of Annot::isVisible() is responsible. Literally, this one line change "fixes" my use-case for me: https://github.com/DrMcCoy/poppler/commit/5f8ea1663e5058b2bbdf3553af4d4b1783a9c8cc . With that, pdfimages always grabs all the images in Paizo's Pathfinder Interactive Maps. (It's all from AnnotWidget, though, in case that matters.)
Now, this of course breaks normal PDF rendering, so it's of course not the correct fix. But the easy maybe-proper way, as I can see it, would be added a "overrideHidden" or something bool to the 6 or so method in the callstack there. That feels a bit...eh, and also, since there's already a few optional parameters on the functions there (Page::displaySlice(), et al), this isn't exactly "pretty".
Also, I'm not sure if there's no other places where such a change would be useful for pdfimages, if there's other elements that can be hidden that can have images on them.
**In conclusion:**
Basically, I'm throwing the ball to you here, to decide on what to do here, if anything.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1248The display is corrupted when the file is reloaded.2022-05-11T23:15:28ZSATO TatsuyaThe display is corrupted when the file is reloaded.When viewing in the PDF viewer, if you modify and reload the PDF, some of the displayed characters may be missing. This bug occurs in 22.05.0, but not in 22.03.0. (22.04.0 is unchecked.) The PDF viewers I checked are evince and zathura.
...When viewing in the PDF viewer, if you modify and reload the PDF, some of the displayed characters may be missing. This bug occurs in 22.05.0, but not in 22.03.0. (22.04.0 is unchecked.) The PDF viewers I checked are evince and zathura.
For the two attached files, first copy foo1.pdf to foo.pdf and view it in the PDF viewer. Then copy foo2.pdf to foo.pdf with this view. When the latter is reloaded, the numbers are missing.
[foo1.pdf](/uploads/3bc75ec7fcfd7e3dbaf6e33011d7d492/foo1.pdf)
[foo2.pdf](/uploads/e68394d92c8eda64bf49b88289846b5e/foo2.pdf)