PHP und HTMLdoc

Badgott

Erfahrenes Mitglied
Hallo,
Ich bin gerade dabei PHP und htmldoc für PDFs ans laufen zu bringen nur will des Patu nicht :-(

Mein PHP Code das HTMLdoc ist im gleichen dir.
Code:
 $htmldoc_binary = "htmldoc.exe";//Name of the Binary, on Windows it is maybe htmldoc.exe
$htmldoc_path = "C:\apachefriends\\xampp\\htdocs\\test_pdf\\pdf\\ht  mldoc\\";//Changes this if you want binary in other location than includes
$htmldoc = $htmldoc_path.$htmldoc_binary;
echo 'Html Doc: '.$htmldoc;

$article = 'http://heise.de';
        //echo  '<br>'.$htmldoc." --no-localfiles --datadir ".$htmldoc_path." --no-compression -t pdf13 --jpeg --webpage --header lcr --footer ./. --size a4 --left 0.5in '$article'";
        header( "Content-Type: application/pdf" );
        header( "Content-Disposition: inline; filename=\"pdf-mambo.pdf\"" );
        flush();
        passthru( $htmldoc." --no-localfiles --datadir ".$htmldoc_path." --no-compression -t pdf13 --jpeg --webpage --header lcr --footer ./. --size a4 --left 0.5in '$article'" );

Beim Aufsühren kommt ein Weißer Bildschrim mehr nicht ich bin langsam echt am verzweifeln :-(


Gruß Badgott
 
Zuletzt bearbeitet:
Probier mal Folgendes:
PHP:
<?php

	$htmldoc_binary = 'htmldoc.exe'; //Name of the Binary, on Windows it is maybe htmldoc.exe
	$htmldoc_path = 'C:\apachefriends\xampp\htdocs\test_pdf\pdf\htmldoc\\'; //Changes this if you want binary in other location than includes
	$htmldoc = $htmldoc_path.$htmldoc_binary;

	$article = 'http://heise.de/';
	header('Content-Type: application/pdf');
	header('Content-Disposition: inline; filename="pdf-mambo.pdf"');
	flush();
	passthru( $htmldoc.' --no-localfiles --datadir '.$htmldoc_path.' --no-compression -t pdf13 --jpeg --webpage --header lcr --footer ./. --size a4 --left 0.5in "'.$article.'"');
	exit;

?>
Sonst solltest du mal ins Handbuch schauen.
 
Hi erstmal Danke für die Hilfe
wenn ich die Datei jetzt ausführe dann stürtzt mit die exe von HTMLdocs ab :-(
ich habe nochmal über denn Path addslashes laufen lassen hier nochmal die Ausgabe als String:
C:\\apachefriends\\xampp\\htdocs\\test_pdf\\pdf\\htmldoc\\htmldoc.exe --no-localfiles --datadir C:\\apachefriends\\xampp\\htdocs\\test_pdf\\pdf\\htmldoc\\ --no-compression -t pdf13 --jpeg --webpage --header lcr --footer ./. --size a4 --left 0.5in ''

Hast du es so bei dir am laufen ?


Gruß Badgott
 
Hallo,
so ich habe es hinbekommen allerdings leider nicht das Gewünschte ergebniss erziehl :-(
Hat jemand evtl. Erfahrung mit Ghostscript und PHP bzw. ist dies Überhaupt möglich?

Gruß Badgott
 
Zurück