Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
g_strdup is a macro and thus the intermediate getSignerName() value would be destructed after the first line of code in the macro
|
|
|
|
not manual strdup/free
|
|
|
|
Found by
https://sonarcloud.io/project/overview?id=tsdgeos_poppler_mirror
|
|
|
|
|
|
|
|
Creates new PopplerAnnotStamp type with the
following public api:
PopplerAnnot *poppler_annot_stamp_new(PopplerDocument *doc, PopplerRectangle *rect);
PopplerAnnotStampIcon poppler_annot_stamp_get_icon(PopplerAnnotStamp *poppler_annot);
void poppler_annot_stamp_set_icon(PopplerAnnotStamp *poppler_annot, PopplerAnnotStampIcon icon);
gboolean poppler_annot_stamp_set_custom_image(PopplerAnnotStamp *poppler_annot, cairo_surface_t *image, GError **error);
Updates poppler-glib-demo to test PopplerAnnotStamp
including the custom image support.
|
|
|
|
Fix for a bug in double column documents where some
single line matches are wrongly returned as being
multiline matches.
Includes test case for the bug.
|
|
|
|
Simpler code to use and solves the int vs size_t mismatch by not having a
type involved at all
|
|
Simpler code to use and solves the int vs size_t mismatch by not having a
type involved at all
|
|
|
|
It was unused everywhere except in CurlCachedFileLoader, but there we
can just pass it in the constructor.
The use in one of the two glib cases was a memory leak
|
|
|
|
Someone needs to own the GooFile that's referenced by FileStream. Add a
simple OwningFileStream class that does that.
Fixes: https://gitlab.freedesktop.org/poppler/poppler/-/issues/1227
|
|
|
|
|
|
Sadly uncovers a memory leak on poppler_document_new_from_fd
|
|
They go out of scope as soon as the function returns
|
|
Makes it clear the result is never null
|
|
This was double deleting on the glib side
|
|
This was double deleting on the glib side
|
|
This saves some memory allocations, because the strings are now
stored by value rather than by a pointer pointing to the heap.
Also, the costum copy constructor can be replaced by the default
one with this change.
|
|
Well, there's some pthread code still in pdftoppm but it's "test"
related, and should just be ported to C++11 threads
|
|
Makes it clearer that we're not taking ownership of them
|
|
|
|
Makes it clear that it will own the given GooString
|
|
Makes it clear it's not going to be destructed and that it can't be null
|
|
|
|
|
|
|
|
Allow the user to add its own parameters such as
--includedir=$(STAGING_DIR)/usr/share/gir-1.0 to
INTROSPECTION_COMPILER_ARGS to avoid the following build failure when
cross-compiling with buildroot:
[ 98%] Generating Poppler-0.18.typelib
Could not find GIR file 'GObject-2.0.gir'; check XDG_DATA_DIRS or use --includedir
error parsing file /home/giuliobenetti/autobuild/run/instance-1/output-1/build/poppler-21.12.0/glib/Poppler-0.18.gir: Failed to parse included gir GObject-2.0
If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help.
Typically like this: PKG_MAKE_ENV += GIR_EXTRA_LIBS_PATH="$(@D)/.libs"
Fixes:
- http://autobuild.buildroot.org/results/d2f50aa56410c2fff8a0538c57038104906e747e
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
This commit adds new method poppler_document_get_signature_fields()
which returns GList of all signature fields for the document.
This is needed as some documents have signature fields which are not
associated to any page and hence are unaccessible now.
|
|
glib-mkenums is a python script and you can't tell Windows to run those,
so tell windows to run python with glib-mkenums as script to run
|
|
when opening encrypted files in below functions.
poppler_document_new_from_file():
poppler_document_new_from_data():
poppler_document_new_from_bytes():
poppler_document_new_from_stream():
poppler_document_new_from_fd():
Poppler-glib converts password to latin1 before opening,
but as shown in issue #824 there could be files encrypted
with a UTF8 password, and other pdf viewers handle this
well, so let's do the same and try with UTF-8 if latin1
fails. Note: we originally receive the password in UTF-8
from GTK.
Thanks @aacid for clue about how this was fixed in Okular side.
Fixes issue #824
|
|
They don't compile, and are not useful on windows anyway. Remove the
functions completely, not just stub out their implementation, since
otherwise the API contract of consuming the FD would be violated.
https://gitlab.freedesktop.org/poppler/poppler/-/issues/1180
|
|
Makes clear that the ownership is transferred
|
|
This code leaked a GooString each time it was called.
==1018012== 56 (32 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 11,042 of 19,178
==1018012== at 0x4841FF5: operator new(unsigned long) (vg_replace_malloc.c:422)
==1018012== by 0x1EFE8DA5: copy (GooString.h:104)
==1018012== by 0x1EFE8DA5: Object::copy() const (Object.cc:52)
==1018012== by 0x1EFE8EE8: Object::fetch(XRef*, int) const (Object.cc:78)
==1018012== by 0x1EF6C0C7: Dict::lookup(char const*, int) const (Dict.cc:167)
==1018012== by 0x1EFF5592: dictLookup (Object.h:622)
==1018012== by 0x1EFF5592: PDFDoc::getDocInfoStringEntry(char const*) (PDFDoc.cc:779)
==1018012== by 0x1EA00E71: getDocInfoCreatDate (PDFDoc.h:277)
==1018012== by 0x1EA00E71: poppler_document_get_creation_date_time (poppler-document.cc:1596)
|
|
Use g_time_zone_new_identifier() instead.
|
|
g_memdup() is deprecated. Replace it with straight malloc + memcpy. This
fixes two compile warnings with newer glib (>= 2.68).
|
|
When fdopen fails, the file descriptor must be closed manually so it
doesn't leak.
|
|
Include glib.h which provides G_OS_WIN32.
https://gitlab.freedesktop.org/poppler/poppler/-/issues/1180
|
|
|
|
... and *not* the (nullptr) file.
https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/995
|
|
|
|
There was a missing colon right after argument name.
|