poppler issueshttps://gitlab.freedesktop.org/poppler/poppler/-/issues2021-02-25T22:13:36Zhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/1051CMake option ('ENABLE_CPP') being ignored2021-02-25T22:13:36ZRaleigh Littles IIICMake option ('ENABLE_CPP') being ignoredI'm trying to build the latest version of poppler (21.02.0) and I'm running into an issue where I can't seem to disable the CPP wrapper functionality.
The CMake file has this option:
```cmake
option(ENABLE_CPP "Compile poppler cpp wrap...I'm trying to build the latest version of poppler (21.02.0) and I'm running into an issue where I can't seem to disable the CPP wrapper functionality.
The CMake file has this option:
```cmake
option(ENABLE_CPP "Compile poppler cpp wrapper." ON)
```
but when I try to set it to OFF, it does not take effect. I am NOT seeing this issue happen with the other CMake settings.
The full set of CMake options I'm using for the build are here:
```make
CMAKE_PARAMS+= \
-DENABLE_QT5=OFF \
-DBUILD_QT5_TESTS=OFF \
-DENABLE_QT6=OFF \
-DBUILD_QT6_TESTS=OFF \
-DENABLE_GTK_DOC=OFF \
-DBUILD_GTK_TESTS=OFF \
-DENABLE_GOBJECT_INTROSPECTION=OFF \
-DENABLE_LIBCURL=OFF \
-DENABLE_XPDF_HEADERS=ON \
-DENABLE_CPP=OFF \
-DENABLE_CPP_TESTS=OFF \
-DRUN_GPERF_IF_PRESENT=OFF
```
The other settings seem to work as expected, except for the CPP setting.
Here's the output I get from the CMake file:
```
Building Poppler with support for:
font configuration: fontconfig
splash output: yes
cairo output: yes
qt5 wrapper: no
qt6 wrapper: no
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 libopenjpeg2: no
use lcms2: yes
use boost: yes
command line utils: yes
fuzz target: no
```
Thus the 'cpp wrapper' setting is still being enabled, even though I have it set to off.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1044Too many spaces in the pdf extraction through pdftotext utility2021-02-11T23:01:32ZZubair Uddin FarooquiToo many spaces in the pdf extraction through pdftotext utilityGetting too many spaces between text when extracted from pdf using command-line utility `utils/pdftotext`
**Command used:**
`utils/pdftotext -layout ./source_file.pdf ./text_extraction.txt`
**Actual Extraction:**
`Numéro de sécurité ...Getting too many spaces between text when extracted from pdf using command-line utility `utils/pdftotext`
**Command used:**
`utils/pdftotext -layout ./source_file.pdf ./text_extraction.txt`
**Actual Extraction:**
`Numéro de sécurité sociale (NIR) 2 8 7 0 7 9 9 3 3 5 0 7 4 2 4`
**Expected:**
Minimum spaces between numbers, especially in between the first number "2" and the second number "8" which has more spaces in comparison with others.
**PDF File: **
[cerfa_15929-01.pdf](/uploads/f3a471dd92f37cd833d071b172afea62/cerfa_15929-01.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1036poppler_annot_text_new etc leak memory2021-01-31T23:04:46ZShitikanthpoppler_annot_text_new etc leak memoryAttaching minimal example to reproduce the bug:
[memleak_example.c](/uploads/4e9935844f8ed28ead283238280bae6f/memleak_example.c)
```c++
PopplerAnnot *poppler_annot_text_new(PopplerDocument *doc, PopplerRectangle *rect)
{
Annot *anno...Attaching minimal example to reproduce the bug:
[memleak_example.c](/uploads/4e9935844f8ed28ead283238280bae6f/memleak_example.c)
```c++
PopplerAnnot *poppler_annot_text_new(PopplerDocument *doc, PopplerRectangle *rect)
{
Annot *annot;
PDFRectangle pdf_rect(rect->x1, rect->y1, rect->x2, rect->y2);
annot = new AnnotText(doc->doc, &pdf_rect);
return _poppler_annot_text_new(annot);
}
```
The problem is that at the end of poppler_annot_text_new the annot object still thinks it has two references, even though only has one.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1033PDF text forms not redering if only /V is present or /AP does not contain text.2021-02-07T22:04:15ZerikPDF text forms not redering if only /V is present or /AP does not contain text.When filling in textfields in a acroform without having an /AP field present, i think the expected behavior is to render the
context from the /V field, however currently poppler will render an empty field, or when the AP is an empty box ...When filling in textfields in a acroform without having an /AP field present, i think the expected behavior is to render the
context from the /V field, however currently poppler will render an empty field, or when the AP is an empty box it ant the /V has some contents in there it will not render the filled in text.
When running the pdf to the pdfto* tools it does report the following error:
`- Syntax Error: Can't get Fields array<0a> `
It could be that it is also somewhat a malformed pdf.[output.pdf](/uploads/84a3851a42b3dae9e6766a8ece3eddfa/output.pdf)
I have attached a pdf within this format containing some dummy data, both pdfjs and acrobat reader and at least the buildin iOS reader display this behavior of rendering the /V text, and also mupdf works fine.
This was tested with on arch with the latest poppler version (21.01.0), and the pdfs where generated using pypdf2.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1032Gray outlines around edges of transparent areas in embedded raster images2021-01-28T08:17:27ZSigurd NæssGray outlines around edges of transparent areas in embedded raster imagesThis issue is best illustrated with an example.
I generated a [5x5 png test image](/uploads/8858aefaed8822272486621410c972d3/test1.png) with transparent background and a 1 pixel wide green strip through the middle, embedded it into an [...This issue is best illustrated with an example.
I generated a [5x5 png test image](/uploads/8858aefaed8822272486621410c972d3/test1.png) with transparent background and a 1 pixel wide green strip through the middle, embedded it into an [svg](/uploads/8193bc80f7033987bb4b37a849bd031e/test1.svg), converted it to a [pdf](/uploads/6bb10be37b7228da550c9242709392f4/test1.pdf) using inkscape and then rendered it at 2000 dpi on a white background using the C++ interface of poppler 21.01. The result can be seen here:
![test1_out.png](/uploads/7f1ebfb6176065fbed21eb4d3b9db18b/test1_out.png)
Notice how the green band fades first to gray, then to white, instead of fading directly to white. (The green band is also off-center, which is a separate issue.) The same pdf file rendered with PDF.js looks like one would expect, as seen here:
![test1_out_pdfjs.png](/uploads/2bd0dea311709070796eb730cc0e5a2e/test1_out_pdfjs.png)
The gray border goes away if the original png has a white background instead of a transparent background. Here are the [input png](/uploads/d06385a033c38645f2511db08487d98a/test2.png), [svg](/uploads/538dff2cc139df22ec6afa5d9ff28865/test2.svg) and [pdf](/uploads/4b7abfb2f455d33e9d32ed0d86da7c90/test2.pdf) for this case, and the render looks like this:
![test2_out.png](/uploads/4087760f20d89e179fe21d7dc75f9dff/test2_out.png)
This test case is of course a bit contrived, but this behavior has real-world consequences. For example, a pdf figure that includes a raster contour plot with lots of thin colored curves on transparent background, will appear desaturated, especially as one zooms out.
I see the same behavior in acrobat reader too, and I hear that the chrome pdf reader also has this behavior. The only renderer I have seen with the expected behavior was PDF.js. So maybe that's the buggy one and the gray borders are expected? I hope not, as the PDF.js output is the only one that looks sensible. To check that it wasn't an inkscape bug I also tried converting the svg (which renders correctly in all the cases) to pdf using rsvg-convert too, but this did not change anything.
My guess is that the transparent pixels have a black (but invisible) color, and that the interpolation formula uncritically interpolates R, G, B and A between #00ff00ff and #00000000, resulting in intermediates like #00800080, which when alpha composited with white gives #80c080, a slightly green shade of gray. To avoid this happening, I think one would need to alpha-composite *before* interpolation instead of *after*.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1027Selection doesn't flow properly across lines in Evince2021-07-17T00:39:39Zgabrc52Selection doesn't flow properly across lines in EvinceI can reproduce this bug in Evince 3.38.0, and I was asked to report here. [Original bug](https://gitlab.gnome.org/GNOME/evince/-/issues/1546)
I have a specific PDF where selecting doesn't flow properly across lines (see the following G...I can reproduce this bug in Evince 3.38.0, and I was asked to report here. [Original bug](https://gitlab.gnome.org/GNOME/evince/-/issues/1546)
I have a specific PDF where selecting doesn't flow properly across lines (see the following GIF):
![bug gif](https://gitlab.gnome.org/GNOME/evince/uploads/575147f3e5881ae58792b40ff4ebd348/bug.gif)
This is the PDF where it's possible to reproduce the bug.
[bug.pdf](https://gitlab.gnome.org/GNOME/evince/uploads/b015446908387125af3327b66f64ff98/bug.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1026"some font thing failed" - text simply not displayed2021-02-22T03:45:38ZAndy Hairston"some font thing failed" - text simply not displayedIn some PDFs, I get an error message "some font thing failed", and the resulting image simply doesn't have the text from the PDF. These are credit card statements from Citi, so I can't post the PDF here, and I haven't seen this issue on ...In some PDFs, I get an error message "some font thing failed", and the resulting image simply doesn't have the text from the PDF. These are credit card statements from Citi, so I can't post the PDF here, and I haven't seen this issue on other PDFs (that I know of - missing text is hard to notice).
Running pdftocairo gives these errors:
Syntax Error: Embedded font file may be invalid (several times, right at the beginning)
Syntax Error: could not create type1 face (hundreds of times)
some font thing failed (hundreds of times)
Running pdftoppm gives these errors:
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
Syntax Error: Couldn't create a font for 'F5_Otl'
Syntax Error: Couldn't create a font for 'F6_Otl'
Syntax Error: Couldn't create a font for 'F7_Otl'
Syntax Error: Couldn't create a font for 'F8_Otl'
The outputs from these are attached.
pdffonts -subst reports this:
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
name object ID substitute font substitute font file
------------------------------------ --------- ------------------------------------ ------------------------------------
While I wouldn't expect poppler to be able to guess at what an invalid embedded font should look like, I *would* expect it to replace it with something else, so at least the text would show up.
![cairo-output-5](/uploads/87df9b364b48bdf8bb011b5ab3cfc88f/cairo-output-5.png)
![splash-output-5](/uploads/164aca961539969e78d80a9cf6e2717d/splash-output-5.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1025pdfinfo -struct-text and nested nonstructural marked content2021-01-06T00:09:43ZRenkemapdfinfo -struct-text and nested nonstructural marked contentI ran into a problem with `pdfinfo -struct-text`, which I think is caused by
a bug.
The [attached file](/uploads/6121203dd6488d57b26b30c22e7a2f11/poppler-bug.pdf) demonstrates the problem. Extracting the textual content gives this resu...I ran into a problem with `pdfinfo -struct-text`, which I think is caused by
a bug.
The [attached file](/uploads/6121203dd6488d57b26b30c22e7a2f11/poppler-bug.pdf) demonstrates the problem. Extracting the textual content gives this result:
```
$ pdfinfo -struct-text poppler-bug.pdf
Document
P (block)
"xxxyyy"
```
where the expected output would be:
```
Document
P (block)
"xxxyyyzzz"
```
The relevant part of the attached pdf is the page content stream:
```
3 0 obj
<< /Length 215 >>
stream
1 0 0 1 48.272 46.73 cm
/P <</MCID 0>> BDC 1 0 0 1 -48.272 -46.73 cm
BT
/F1 9.96264 Tf
1 0 0 1 48.272 46.73 Tm [(xxx)]TJ
/Span << >> BDC
1 0 0 1 64.046 46.73 Tm [(yyy)]TJ
EMC
1 0 0 1 79.82 46.73 Tm [(zzz)]TJ
ET
EMC
endstream
```
As you see, the problem is caused by a nonstructural marked content sequence
(the `/Span`) inside a marked content item (marked with `/P`). This is
explicitly allowed by the specification (see §14.7.4.1, p.560), yet somehow
cuts short pdfinfo’s text extraction function.
This is on debian unstable, with the following version:
```
$ pdfinfo -v
pdfinfo version 20.09.0
Copyright 2005-2020 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011 Glyph & Cog, LLC
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1024Not able to apply changes in pdf forms2021-01-05T11:13:11ZRaphael NestlerNot able to apply changes in pdf formsWhen editing the forms in the pdf from https://www.dndbeyond.com: [RoughL_41551338.pdf](https://gitlab.freedesktop.org/poppler/poppler/uploads/a4825c32758a5b0348e73bc9696c2c26/RoughL_41551338.pdf) the changes don't update the appearance ...When editing the forms in the pdf from https://www.dndbeyond.com: [RoughL_41551338.pdf](https://gitlab.freedesktop.org/poppler/poppler/uploads/a4825c32758a5b0348e73bc9696c2c26/RoughL_41551338.pdf) the changes don't update the appearance (but are changed when trying to edit the same field again).
If one then saves the pdf and loads it again the changed fields appear empty, but on editing shows the changed text.
Tested editors: evince and Okular.
The pdf is handled fine by the built in pdf viewer of Firefox.
### System Information
```
$ lsb_release -a
LSB Version: 1.4
Distributor ID: Arch
Description: Arch Linux
Release: rolling
Codename: n/a
$ pacman -Q poppler
poppler 21.01.0-1
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1023Build poppler 20.12 with msvc 2017 in windows error2021-01-05T07:19:43Zs0lut1onBuild poppler 20.12 with msvc 2017 in windows errorI try build poppler 20.12 with msvc 2017 in windows 10 and it work with poppler-cpp. But when I build with poppler-qt5 it return error:
> Error C2491 'Poppler::OptContentModel::staticMetaObject': definition of dllimport static data memb...I try build poppler 20.12 with msvc 2017 in windows 10 and it work with poppler-cpp. But when I build with poppler-qt5 it return error:
> Error C2491 'Poppler::OptContentModel::staticMetaObject': definition of dllimport static data member not allowed poppler-qt5
> poppler-20.12.1\build\qt5\src\poppler-qt5_autogen\include_Release\EWIEGA46WW\moc_poppler-optcontent.cpp 65
I have try to add:
> #ifdef CURRENT_MODULE
> #define DLLIMPORTEXPORT _declspec(dllexport)
> #else
> #define DLLIMPORTEXPORT _declspec(dllimport)
> #endif
But nothing work. Can someone help me with this ?https://gitlab.freedesktop.org/poppler/poppler/-/issues/1020Rendering issues with some PDF + GObject + Cairo2020-12-30T19:12:12ZJerome FleschRendering issues with some PDF + GObject + CairoHello,
I'm developing [Paperwork](https://openpaper.work) (Python+GTK), and I use Poppler to extract text from PDF files and display them.
On some (rare) PDF files, some of my users have reported getting uncaught exceptions `cairo.Err...Hello,
I'm developing [Paperwork](https://openpaper.work) (Python+GTK), and I use Poppler to extract text from PDF files and display them.
On some (rare) PDF files, some of my users have reported getting uncaught exceptions `cairo.Error: invalid value for a dash setting` when Paperwork tries to render the PDF with Poppler and Cairo. For instance: [ticket #913 on my side](https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/issues/913) ; other users have reported this very same problem too. Weirdly, the PDF is still correctly drawn on screen.
I've narrowed it down to this Python test script: [test.py](/uploads/671dff64370b916c5b96fd1c9c3d9948/test.py).
I've compiled and installed Poppler from Git (master), and I still can reproduce this issue.
The user who opened the ticket on my side [#913](https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/issues/913) has sent me by email a PDF to reproduce the problem. Unfortunately, this PDF contains personal information, so I cannot upload it on this ticket. However, [he has allowed me to share it privately](https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/issues/913#note_885907) with any Poppler developers.
The problem doesn't seem to happen with Evince, which suggests it's related to the GObject Introspection bindings.
Interestingly, if you remove the calls to `cairo_context.save()` and `cairo_context.restore()`, there are still some cairo warnings in the console, but not uncaught exception anymore.
Best regards,https://gitlab.freedesktop.org/poppler/poppler/-/issues/1019openjp2 is not linked into libpoppler.a2020-12-29T21:54:11ZOlivier Lacroixopenjp2 is not linked into libpoppler.aHello there,
I am using libvips via sharp, and have been trying to add pdf support by recompiling libvips with poppler.
This seemed to work well (ie I was able to process some pdf files), until I received the following for a particular...Hello there,
I am using libvips via sharp, and have been trying to add pdf support by recompiling libvips with poppler.
This seemed to work well (ie I was able to process some pdf files), until I received the following for a particular pdf file at run time:
`nodejs: symbol lookup error: /[...]/node_modules/sharp/build/Release/../../vendor/8.10.5/lib/libvips.so.42: undefined symbol: opj_stream_default_create`
opj_stream_default_create is defined by the openjpeg2 library I believe, and does not appear to have been linked into libpoppler.a
The build script I am using is a modified version of the sharp-libvips one, where openjpeg and poppler are compiled statically. Main modifications are highlighted [here](https://github.com/olivier-lacroix/sharp-libvips/blob/6bbc2cc7ddf6b8dc5910bdd7c80b32a01975e98c/build/lin.sh#L382-L415).
Any idea of what the problem with poppler is ? or (maybe more likely) with my build script :-) ?
Reported at [libvips](https://github.com/libvips/libvips/issues/1944) as well.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1010Change annotation icon2020-12-17T23:34:59ZDavide PozziChange annotation iconMay you please redesign or substitute the annotation icon/placeholder? <br>
As per KDE bug file https://bugs.kde.org/show_bug.cgi?id=430294
Thank you,<br>
DavidMay you please redesign or substitute the annotation icon/placeholder? <br>
As per KDE bug file https://bugs.kde.org/show_bug.cgi?id=430294
Thank you,<br>
Davidhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/1009Selecting text from annotation rect selects the wrong text2021-03-16T03:06:55ZzeidooSelecting text from annotation rect selects the wrong text**Preface:**
Using the latest code in the master branch. I have searched the issues and didn't find anything related, apologies if this is known. Also apologies if this is expected behavior. If it's not expected behavior, I'd gladly sub...**Preface:**
Using the latest code in the master branch. I have searched the issues and didn't find anything related, apologies if this is known. Also apologies if this is expected behavior. If it's not expected behavior, I'd gladly submit a PR to fix the issue.
**Problem:**
For highlight annotations, it's useful to extract the highlighted text. Annotations have their coordinates start (point 0,0) at the bottom left of the page, but it seems text selection starts at the top left of the page. At least for the glib api this is the case. Note that the annotation was done in Okular which uses the QT5 api of Poppler.
As such the following does not work:
```
char *text = poppler_page_get_text_for_area(demo->page, &amapping->area);
```
![image](/uploads/57bc490069ac3bf7813258e0483d9f46/image.png)
![image](/uploads/441d7db76d9a2cb5dde1bab5a493b561/image.png)
Nor does this (same results as the screenshots above):
```
PopplerRectangle rect;
poppler_annot_get_rectangle(amapping->annot, &rect);
char *text = poppler_page_get_text_for_area(demo->page, &rect);
```
This does get the correct text (792 is the page height):
```
PopplerRectangle rect;
poppler_annot_get_rectangle(amapping->annot, &rect);
rect.y1 = 792 - rect.y1;
rect.y2 = 792 - rect.y2;
char *text = poppler_page_get_text_for_area(demo->page, &rect);
```
![image](/uploads/9a9b41ea12497352857aa314e63da973/image.png)
![image](/uploads/0dd2bb6feaaca4b89331bf9ceafb8bc0/image.png)
**Test files**
[1.pdf](/uploads/e796b3db6309304a6c3d256657d5063e/1.pdf)
[2.pdf](/uploads/14a1901360f213b11c84e9c4785d74f5/2.pdf)
**Debug info**
![image](/uploads/a002cea96fb298cbb5ac5eaa2c6e8c10/image.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1007Feature request: command line utility for document structures2020-12-10T21:49:20ZchampignoomFeature request: command line utility for document structuresIt would be great to have a tool viewing and editing pdf structures.
Proposed functionalities:
```
pdfstructure <PDF-file> <component> [options]
Components:
table-of-contents, toc
page-numbers, num
options:
--get, -g: Print the...It would be great to have a tool viewing and editing pdf structures.
Proposed functionalities:
```
pdfstructure <PDF-file> <component> [options]
Components:
table-of-contents, toc
page-numbers, num
options:
--get, -g: Print the specified component of the pdf to stdout. This is the default behavior.
--set=file, -s: Read the component from <file> and assign it to the pdf. '-' for file means stdin.
--interactive, -i: Use $EDITOR to view and edit the component.
```
The syntax of both components should be easy to read and parse. I propose yaml as a candidate.
Examples:
```yaml
# Table of Contents
# Physical page numbers should be prefixed with "+", e.g.: +1, +2, +3, ...
# Logical page numbers should be left as is, e.g.: ii, viii, 1, 8, ...
- ii Preface
- vii Table of Contents
- 1 Chapter 1:
- 1 Section 1.1
- 6 Section 1.2
- 2 Chapter 2:
- 13 Section 2.1
- 18 Section 2.2:
- 19 Subsection 2.2.1
```
```yaml
# Page numbers
- 1-8: {from: 1, style: lower-roman} # 1: i, 2: ii, ..., 8: viii
- 9-: {from: 1} # same with {from: 1, style: decimal}; 9: 1, 10: 2, ...
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1004warning when using dynamic link on Windows2021-01-08T13:40:42Za bwarning when using dynamic link on Windows### Env
* Visual Studio 2019
* Windows 10
* poppler 20.11.0
* arch x64
### Reproduce
* code
```
#include <poppler/cpp/poppler-page.h>
int main()
{
return 0;
}
```
* warning when building
```
poppler\cpp\poppler-page.h(134,42): warn...### Env
* Visual Studio 2019
* Windows 10
* poppler 20.11.0
* arch x64
### Reproduce
* code
```
#include <poppler/cpp/poppler-page.h>
int main()
{
return 0;
}
```
* warning when building
```
poppler\cpp\poppler-page.h(134,42): warning C4251: 'poppler::text_box::m_data': class 'std::unique_ptr<poppler::text_box_data,std::default_delete<poppler::text_box_data>>' needs to have dll-interface to be used by clients of class 'poppler::text_box'
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/998poppler-cpp memory leaking on Windows for some pdf2020-12-03T05:45:03Za bpoppler-cpp memory leaking on Windows for some pdf## Env
OS: Windows 10
IDE: Visual Studio 2019
poppler: 20.11.0 x64 msvc
## Problem
Memory leak for some pdf when calling `poppler::page_renderer::render`
## Reproduce
1. Download the pdf<br>
http://www.cninfo.com.cn/new/disclosure/det...## Env
OS: Windows 10
IDE: Visual Studio 2019
poppler: 20.11.0 x64 msvc
## Problem
Memory leak for some pdf when calling `poppler::page_renderer::render`
## Reproduce
1. Download the pdf<br>
http://www.cninfo.com.cn/new/disclosure/detail?plate=szse&orgId=gssz0000672&stockCode=000672&announcementId=1207498718&announcementTime=2020-04-15<br>
Click the blue button on the top right
2. In a Visual Studio solution, include `test.h` and call the function
test.h
```
#pragma once
#include <iostream>
#include <poppler-document.h>
#include "poppler-page.h"
#include "poppler-page-renderer.h"
std::string pdf_file_path(u8"上峰水泥:2019年年度报告.PDF")
void test_poppler_memory_leak()
{
if (!poppler::page_renderer::can_render())
{
std::cerr << "can not render" << std::endl;
return;
}
poppler::document * p_doc = poppler::document::load_from_file(pdf_file_path);
int page_index = 85;
poppler::page * p_page = p_doc->create_page(page_index);
poppler::page_renderer page_render;
poppler::image poppler_img = page_render.render_page(p_page, 120, 120); // it leaks
delete p_page;
delete p_doc;
}
```
3. Leak message sample in Visual Studio 2019
```
{35684} normal block at 0x000001EA57F0CA40, 32 bytes long.
Data: <C:\Windows\Fonts> 43 3A 5C 57 69 6E 64 6F 77 73 5C 46 6F 6E 74 73
{35683} normal block at 0x000001EA57EDDC80, 16 bytes long.
Data: <p4 W > 70 34 EB 57 EA 01 00 00 00 00 00 00 00 00 00 00
{35682} normal block at 0x000001EA57EB3470, 40 bytes long.
Data: < W @ W > 80 DC ED 57 EA 01 00 00 40 CA F0 57 EA 01 00 00
{35681} normal block at 0x000001EA57F0C560, 32 bytes long.
Data: <Courier-BoldObli> 43 6F 75 72 69 65 72 2D 42 6F 6C 64 4F 62 6C 69
{35680} normal block at 0x000001EA57EDDD20, 16 bytes long.
Data: < 5 W > C0 35 EB 57 EA 01 00 00 00 00 00 00 00 00 00 00
```
## More Info
With many other pdf files, it doesn't leak, even include Chinese fonts.
It seems that some fonts lead to memory leaks.https://gitlab.freedesktop.org/poppler/poppler/-/issues/996Merging editable PDFs with pdfunite makes only the first one to be still edit...2020-11-18T10:39:43ZGustavo HenriqueMerging editable PDFs with pdfunite makes only the first one to be still editable in the final documentWhen I tried to merge with pdfunite the files listed below, that are all editable PDFs that work individually, the page corresponding to the first file in the parameters list is still editable, but the following aren't. I have changed th...When I tried to merge with pdfunite the files listed below, that are all editable PDFs that work individually, the page corresponding to the first file in the parameters list is still editable, but the following aren't. I have changed the parameters order to be sure that this was not an issue with that specific document, and it was confirmed: only the page corresponding to the first document in the parameter list is editable in the final document.
Files (original version in the [Wizards of the Coast website](https://dnd.wizards.com/products/tabletop-games/trpg-resources/trpg-resources)): [Spellcasting_Sheet__Optional__-_Form_Fillable.pdf](/uploads/20aa33724e0ed22943e5333797329c32/Spellcasting_Sheet__Optional__-_Form_Fillable.pdf), [Character_Sheet_-_Form_Fillable.pdf](/uploads/d3864173d92efbc68b981914a2734402/Character_Sheet_-_Form_Fillable.pdf), [Character_Details__Optional__-_Form_Fillable.pdf](/uploads/74df03f0ab20999807a957855fa57447/Character_Details__Optional__-_Form_Fillable.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/995DeviceGray colorspace in transparency group ignored2020-12-03T16:29:55ZTilman HausherrDeviceGray colorspace in transparency group ignoredFile is from https://bugs.ghostscript.com/show_bug.cgi?id=697354
[gs-bugzilla697354.pdf](/uploads/d2574f30ef64ccfc0e853631151db1a5/gs-bugzilla697354.pdf)
Expected:
![gs-bugzilla697354.pdf-1](/uploads/ad1d0c268136944603d17aa631e98179/gs...File is from https://bugs.ghostscript.com/show_bug.cgi?id=697354
[gs-bugzilla697354.pdf](/uploads/d2574f30ef64ccfc0e853631151db1a5/gs-bugzilla697354.pdf)
Expected:
![gs-bugzilla697354.pdf-1](/uploads/ad1d0c268136944603d17aa631e98179/gs-bugzilla697354.pdf-1.png)
Actual (pdftoppm and pdftocairo, 0.88.0 on cygwin):
![gs-bugzilla697354.pdf-1](/uploads/806996503f67a07579e8bf977f06e96e/gs-bugzilla697354.pdf-1.png)
(I think I'm mostly done now. Your project is excellent and most of what I found are obscure corner cases)https://gitlab.freedesktop.org/poppler/poppler/-/issues/994Rendering of type 1 shading with sampled function never finishes with pdftocairo2022-10-07T10:20:57ZTilman HausherrRendering of type 1 shading with sampled function never finishes with pdftocairo[FUNSH01.pdf](/uploads/89d70862cb682402543f99682740ef87/FUNSH01.pdf)
Rendering is done in a second with pdftoppm, but never finishes (I stopped after several minutes) with pdftocairo (version 21.01.0 of cygwin).[FUNSH01.pdf](/uploads/89d70862cb682402543f99682740ef87/FUNSH01.pdf)
Rendering is done in a second with pdftoppm, but never finishes (I stopped after several minutes) with pdftocairo (version 21.01.0 of cygwin).