Convert HTML to TIFF in PHP
Import HTML content into presentation slides and export the result as a multipage TIFF image with Aspose.Slides for PHP via Java.
Convert HTML to TIFF in PHP
Aspose.Slides for PHP via Java can import HTML content into presentation slides and export the resulting presentation as a multipage TIFF image with a few lines of PHP code.
Aspose.Slides provides a straightforward API for HTML-to-TIFF conversion and can also export the imported content to PowerPoint, PDF, and other supported formats.
Convert HTML to TIFF using PHP
To convert HTML content to TIFF, create a Presentation, import the HTML with addFromHtml, and call save with SaveFormat::Tiff.
PHP code for converting HTML into TIFF
$presentation = new Presentation();
try {
$slides = $presentation->getSlides();
$slides->removeAt(0);
$htmlContent = file_get_contents("input.html");
$slides->addFromHtml($htmlContent);
$presentation->save("output.tiff", SaveFormat::Tiff);
} finally {
$presentation->dispose();
}
How to convert HTML to TIFF using Aspose.Slides for PHP API
These are the steps to convert HTML to TIFF in PHP.
Install Aspose.Slides for PHP via Java .
Configure Aspose.Slides in your PHP project.
Read the HTML content with
file_get_contentsand pass it toaddFromHtml.Call
savewith the output file path andSaveFormat::Tiff.
Free Online Converter
Convert HTML To Other Supported Formats
You can also convert HTML and save to other file formats. See all supported formats below: