Skip to content

Lightweight CI library for creating PDF files with PrinceXML

Notifications You must be signed in to change notification settings

antonigiske/CI-Prince

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

CI - PrinceXML

A very lightweight library for creating PDF files with PrinceXML via the PHP framework CodeIgniter.

It's kept very lightweight with just the basic functionality.

Create a PDF from pure HTML

$result = $this->prince->html_to_pdf('<h1>Beautiful</h1>');

// Display in browser
header('content-type: application/pdf');
echo $result;

// Or save to a file	
file_put_contents('/path/to/file', $result);

Create a PDF from a view

$result = $this->prince->view_to_pdf('create_me');

// Display in browser
header('content-type: application/pdf');
echo $result;

// Or save to a file	
file_put_contents('/path/to/file', $result);

Create a PDF from a template

$result = $this->prince->template_to_pdf('pdf_templates/create_me', array('foo' => 'bar));

// Display in browser
header('content-type: application/pdf');
echo $result;

// Or save to a file	
file_put_contents('/path/to/file', $result);

About

Lightweight CI library for creating PDF files with PrinceXML

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages