PyMuPDF 1.24.2 Documentationdocument page is Page.get_pixmap(). A pixmap represents a raster image, so you must decide on its quality (i.e. resolution) at creation time. It cannot be changed later. PyMuPDF also offers a way to create (e-books)␣ ˓→formats,
and it is known for its top performance and rendering quality.""" # Make a PDF page for demo purposes root = os.path.abspath( f"{__file__}/..") doc = fitz Classes PyMuPDF Documentation, Release 1.24.2 5. The image is stored in the PDF at its original quality level. This may be much better than what you need for your display. Consider decreasing the image0 码力 | 565 页 | 6.84 MB | 1 年前3
PyMuPDF 1.12.2 documentationAppendix 2: Details on Text Extraction General structure of a TextPage Plain Text HTML Controlling Quality of HTML Output JSON XML XHTML Further Remarks Performance Appendix 3: Considerations on Embedded Check this out yourself and compare the various free PDF-viewers. In terms of speed and rendering quality SumatraPDF ranges at the top (apart from MuPDF’s own standalone viewer) - since it has changed its arbitrary filename like so: fitz.ConversionHeader("xml", filename = doc.name). Also see Controlling Quality of HTML Output. >>> doc = fitz.open(...) >>> ofile = open(doc.name + ".html", "w") >>> ofile.write(fitz0 码力 | 387 页 | 2.70 MB | 1 年前3
MuPDF 1.23.0 Documentationaccessibility Can copy for accessibility assemble Can manage document pages print-hq Can print high-quality 6.6. Document 93 MuPDF Documentation, Release 1.23.0 var canEdit = document.hasPermission("edit"); saveAsPNG("fileName.png"); saveAsJPEG(fileName, quality) Save the Pixmap as a JPEG. Only works for Gray, RGB and CMYK images. Arguments • fileName – String. • quality – Int. pixmap.saveAsJPEG("fileName.jpg" Returns a buffer of the Pixmap as a PAM. Returns Buffer. var buffer = pixmap.asPAM(); asJPEG(quality) Returns a buffer of the Pixmap as a JPEG. Note, if the Pixmap has an alpha channel then an exception0 码力 | 245 页 | 817.74 KB | 8 月前3
MuPDF 1.25.0 Documentationaccessibility Can copy for accessibility assemble Can manage document pages print-hq Can print high-quality var canEdit = document.hasPermission("edit"); getMetaData(key) Return various meta data information saveAsPNG("fileName.png"); saveAsJPEG(fileName, quality) Save the Pixmap as a JPEG. Only works for Gray, RGB and CMYK images. Arguments • fileName – String. • quality – Int. 7.12. Pixmap 113 MuPDF Documentation Returns a buffer of the Pixmap as a PAM. Returns Buffer. var buffer = pixmap.asPAM(); asJPEG(quality) Returns a buffer of the Pixmap as a JPEG. Note, if the Pixmap has an alpha channel then an exception0 码力 | 259 页 | 1.11 MB | 8 月前3
MuPDF 1.24.0 Documentationaccessibility Can copy for accessibility assemble Can manage document pages print-hq Can print high-quality var canEdit = document.hasPermission("edit"); getMetaData(key) Return various meta data information saveAsPNG("fileName.png"); saveAsJPEG(fileName, quality) Save the Pixmap as a JPEG. Only works for Gray, RGB and CMYK images. Arguments • fileName – String. • quality – Int. pixmap.saveAsJPEG("fileName.jpg" Returns a buffer of the Pixmap as a PAM. Returns Buffer. var buffer = pixmap.asPAM(); asJPEG(quality) Returns a buffer of the Pixmap as a JPEG. Note, if the Pixmap has an alpha channel then an exception0 码力 | 249 页 | 830.15 KB | 8 月前3
共 5 条
- 1













