poppler issueshttps://gitlab.freedesktop.org/poppler/poppler/-/issues2023-03-07T22:24:02Zhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/1370Poppler PDF Info : Long Path Issue (OS: Window 2019 Standard)2023-03-07T22:24:02ZSujith ChandPoppler PDF Info : Long Path Issue (OS: Window 2019 Standard)Hi Team,
We have been using Poppler v21.03.0 since 2020, and recently we have migrated our application to Windows 2019. Currently we are having an issues in accessing PDF files that have 260+ characters in the file path - specific to Wi...Hi Team,
We have been using Poppler v21.03.0 since 2020, and recently we have migrated our application to Windows 2019. Currently we are having an issues in accessing PDF files that have 260+ characters in the file path - specific to Windows 2019 environment.
![image](/uploads/6c92431ba3e81a154de03ab0f3e2d1a1/image.png)
Based on MS article, in order to enable the long path behavior, both of the following conditions must be met in OS 2019 Standard:
- LongPathsEnabled is set to True ( This was already enabled as part of Server build activity )
- Application manifest must also include the longPathAware element --> PDFInfo.exe specific (Nothing to do with Server Configuration)
So we have installed Poppler v23.01.0 as well, but the result is the same. So just wanted to confirm we have the following details in the application manifest file or do we have any workaround / plan to address this issue?
Could you please give me some advice?
Ref Link : https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry
![image](/uploads/9f0a5de3a5ab81322de8c4fb78ddb3e4/image.png)
Note : We have a workaround - To specify such a long network path, use the "\\?\UNC\" as prefix. For example, "\\?\UNC\ServerName\Landing\..." . When using \\?\UNC\ in the file path, I was able to read the PDF using PDFinfo.exe. But need to confirm if we have something in backlog to address this issue or if there is any permanent solution for Windows 2019.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1348Supporting extracting CMYK planes with the Qt bindings2023-03-14T21:06:53ZamysparkSupporting extracting CMYK planes with the Qt bindingsHi,
This is the counterpart to [Krita bug 378769](https://bugs.kde.org/show_bug.cgi?id=378769). There is currently no way to extract CMYK planes from the Qt bindings, the sole way to render pages is through the various renderTo* APIs wh...Hi,
This is the counterpart to [Krita bug 378769](https://bugs.kde.org/show_bug.cgi?id=378769). There is currently no way to extract CMYK planes from the Qt bindings, the sole way to render pages is through the various renderTo* APIs which all return a RGB image.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1347is possiable to support the dataurls option on Windows use jpeg jpeg_mem_dest...2023-03-13T17:17:26Zyuyiis possiable to support the dataurls option on Windows use jpeg jpeg_mem_dest api ?simple code like this:
````
void writeImgMemory(SplashColorPtr data, int width, int height, double hDPI, double vDPI, unsigned char **mem ,unsigned long *mem_size)
{
int rowSize;
int rowPad = 4;
rowSize = width * 3;
if (r...simple code like this:
````
void writeImgMemory(SplashColorPtr data, int width, int height, double hDPI, double vDPI, unsigned char **mem ,unsigned long *mem_size)
{
int rowSize;
int rowPad = 4;
rowSize = width * 3;
if (rowSize > 0) {
rowSize += rowPad - 1;
rowSize -= rowSize % rowPad;
}
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_compress(&cinfo);
cinfo.in_color_space = JCS_RGB;
jpeg_set_defaults(&cinfo);
jpeg_mem_dest(&cinfo, mem, mem_size);
cinfo.image_width = width;
cinfo.image_height = height;
cinfo.density_unit = 1; // dots per inch
cinfo.X_density = static_cast<UINT16>(hDPI);
cinfo.Y_density = static_cast<UINT16>(vDPI);
cinfo.input_components = 3;
jpeg_set_quality(&cinfo, 100, TRUE);
cinfo.optimize_coding = false;//static_cast<boolean>(priv->optimize);
jpeg_start_compress(&cinfo, TRUE);
SplashColorPtr row;
unsigned char **row_pointers = new unsigned char *[height];
row = data;
for (int y = 0; y < height; ++y) {
row_pointers[y] = row;
row += rowSize;
}
jpeg_write_scanlines(&cinfo, row_pointers, height);
delete[] row_pointers;
jpeg_finish_compress(&cinfo);
jpeg_destroy_compress(&cinfo);
}
````https://gitlab.freedesktop.org/poppler/poppler/-/issues/1346pdftohtml last page index error2023-03-04T11:32:41Zyuyipdftohtml last page index errorversion:
pdftohtml version 22.12.0
the last page index should be 7, got 77.
![微信截图_20230301225133](/uploads/1a557aad0189137299f5b2a38b532e48/微信截图_20230301225133.png)version:
pdftohtml version 22.12.0
the last page index should be 7, got 77.
![微信截图_20230301225133](/uploads/1a557aad0189137299f5b2a38b532e48/微信截图_20230301225133.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1344pdfimages with full path not working2023-02-22T07:10:53ZHuibo Jipdfimages with full path not workingHi
When I run the following command using pdfimages, I received 99 error
pdfimages -j c:/temp/mypdf.pdf c:/temp/img
Any way to solve this?Hi
When I run the following command using pdfimages, I received 99 error
pdfimages -j c:/temp/mypdf.pdf c:/temp/img
Any way to solve this?https://gitlab.freedesktop.org/poppler/poppler/-/issues/1341Feature Request: JSON output option for pdfinfo2023-02-19T00:06:01ZEric RieseFeature Request: JSON output option for pdfinfoI just discovered `pdfinfo`. I wanted to rename a pdf to its title. `pdfinfo` extracted it beautifully. But parsing the output, while relatively easy, could have been far easier. I piped the output into `grep -Po 'Title:\s+\K.*'`. I didn...I just discovered `pdfinfo`. I wanted to rename a pdf to its title. `pdfinfo` extracted it beautifully. But parsing the output, while relatively easy, could have been far easier. I piped the output into `grep -Po 'Title:\s+\K.*'`. I didn't know about `\K`, I found that through a stackoverflow answer.
Anyway, this would have been easier if `pdfinfo` had an option to output in JSON format. Then I could have just piped the output into `jq .Title`. I know next to no `jq`, but I came up with this off the top of my head
```bash
echo '{"Title":"Foo"}' | jq .Title
"Foo"
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1340`pdftocairo` outputs broken pdfs in recent versions2023-02-17T19:12:47ZLéo Stefanesco`pdftocairo` outputs broken pdfs in recent versions`pdftocairo -pdf original.pdf output.pdf` produces broken pdf: some mathematical symbols are missing, some positions are shifted making it unreadable. As a consequence evince prints broken pdfs.
My version is `pdftocairo version 23.02.0...`pdftocairo -pdf original.pdf output.pdf` produces broken pdf: some mathematical symbols are missing, some positions are shifted making it unreadable. As a consequence evince prints broken pdfs.
My version is `pdftocairo version 23.02.0`, another computer with version `pdftocairo version 20.09.0` works.
Attached are two examples:
- example 1 ([in_ex1.pdf](/uploads/ab17e12ba1f2921901d68f94b16bc822/in_ex1.pdf), [out_ex1.pdf](/uploads/23a08df38a6b29e1372f589c1f684f72/out_ex1.pdf)): The paragraph page 10 starting with "The order of events in the sequence" has issues
- example 2 ([in_ex2.pdf](/uploads/a825298b3a11bdb1b8a9aaa976b0cce5/in_ex2.pdf), [out_ex2.pdf](/uploads/770fc11571c223e933c65dbea1dedbba/out_ex2.pdf)
): The arrows between `r` and `a` in the 1st paragraph of page 5 have disappearedhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/1339When PDF pages are rotated, poppler_page_get_image_mapping(...) in poppler-gl...2023-02-17T19:12:24ZHBJUEWhen PDF pages are rotated, poppler_page_get_image_mapping(...) in poppler-glib gets the wrong image area.![image](/uploads/bde43906da84417374bb0e026ea5e542/image.png)
As we seen, that is wrong.![image](/uploads/bde43906da84417374bb0e026ea5e542/image.png)
As we seen, that is wrong.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1338PDF printout broken2023-05-01T21:21:51ZcoogorPDF printout brokenAccording to https://bugs.kde.org/show_bug.cgi?id=465473 this is an upstream bug
Please have a look at the above bug report for example file
X1E:/home/docb # rpm -qa | grep poppler
libpoppler-qt5-1-23.01.0-2.1.x86_64
libpoppler126-23.0...According to https://bugs.kde.org/show_bug.cgi?id=465473 this is an upstream bug
Please have a look at the above bug report for example file
X1E:/home/docb # rpm -qa | grep poppler
libpoppler-qt5-1-23.01.0-2.1.x86_64
libpoppler126-23.01.0-2.1.x86_64
libpoppler-cpp0-23.01.0-2.1.x86_64
libpoppler-glib8-23.01.0-2.1.x86_64
poppler-tools-23.01.0-2.1.x86_64
poppler-data-0.4.11-1.5.noarch
I just see that 23.02. is on the way to Tumbleweed - will check once its arriveshttps://gitlab.freedesktop.org/poppler/poppler/-/issues/1334Issue writing TIFF data to pipe with pdftocairo2023-01-19T21:54:23ZAugusto StoffelIssue writing TIFF data to pipe with pdftocairoI'm able to convert a PDF page to TIFF using pdftocairo as follows:
pdftocairo -singlefile -tiff file.pdf - > file.tiff
However, if I pipe the result into another program, I error
messages like these:
TIFFAppendToStrip: Maximu...I'm able to convert a PDF page to TIFF using pdftocairo as follows:
pdftocairo -singlefile -tiff file.pdf - > file.tiff
However, if I pipe the result into another program, I error
messages like these:
TIFFAppendToStrip: Maximum TIFF file size exceeded.
TiffWriter: Error writing tiff row 2
TIFFAppendToStrip: Maximum TIFF file size exceeded.
TiffWriter: Error writing tiff row 4
TIFFAppendToStrip: Maximum TIFF file size exceeded.
TiffWriter: Error writing tiff row 6
...
and there are only 8 bytes of output. For instance:
$ pdftocairo -singlefile -tiff file.pdf - 2> /dev/null | hexdump
0000000 4949 002a 0000 0000
0000008
Is this a bug?https://gitlab.freedesktop.org/poppler/poppler/-/issues/1332Feature request: API to add file attachments2023-01-11T20:59:14ZJean Abou SamraFeature request: API to add file attachmentsIn !190, a new util was added, `pdfattach`, to add an attachment to a PDF document. As far as I can see, the API that this util uses is currently internal. I would like to request that this functionality be exposed to the GLib/C++/Qt APIs.In !190, a new util was added, `pdfattach`, to add an attachment to a PDF document. As far as I can see, the API that this util uses is currently internal. I would like to request that this functionality be exposed to the GLib/C++/Qt APIs.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1330pdfsig can't login in presence of multiple tokens2023-01-03T22:58:04ZTobias Deimingerpdfsig can't login in presence of multiple tokensTo reproduce, we need a typical smart card setup:
1. Init new NSS DB: `mkdir -p /tmp/nssdb && certutil -N -d /tmp/nssdb/`. Enter new password: "internalpw".
1. Add smart card reader to NSS via [OpenSC](https://github.com/OpenSC/OpenSC): ...To reproduce, we need a typical smart card setup:
1. Init new NSS DB: `mkdir -p /tmp/nssdb && certutil -N -d /tmp/nssdb/`. Enter new password: "internalpw".
1. Add smart card reader to NSS via [OpenSC](https://github.com/OpenSC/OpenSC): `modutil -add "OpenSC" -libfile /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so -dbdir sql:/tmp/nssdb/ -mechanisms SHA256`
1. Ensure [pcscd](https://pcsclite.apdu.fr/) is running and insert your smart card. Assume smart card PIN is "externalpw".
1. Now NSS has a "NSS Certificate DB" token plus your smart card token (say "sc0") attached. Check them with `modutil -list -dbdir /tmp/nssdb/`.
1. Try to sign with a cert from your smart card: `pdfsig -add-signature -nick 'sc0:mycert1' -nss-pwd 'internalpw' -kpw 'externalpw' -nssdir 'sql:/tmp/nssdb/' doc.pdf doc_signed.pdf`
pdfsig will fail with "Password was not accepted to open the NSS database.".
It's because prior to signing, `SignatureHandler::getAvailableSigningCertificates` is called while a password callback is registered that provides "internalpw" (code comment says "We need to call this otherwise NSS spins forever"). The function actually iterates all available tokens. We have two, and so the password callback is invoked two times. The second call of the callback is wrongly interpreted as a retry of first token, and pdfsig errors out.
Even if we fixed the retry logic, `getAvailableSigningCertificates` would still want a specific password per token, whereas the CLI provides only a global one.
MR with possible fix follows...
PS: Folks without crypto hardware can simulate it by adding a [SoftHSMv2](https://github.com/opendnssec/SoftHSMv2) module, instead of `opensc-pkcs11.so`.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1328Partially corrupt display of pdftocairo.exe SVG files2022-12-31T10:37:29ZJuerg LoefflerPartially corrupt display of pdftocairo.exe SVG filesFor the conversion from PDF to SVG I have so far used Inkscape with Poppler/Cairo Import. Now I tried it with the Windows standalone version of Poppler, but I get partly a different result. When opening the version created with the stand...For the conversion from PDF to SVG I have so far used Inkscape with Poppler/Cairo Import. Now I tried it with the Windows standalone version of Poppler, but I get partly a different result. When opening the version created with the standalone version 22.12.0 of pdftocairo.exe, everything is fine in MS Word 2019, Affinity Designer 2.0.3 and Inkscape 1.2, but in Adobe Illustrator CS 5 and in Dorico 4.3.11 (my music notation program) the rendering is incorrect. With the version created by Inkscape, the rendering is also fine in Illustrator and Dorico. What could be the reason for this? What pdftocairo.exe version does Inkscape use?
![Poppler_Importe](/uploads/960c97a3c53d27e0528e6ce24bdbabf8/Poppler_Importe.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1325Optionally do not round the corners of the highlights2022-12-10T21:17:18ZRafael BeirigoOptionally do not round the corners of the highlightsCurrently highlights are drawn with round corners:
![emacs](/uploads/9a4fc076bba5f154479a14846fd334b2/emacs.png)
Is is possible to add the option to have them drawn without rounding the corners?
![masterpdfeditor](/uploads/6c60d8bb83c...Currently highlights are drawn with round corners:
![emacs](/uploads/9a4fc076bba5f154479a14846fd334b2/emacs.png)
Is is possible to add the option to have them drawn without rounding the corners?
![masterpdfeditor](/uploads/6c60d8bb83c02f1681f0390ad8ee54f0/masterpdfeditor.png)
Thanks in advance!https://gitlab.freedesktop.org/poppler/poppler/-/issues/1318Extend media renditions (including additional actions) in Glib API2022-12-12T13:41:00ZCimbaliExtend media renditions (including additional actions) in Glib APIIn order to make a viewer that properly supports embedding media using the Glib interface, a couple of things are missing.
- access to additional actions on annotations.
This will allow in particular auto play/pause/stop etc.
- bei...In order to make a viewer that properly supports embedding media using the Glib interface, a couple of things are missing.
- access to additional actions on annotations.
This will allow in particular auto play/pause/stop etc.
- being able for a given rendition action (either from additional actions or triggered by a clicked annotation, etc.) to get the information:
1. Which screen annotation is this action targetting?
2. Which media is the action specifying?
This would allow to know where to render the rendition-speicified media, and whether it should replace the previous media displayed in that annotation, or whether it should just modify the state of the currently displayed media.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1310Appearances stream for fields with non-latin chars aren't rendered in a pdf w...2022-11-03T18:15:20ZcalixtemanAppearances stream for fields with non-latin chars aren't rendered in a pdf where /NeedAppearances is trueSTR:
- Open [multilang-form.pdf](/uploads/48dec08b05f92df0213bdfc893b39f55/multilang-form.pdf)
In evince/okular, only the field containing some latin chars is rendered:
![image](/uploads/4ce0940a552e3b32bd968d868db0b364/image.png)
Bu...STR:
- Open [multilang-form.pdf](/uploads/48dec08b05f92df0213bdfc893b39f55/multilang-form.pdf)
In evince/okular, only the field containing some latin chars is rendered:
![image](/uploads/4ce0940a552e3b32bd968d868db0b364/image.png)
But in Acrobat I get:
![image](/uploads/d2f967ead9a411a0b9dd88579e258367/image.png)
The pdf has `/NeedAppearances` set to true which means that it's up to the reader to render appearance for field elements.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1309Duplicate glyphs in SVG output2023-12-15T17:09:09ZDmitry ShubinDuplicate glyphs in SVG outputWhen running our internal tests as part of the upgrade from Popppler 21.04 to 22.10, we have noticed that some result SVG files became a bit larger. The size increase itself is not a big concern, but the underlying issue may be more impo...When running our internal tests as part of the upgrade from Popppler 21.04 to 22.10, we have noticed that some result SVG files became a bit larger. The size increase itself is not a big concern, but the underlying issue may be more important - possibly related to "Refactor CairoFontEngine caching" update.
Steps to reproduce:
- Convert the attached document [compAnno.pdf](/uploads/d4f245d1d6c8faedee445c73fe57c1c3/compAnno.pdf) to SVG, using poppler v21.04, and using v22.10
- Expected result: size of the SVG produced by v22.10 is about the same or smaller
- Actual result: size of the SVG produced by v22.10 is bigger (207 Kb vs 200 Kb)
If you look into the differences, you may notice that the SVG produced by 22.10 [compAnno.pdf.p1.22-10.svg](/uploads/000bc4d2aad4ab5f7189ecd7ea7eec1b/compAnno.pdf.p1.22-10.svg) contains more glyphs than that of 21.04 [compAnno.pdf.p1.21-04.svg](/uploads/aea33845881bb25c1ca3bdfef00fdaf4/compAnno.pdf.p1.21-04.svg): 270 vs 255. The extra glyphs in 22.10 seem to be exact duplicates of others. For example, glyph1-10 and glyph14-15 are identical.
Thank you!
Dmitryhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/1307Page # out of bounds results in "Internal Error: Illegal pageNo:" instead of ...2022-10-27T23:07:55ZSteve KelemPage # out of bounds results in "Internal Error: Illegal pageNo:" instead of explanatory error messageTrying to extract page 30 with the following command. It gets an Internal Error!
`% pdfseparate -f 30 -l 30 foo.pdf bar-%d.pdf
Internal Error: Illegal pageNo: 30(21)`
The desired page numbers are outside the page range for the file.
A ...Trying to extract page 30 with the following command. It gets an Internal Error!
`% pdfseparate -f 30 -l 30 foo.pdf bar-%d.pdf
Internal Error: Illegal pageNo: 30(21)`
The desired page numbers are outside the page range for the file.
A useful error message should be issued instead of generating an Internal Error.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1301ASCII brackets (e.g. (), [] etc) are reversed when the paragraph is RTL2022-10-15T13:26:41ZKevin SuoASCII brackets (e.g. (), [] etc) are reversed when the paragraph is RTLSteps to Reproduce:
1. Download the pdf in https://bugs.documentfoundation.org/attachment.cgi?id=182980.
2. Run the following script:
```
$ pdftotext sdext/source/pdfimport/test/testdocs/tdf104597_textrun.pdf /tmp/output.txt
$ cat /tmp/o...Steps to Reproduce:
1. Download the pdf in https://bugs.documentfoundation.org/attachment.cgi?id=182980.
2. Run the following script:
```
$ pdftotext sdext/source/pdfimport/test/testdocs/tdf104597_textrun.pdf /tmp/output.txt
$ cat /tmp/output.txt
```
Current Result:
... )ABC) DEF ] ...
Expected Result:
... (ABC) DEF [ ...
This issue was initially reported in the LibreOffice bugzilla:
https://bugs.documentfoundation.org/show_bug.cgi?id=151473https://gitlab.freedesktop.org/poppler/poppler/-/issues/1299In pdfsig, display fingerprint and other fields2022-10-14T00:39:42ZLiam MorlandIn pdfsig, display fingerprint and other fieldsIf I open a signed PDF in LibreOffice, I can see a variety of fields that are not output by pdfsig, such as the fingerprint. It would be helpful to be able to get those are part of the output.If I open a signed PDF in LibreOffice, I can see a variety of fields that are not output by pdfsig, such as the fingerprint. It would be helpful to be able to get those are part of the output.