Skip to content

escl: convert get_PDF_data() to use GMappedFile and GBytes

David Ward requested to merge dpward/backends:escl-pdf-mmap into master

Instead of reading the entire file into allocated memory, use memory mapped I/O via GMappedFile. Then the file's contents can be accessed with a GBytes object.

This allows poppler_document_new_from_bytes() to be called instead of poppler_document_new_from_data(). The latter is deprecated, and using it causes a warning during compilation.

Edited by David Ward

Merge request reports

Loading