![]() ImageMagick: convert -density 72 -quality 100 -verbose '/tmp/output.pdf' '/tmp/img/output-4.png'.This library originally used ImageMagick but it was discovered that ImageMagick delegates to GhostScript for PDF -> PNG conversion, so GhostScript is used directly This can be turned on by setting DEBUG=pdfppt:*, read more about Debug here Developer Guide - output is the MuPDF (mudraw) command that was executedĭebug is used for logging and there are three namespaces you can enable.err.im.convert - if any of the image cropping operations fails.done.im.convert.all - after all images are cropped.done.im.convert - after the last image of each PDF is converted.done.gs.convert- output is the GhostScript command that was executed.- after all inkscape conversions are complete.- after each inkscape conversion completes, output is the command that was executed.- powerpoint is complete in memory, all images added to slides.- output is the image directory that was deleted.- output is an array of paths to images generated from PDF.output - If there is a PNG or PPTX file generated from the event.time - if the event marks the end of a corresponding start event.The EventEmitter2 library is used, which means youĬan write a single listener for all events if you wish.Įvents emit an object that may have the following properties: default: 72, maximum value allowed is 300Įvents are emitted for any client wishing to capture timings or react to incremental artifacts.density - specifies the PPI setting for the output image.convertOptions - These are used for Ghostscript conversion.If not provided the default is to use fs.mkdtemp('$/pdf_ppt_') to generate a random temp directory.Images go in stagingDir/img and are automatically removed once the powerpoint file is generated.stagingDir - This is where the pptx file will be generated.Inkscape - Separates PDFs into single page PDFs and then converts each PDF into PNG.MuPDF - Converts a PDF into PNGs with one command per PDF.GhostScript - Converts a PDF into PNGs with one command per PDF.It is recommended you weigh the runtime performance and output quality of each engine for The binaries are installed for your runtime, they are not packaged with this module. This library currently supports three options. Slides are in the order of the PDFs passed in the arrayīased on the requirements of your application, one rendering engine may be more appropriate.Each single images is added to a slide in the powerpoint presentation.A rendering engine is used to transform each page of a PDF into a PNG image. ![]() A NPM module that accepts one or more PDF files and converts them into Powerpoint slides.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |