Changelog
Copy Markdown0.2.2
- Documentation is published to HexDocs with each release.
0.2.1
- Built against libpdfium chromium/8152, whose macOS library names itself
@rpath/libpdfium.dylib.
0.2.0
Breaking changes
PDFium.load_document/1,PDFium.load_memory_document/1andPDFium.with_memory_document/2are gone. UsePDFium.open_document/2andPDFium.with_document/3, which take a path or{:bytes, contents}.PDFium.Toolboxjobs no longer take an output path.stamp,overlay,flatten,mergeandextract_pagesanswer{:ok, binary}, and the_to_binaryvariants are gone. Write the result withFile.write/2.PDFium.Toolbox.flattenalways answers with the document. It no longer answers{:ok, :nothing_to_do}.- Operations that make nothing answer
:ok:PDFium.save/3instead of{:ok, :saved},PDFium.import_pages/4instead of{:ok, :imported},PDFium.flatten_page/3instead of{:ok, :flattened}or{:ok, :nothing_to_do}. PDFium.save/3reports a failed write with the posix reason, such as{:error, :enoent}, instead of{:error, :output_open_failed}.PDFium.stamp/2stamps in place and answers:ok. The oldPDFium.stamp/4, which wrote to a path, andPDFium.stamp_in_place/2are gone. A stamp that fails now leaves the document as it was.PDFium.get_page_bitmap/3answers{:ok, {pixels, width, height}}instead of{:ok, pixels, width, height}.PDFium.get_page_sizes/1takes one document and answers a list of sizes, instead of taking a list of documents and answering a list of lists.PDFium.get_page_boxes/1reports the box a page is drawn in, its MediaBox clipped by its CropBox, instead of the bare MediaBox. The two differ only on pages with a CropBox.PDFium.create_document/0always answers{:ok, document}.:xfa_loadand:xfa_layoutare no longer load errors.PDFium.Toolboxanswers{:error, :empty_page}instead of{:error, :empty_overlay}for a page with no area.
Added
password:option toPDFium.open_document/2andPDFium.with_document/3.PDFium.Toolbox.render_pages!/2, a stream of rendered pages.- Documentation with an example for every public function.
Fixed
- Rendering a large page at a high resolution no longer overflows the size of the pixel buffer.