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

    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 . '' 840 A4 -ttf ./fonts 2>>stderr.txt');
    // Windows version
    //passthru('java -Xmx512m -cp .;pd4ml_demo.jar Pd4Php ' . $_POST . ' 800 A4');
    
    } else {
    echo 'invalid usage';
    }
    ?>

    Please Reply me ASAP.

    Thanks in advance.

    AKM

    #27841

    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/linux-software-2/unhandled-mime-type-applicationoctet-stream-651502/

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

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