Generating a PDF

Costas

Administrator
Staff member
Office Style
Office Document Converter (ODC)
Is an online convertor for office document which runs as a web service. Its aim is to provide the facility of converting almost all office documents into image which make office documents viewable even without any office suite software installed on your machines.
ps: edit resources/config.php, the server must have at php.ini the allow_url_fopen true
http://github.com/chellem/Office-Document-Converter

PHPWord (2014)
Is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. The current version of PHPWord supports Microsoft Office Open XML (OOXML or OpenXML), OASIS Open Document Format for Office Applications (OpenDocument or ODF), Rich Text Format (RTF), HTML, and PDF.
http://github.com/PHPOffice/PHPWord

PHPExcel (2014)
Read, Write and Create Excel documents in PHP - Spreadsheet engine
http://phpexcel.codeplex.com/

PHPPowerPoint (2014)
Is a library written in pure PHP that provides a set of classes to write to different presentation file formats, i.e. Microsoft Office Open XML (OOXML or OpenXML) or OASIS Open Document Format for Office Applications (OpenDocument or ODF).
http://github.com/PHPOffice/PHPPowerPoint

PHPWord (2011)
Is a library written in PHP that create word documents. No Windows operating system is needed for usage because the result are docx files (Office Open XML) that can be opened by all major office software.
http://phpword.codeplex.com/


Digital Format Conversion tools enable conversion from Microsoft Word (2007+) DOCX format or HTML to EPUB, Kindle and PDF in PHP.

The tools are constructed from a range of Open Source elements, including:
  • EPub PHP class (http://www.phpclasses.org/package/6115)
  • phpMobi (https://github.com/raiju/phpMobi)
  • mPDF (http://www.mpdf1.com/mpdf/)
  • PHPDOCX (http://www.phpdocx.com/)
  • Twitter Bootstrap (http://twitter.github.com/bootstrap/)
A copy of the source code for these elements are available in /library

http://github.com/benskay/PHP-Digital-Format-Convert-Epub-Mobi-PDF

mPDF is a PHP class which generates PDF files from UTF-8 encoded HTML

http://www.mpdf1.com/mpdf/index.php

FPDFF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library

http://www.fpdf.org/
TCPDF PHP class for generating PDF documents

http://www.tcpdf.org/

unoconv convert between any document format supported by OpenOffice. Is written in python. It needs a recent LibreOffice or OpenOffice with UNO bindings.

http://dag.wiee.rs/home-made/unoconv/

Zend_Service_LiveDocx_MailMerge is a SOAP service (aka http://api.livedocx.com) that allows developers to generate word processing documents by combining structured data from PHP with a template, created in a word processor.

Template File Formats (input) : doc / docx / rtf / txd
Document File Formats (output): doc / docx / rtf / txd / html / txt / pdf

http://framework.zend.com/manual/1.12/en/zend.service.livedocx.html

talk direct to http://api.livedocx.com without the Zend -> http://www.phplivedocx.org/articles/using-livedocx-without-the-zend-framework/

stripped down version of sample#1
a test.docx must be near php file, with fields applied aka
snap169.png

JavaScript:
<?php
// Turn up error reporting
//error_reporting (E_ALL|E_STRICT);
 
// Turn off WSDL caching
ini_set ('soap.wsdl_cache_enabled', 0);
 
// Define credentials for LD
dsefine ('USERNAME', 'x'); //your username
define ('PASSWORD', 'x'); //your password <- register to their portal first www.livedocx.com
 
// SOAP WSDL endpoint
define ('ENDPOINT', 'https://api.livedocx.com/1.2/mailmerge.asmx?WSDL');
 
// Define timezone
date_default_timezone_set('Europe/Berlin');
 
print('Starting sample #1 (license-agreement)...');
 
// Instantiate SOAP object and log into LiveDocx
 
$soap = new SoapClient(ENDPOINT);
 
$soap->LogIn(
    array(
        'username' => USERNAME,
        'password' => PASSWORD
    )
);
 
// Upload template
 
$data = file_get_contents('test.doc');
//license-agreement-template.docx');

$soap->SetLocalTemplate(
    array(
        'template' => base64_encode($data),
        'format'   => 'docx'
    )
);
 
// Assign data to template
 
$fieldValues = array (
    'software' => 'x',
    'licensee' => 'x',
    'company'  => 'x Co-Operation',
    'date'     => date('F d, Y'),
    'time'     => date('H:i:s'),
    'city'     => 'x',
    'country'  => 'x'
);
 
$soap->SetFieldValues(
    array (
        'fieldValues' => assocArrayToArrayOfArrayOfString($fieldValues)
    )
);
 
// Build the document
 
$soap->CreateDocument();
 
// Get document as PDF
 
$result = $soap->RetrieveDocument(
    array(
        'format' => 'pdf'
    )
);
 
$data = $result->RetrieveDocumentResult;
 //echo $result;
  

//write near test.docx 
file_put_contents('test.pdf', base64_decode($data));
?>


 
jsPDF a HTML5 client-side solution for generating PDFs. Perfect for event tickets, reports, certificates, you name it!
https://parall.ax/products/jspdf

 
flip.swf
http://bit.ly/1vv5Cn0
http://www.boxoft.com/pdf-to-flash/
Provides a quick and easy way to batch convert ordinary PDF files into stunning Flash & HTML5 - See more at: http://www.flipbuilder.com/flip-pdf/

 
iPaper

homepage - http://www.ipaper-cms.com/
sample - http://tupperware.ipapercms.dk/Tupperware/Greece/2014/TW14AWGR/
 
Top