PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Eroor in PDF Genration:
   PostPosted: 05 Feb 2010, 08:49 
Hello Team,

First i say thanks to all your team to reply my query for previous topic.

Now when integrate PD4ml Pdf Generation Concept on my live server then an Error Is occurred: "Unhandled MIME type: “application/octet-stream" . I have use Linux server.

and write following code in to pd4ml.php

<?
if ($_SERVER["HTTPS"] != "on") {
// MS IE needs to cache PDF obtained by HTTPS.
header('Pragma: no-cache');
header('Expires: -10000');
}

if (array_key_exists('url', $_POST)) {

/*$rootDir = 'http://localhost/html_to_pdf/pd4ml_php_wrapper';
$myad = 'notepad_desien.pdf';
$fullPath = ($rootDir . '/' . $myad); */

header('Content-type: application/pdf');


//header('Content-type:application/pdf:pdf:PDF file');
//header('Content-type:application/x-pdf:pdf:PDF file');
//header('Content-disposition: inline');
header('Content-disposition: attachment; filename=notepad.pdf');

//header('Content-Disposition: attachment; filename=' . $fullPath);
//readfile($fullPath);


// Make sure that web user is allowed to write to ./stderr.txt. If not, please remove '2>stderr.txt' commend line suffix

// UNIX version
passthru('java -Xmx512m -Djava.awt.headless=true -cp .:pd4ml_demo.jar Pd4Php \'' . $_POST['url'] . '\' 840 A4 -ttf ./fonts 2>>stderr.txt');
// Windows version
//passthru('java -Xmx512m -cp .;pd4ml_demo.jar Pd4Php ' . $_POST['url'] . ' 800 A4');

} else {
echo 'invalid usage';
}
?>

Please Reply me ASAP.

Thanks in advance.

AKM


  Subject: Re: Eroor in PDF Genration:
   PostPosted: 05 Feb 2010, 17:08 
Obviously the problem is caused not by PD4ML, but by the server configuration.

Hopefully the info from the page will help:
http://www.linuxquestions.org/questions ... am-651502/



[Reply]     [ 2 posts ] 

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