Closed brunogoossens closed 7 years ago
The commit didn't fix my issue. These are my settings:
$settings = [
'pdftohtml_path' => 'pdftohtml -nodrm',
'pdfinfo_path' => 'pdfinfo',
'generate' => [
'singlePage' => true, // <-- this is important
'imageJpeg' => false,
'ignoreImages' => false,
'zoom' => 1,
'noFrames' => true,
],
'clearAfter' => true,
'removeOutputDir' => true,
'outputDir' => '/vagrant/test',
'html' => [
'inlineCss' => true,
'inlineImages' => true,
'onlyContent' => true,
]
];
$pdf = new \TonchikTm\PdfToHtml\Pdf($file_path, $settings);
$html = $pdf->getHtml()->getPage(1);
When you enable single page, the output of the html filename is different.
Now, you assume that the name is going to be filename-1.html, filename-2.html but if you set singlePage to true, you get filename-html.html
The following code returns an error. https://github.com/tonchik-tm/pdf-to-html/blob/886a2f87c5080ef6c933136b1ed9c3bb8d4b995a/src/Pdf.php#L150