Ad block is installed and active. Please support us by disabling it.
HomeSaturday, October 21, 2017, 10:36:09
35

Convert pdf to image - mpdf

Monday, July 6, 15, 13:15:24, 2 Yaers Ago Via wain, Hits: 4792
Convert pdf file to jpg with php and mpdf
Code:
<?php
include("convert/mpdf.php");
$mpdf=new mPDF('utf-8', array(216,280));
$html = '<h1>My HTML</h1>';
$filename = 'filename';
$mpdf->WriteHTML($html);
$mpdf->Output('temp/'.$filename.'.pdf','F');
$pdf_file = 'temp/'.$filename.'.pdf';
$savepath = 'temp/'.$filename.'.jpg';
$img = new imagick($pdf_file);
$img->setImageFormat('jpg');
$img->writeImage($savepath);
echo "<img src='temp/$filename.jpg' />";
exit;
?>

Sign In

Sponsor

Related

PHPBB3 Shoutbox

Vesion: 1.1. Released: 08/08/10, Licence GNU, Price: Free

PHP $_POST Function

Collect values from a form sent with method post

PHP Cookies and Sessions Tutorial

PHP Cookies and Sessions Tutorials

Jquery PHP Contact Form

This script allows your visitors to send you an email directly from your website.

Captcha V1 - Free PHP Script

An anti-spam form protection image written in PHP, Version: 1.1.

Comments 1.1. :: PHP Script

This script allows your visitors to add comments to any single page on your web site.

RSS, MySQL & Smarty

Smarty > Publishing MySQL Data in RSS 2.0

HTML Button Generator

This script will allow your visitors to create HTML Buttons online. To use the "html button generator" script completely free , the "powered by" link at the bottom of the pages must stay intact.

MySQL – Select from two tables

Select data from two tables, PHP MySQL

Contact Us 2.0. with HTML Page and Pop Up Frame

This is the same Contact Us 2.0. that is in this forum, But I have added more options to this script and a html page with a very nice pop Up frame that DONT get block by any pop Up software. Many websites use this type of script to bypass the blocking…
About Author

wain

Date Registered: Sun, Feb 8, 15
Last Time Online: Thu, Jun 15, 17
So far has created 115 entries.
wain
This author has not yet filled in any details.