Is there a way to trigger the PDF export feature in the pdf extension without specifying the output file with the PDF extension? We want to use the As told by Niko to give you an image buffer, Code> renderBase64 () and return the result as base64-encoded string. Use only the file system API to write some stdout from a phaptem script. I use something like this for images: I do not know if the PDF format for Where is the stdout to output the pdf.
But now it is only PNG, JPEG and GIF var base64image = page.renderBase64 ('PNG'); Var FS = Requirement ("FS"); Fs.write ("/ dev / stdout", base64image, "w");
Renderbase 64 () will be in the future version of Phantom, but with some of these lines, The job may be that you:
page.reader (output); Var FS = Requirement ("FS"); Var pdf = fs.read (output); Fs.write ("/ dev / stdout", pdf, "w"); Fs.remove (production);
Comments
Post a Comment