HomeTuesday, May 23, 2017, 20:29:06
35

Convert pdf to image - mpdf

Monday, July 6, 15, 13:15:24, 2 Yaers Ago Via wain, Hits: 3968
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

Creating a CAPTCHA with PHP :: PHP Tutorial

Captcha Image, This tutorial will show you how to create a form with Captcha.

FeedBack Form with Captcha

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

Creating a Math CAPTCHA with PHP - PHP Tutorial

This tutorial will show you how to create a form with Math Captcha.

How to insert new line (IP Address) with fwrite

How to insert new line (IP Address) with fwrite, Get IP address and write to file.

PHP form with file upload

Advanced Contact Form with email and form field validation. It allows your visitors to send you an email directly from your website.

PHP Form Validation

PHP form validation :: PHP tutorial, requirement(s): PHP Server

Upload Image With PHP

[Example3] Tutorial - How to upload image in php.

PHP Fwrite : fwrite

php write to file - how to write data to a file using the php frwite function

View content in a zip file with PHP

List all files in a zip archive with PHP

PHP Links Script 1.1.

This script allows you to manage your links using a MySQL database. It features easy install, user submission, and an admin panel to add, edit and remove categories and links. The script is easy to customize to suit your needs.
About Author

wain

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