PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: How to save pdf file directly on disk
   PostPosted: 04 Feb 2010, 12:44 
I want to save PDF file directly in to the server (folder). on that time it will open a pop up to save file in to client browser.

I have seen solution on http://pd4ml.com/php.htm ,
"
If you need a generated PDF not to be sent to clients browser, but saved to the disk, add ' >/generated/file/location/file.pdf' command-line redirect and remove header('Content-type: application/pdf'); directive in pd4ml.php.
"
Please explain me briefly that where i Add '>/generated/file/location/file.pdf' (on which file).

Thanks in Advance.
AKM


  Subject: Re: How to save pdf file directly on disk
   PostPosted: 04 Apr 2010, 22:52 
By default Pd4Php outputs to STDOUT. The output can be redirected in UNIX-style to any file with ">filename" at the end of the command line.

passthru('java -Xmx512m -Djava.awt.headless=true -cp .:pd4ml_demo.jar Pd4Php \'' . 
                     $_POST['url'] . '\' 800 A4 2>>stderr.txt >/path/file.pdf');


As I remember the actual versions of Pd4Php support also "-out filename" parameter:

passthru('java -Xmx512m -Djava.awt.headless=true -cp .:pd4ml_demo.jar Pd4Php \'' . 
                     $_POST['url'] . '\' 800 A4 -out /path/file.pdf 2>>stderr.txt');


Last bumped by Anonymous on 04 Apr 2010, 22:52.



[Reply]     [ 2 posts ] 

Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share