It would be wonderful if Couch could automatically create a downloadable PDF file of a page - or sequence of pages. Many CMSs - specially wiki-flavoured ones - have this capability. It comes in handy for various applications, such as creating downloadable receipts, or creating customised printable content for members (like certificates or stationery).
There are a couple of powerful open-source php PDF libraries out there, who do not depend on other
libraries being pre-installed or compiled - they work with php "out-of-the-box". They are:
TCPDF - extremely powerful and LGPL Licensed:
http://www.tcpdf.org
FPDF - not as full-featured, but easier to use and has an even more permissive license:
http://www.fpdf.org
The way I imagine it could work, would be through a 'pages'-like tag, which would generate a link to the downloadable pdf file. For instance, to generate a link to download an automatically generated pdf file of the receipt currently being viewed by the user:
An extra parameter could be used to set the page size of the outputted document:
To output a pdf version of the entire documentation for 'version 1.4.5' of some software, set on A5 size in landscape, we could use:
Perhaps this is something that could be considered for Couch version 2.0?,,,
There are a couple of powerful open-source php PDF libraries out there, who do not depend on other
libraries being pre-installed or compiled - they work with php "out-of-the-box". They are:
TCPDF - extremely powerful and LGPL Licensed:
http://www.tcpdf.org
FPDF - not as full-featured, but easier to use and has an even more permissive license:
http://www.fpdf.org
The way I imagine it could work, would be through a 'pages'-like tag, which would generate a link to the downloadable pdf file. For instance, to generate a link to download an automatically generated pdf file of the receipt currently being viewed by the user:
- Code: Select all
<cms:pdf masterpage='receipt.php' page_name=k_page_title />
An extra parameter could be used to set the page size of the outputted document:
- Code: Select all
<cms:pdf masterpage='receipt.php' page_name=k_page_title page_size='A4' />
To output a pdf version of the entire documentation for 'version 1.4.5' of some software, set on A5 size in landscape, we could use:
- Code: Select all
<cms:pdf masterpage='doc.php' folder_name='Version 1.4.5" page_size='A5' landscape=1 />
Perhaps this is something that could be considered for Couch version 2.0?,,,