In addition to these Terms, the Services may be governed by additional agreements or such other terms as may be issued by Snappy from time to time (“Services Terms”). These Snappy General Terms of Use (“ Terms”) govern your use of the Snappy app or the Snappy website located at, or any apps or websites accessible therefrom (collectively, the “ Website”) and the services provided through the Website, or any use thereof (the “ Services”). (referred herein as " we", " us", " our" and " Snappy"). Snappy has been originally developed by the KnpLabs team.The Website and Services (each as defined below) are provided to you (“ you”, " your" or “ User”) by Snappy App, Inc. We’ll be glad to hear from you :) Credits If you are interested, feel free to open a PR to ask to be added as a maintainer. KNPLabs is looking for maintainers ( see why). If your reproducer is big, please try to shrink it. A complete reproducer with relevant php and html/css/js code.Wkhtmltopdf, its version and how you installed it.If you need some help, please at least provide a complete reproducer so we could help you based on facts rather than assumptions. If you found a bug please fill a detailed issue with all the following points. $snappy->generateFromHtml('Some content', 'test.pdf') $snappy->setOption('xsl-style-sheet', ' //or local file $ composer require h4cc/wkhtmltoimage-amd64 0.12.xĪnd then you can use it setOption('toc', true) Or this if you are in 64 bit based system: $ composer require h4cc/wkhtmltopdf-amd64 0.12.x $ composer require h4cc/wkhtmltoimage-i386 0.12.x If you want to download wkhtmltopdf and wkhtmltoimage with composer you add to composer.json: $ composer require h4cc/wkhtmltopdf-i386 0.12.x Wkhtmltopdf binary as composer dependencies $snappy = new Pdf('/usr/local/bin/wkhtmltopdf') Options can be reset to their initial values with resetOptions() method. $snappy->setOption('cache-dir', '/path/to/cache/dir') $snappy->setOption('cover', 'Bill cover') $snappy->setOption('cover', 'pathToCover.html') $snappy->setOption('post', array('key' => 'value')) $snappy->setOption('no-background', true) $snappy->setOption('disable-javascript', true) Pass options to snappy // Type wkhtmltopdf -H to see the list of options $snappy->generateFromHtml('BillYou owe me money, dude.', '/tmp/bill-123.pdf') Generate local pdf file $snappy = new Pdf('/usr/local/bin/wkhtmltopdf') Merge multiple urls into one pdf $snappy = new Pdf('/usr/local/bin/wkhtmltopdf') Įcho $snappy->getOutput(array('','','')) Header('Content-Disposition: attachment filename="file.pdf"') Usage Initialization setBinary('/usr/local/bin/wkhtmltopdf') ĭisplay the pdf in the browser $snappy = new Pdf('/usr/local/bin/wkhtmltopdf') ĭownload the pdf from the browser $snappy = new Pdf('/usr/local/bin/wkhtmltopdf') Installation using Composer $ composer require knplabs/knp-snappy
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |