I'm running phantom using their rasterize example script to create a single-page pdf of a page.
I have several different pages that I would like to rasterize and concatenate into a multipage pdf file. Is this possible with what is currently there or do I have to bring a tool like pdftk into the mix?
(alternately, is there another node module that I can use for this - I found pdftk-helper but it's shall we say...unfinished)
Add to following from where you want to start a new page:
<div style="page-break-before:always;"></div>
More information about this can be found here:
http://we-love-php.blogspot.be/2012/12/create-pdf-invoices-with-html5-and-phantomjs.html
Related
Is there a way for a bunch of named anchors in a large html to be clickable within a PhantomJs generated PDF file?
I.e. say I have a table of contents or a list of FAQ questions. When clicking on the question/title - I'm taken to its answer/content within the same HTML file which is great but when the same HTML is rendered into a PDF each named anchor becomes an absolute URL (i.e. http://example.com/render.html#anchor_1) so clicking on it opens a browser with that URL instead of jumping to its content within the PDF file.
So, basically, is it possible (and how?) for a markup like this - https://fiddle.jshell.net/jyjuaaog/ to work within the generated PDF?
BTW, this works great when "printing as a PDF file" in Google Chrome but links end up broken when rendered in PhantomJs so there must be something I'm missing that I can't seem to find in the docs.
Any ideas?
Thanks!
Apparently there's a bug in PhantomJs preventing this. As suggested by PhantomJsCloud a quick-and-dirty workaround would be to replace the links with page links.
I am using DOMPDF to create a pdf out of my html page. I need to use a specific template for the pdf to be rendered on.
is there a way with DOMPDF to use a pdf template for dynamically creating an invoice?
What is the best way to handle this? Would I need to create the template with html and css?
If it's worth mentioning, I am using Zend2 and installed DOMPDF with composer
I will recommended to use zend\pdf instead of DOMPDF. First it will bit tough but later on you can get high level performance, even able to create 100 pages at one time.
Invoice generation using Zend Pdf
For your requirement dompdf is not a bad choice but
Noway you can put your template other than using HTML and CSS
given that the functionality for exporting graphs to SVG or PNG in the Neo4j server page is broken (see SO article), are there any utilities out there that can export a graph from Neo? something that would produce a PDF perhaps?
With not many changes, you could make it work with http://www.cloudformatter.com/CSS2Pdf to format the SVGs in browser to PDF. That set of pages has some d3 samples like this: http://www.cloudformatter.com/CSS2Pdf.SVGCharts.d3Charts
I took one of the sample charts and rendered to PDF through the Javascript and the remote formatter. The page I selected was here and I took one of those charts:
http://graphgist.neo4j.com/#!/gists/1428842b2170702400451777c2bc813f
The code needs some minor change to ensure that Neo4j puts the svg namespace on the element. The samples on that page do not. But the rendering is near perfect. See the web page on the right and PDF result on the left. I only formatted the SVG and not the whole page (where the silver background exists) and that seems to be the only difference.
We would like to add an image to our PDF in Orbeon. We explorered different tags and came up with tag. This worked the way we wanted but this tag keeps the PDF from building. We don't get any (visible) errors but a time-out occurs after couple of seconds.
To cross check: PDF build fine without the xh:img tag.
I was wondering what other options do we have. I thought about a PDF template but we would like to give the form author the option to choose his/hers own jpg from a web resource.
This is on 43PE.
User error yet we didn't change much after all.
I have a page of about 10 embedded PDF docs. My question is there another option that would use smaller file sizes or something so they don't bogg down the page when visited? Even convert PDF to something else if possible. Right now they are all in an accordion jquery and run with Scribd. Maybe something similar to this would work.:
scrolling text box
If you want the jqueryui to download different data for each tab you need to put an empty div inside each section and then set an on open (I am not familiar with jqueryui but maybe the activate event?) and create an ajax call to get the relevant pdf and save it to the empty div.
There are lots of questions about ajax in jqui accordion here here and here for example.