Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26329

    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

    #27843

    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.

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

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

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

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘PD4ML Tips & Tricks’ is closed to new topics and replies.