Difference: MupdfCppWrappers (22 vs. 23)

Revision 232021-02-05 - JulianSmith

Line: 1 to 1
 
META TOPICPARENT name="JulianSmith"
Line: 132 to 132
 
Changed:
<
<
    • added Document::lookup_metadata() method overload that returns std::string.
    • added const std::vector<std::string> metadata_keys
    • changed Outline iteration to include depth information
>
>
    • Added Document::lookup_metadata() method overload that returns std::string.
    • added global const std::vector<std::string> metadata_keys.
    • Changed Outline iteration to include depth information.
 
    • Fixed ref-counting in Page::load_links().
    • fixed Page::search_page() to return std::vector.
Changed:
<
<
    • added python wrapper for PdfDocument::page_write() out-params
    • Using improved scheme for wrapping functions/methods with out-params - instead of trying to use SWIG's typemaps, which are very clumy in the context of mupdfwrap.py and seemingly more designed for custom-written .i files, we now use simple C functions to package up out-params into a struct.
    • Make mupdf.Buffer.buffer_extract() return raw C (data, size) values; don't convert into a Python bytes, because can't find a way to convert a bytes back into (data, size) suitable for passing to mupdf.Stream constructor. [This allows us to mimic PyMuPDF-Utilities/demo/pdf-converter.py].
>
>
    • Added python wrapper for PdfDocument::page_write() out-params
    • Using improved scheme for wrapping functions/methods with out-params - instead of trying to use SWIG's typemaps, which are very clumy in the context of mupdfwrap.py and seemingly more designed for custom-written .i files, we now use simple auto-generated C functions to package up out-params into a struct, then extract into a tuple in auto-generated Python.
    • Provide two wrappers for mupdf.Buffer.buffer_extract() - return raw C (size, data) values or return a Python bytes. The former can be used to construct a mupdf.Stream constructor (doesn't seem possible to convert a Python bytes back into (size, data)). [This allows us to mimic PyMuPDF-Utilities/demo/pdf-converter.py.]
 
  • PyMuPDF has more information about links - fitz.LINK_GOTO, LINK_GOTOR, fitz.LINK_LAUNCH, fitz.LINK_URI.
  • PyMuPDF has abstraction for writing image files which calls fz_save_pixmap_as_png() or fz_save_pixmap_as_pnm() etc, depending on the filename.
Added:
>
>
  PyMuPDF: https://github.com/pymupdf/PyMuPDF-Utilities/blob/master/demo/demo.py
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 2014 Artifex Software Inc