1 / 17

ColdFusion 8 and PDF Integration

ColdFusion 8 and PDF Integration. O ğuz Demirkapı Sr. Developer | TeraTech http://www.teratech.com. About Me. Sr. Application Developer at TeraTech Coding since ‘85, CGI Programm i ng since ’94 ColdFusion Developer since ’97 Founder and Manager ( prev .) of CFUG for Turkey

boaz
Download Presentation

ColdFusion 8 and PDF Integration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ColdFusion 8 andPDFIntegration Oğuz Demirkapı Sr. Developer | TeraTech http://www.teratech.com

  2. About Me • Sr. Application Developer at TeraTech • Coding since ‘85, CGI Programming since ’94 • ColdFusion Developer since ’97 • Founder and Manager (prev.) of CFUG for Turkey • Interestedin ColdFusion, Flex, Ajax, Frameworks, i18N, L10N, g13N • Have big interest in epistemology

  3. Why PDF? “Invented by Adobe Systems and perfected over 15 years,Adobe Portable Document Format (PDF) lets you capture andview robust information—from any application, on any computer system—and share it with anyone around the world. Individuals, businesses, and government agencies everywhere trust and rely on Adobe® PDF to communicate their ideas and vision." http://www.adobe.com/products/acrobat/adobepdf.html

  4. Creating PDF • CFDocument <cfdocument format="PDF" overwrite="yes"> This is my first PDF document. </cfdocument> • CFReport <cfreport template="myReport.cfr" format="PDF">

  5. Working with PDF • Tags • cfdocument, cfdocumentsection, cfdocumentitem • cfpdf, cfpdfform, cfpdfformparam, cfpdfsubform • cfprint • Functions • IsPDFFile • IsPDFObject • IsDDX

  6. Working with PDF <cfdocument format="PDF" overwrite="yes“ filename="#GetDirectoryFromPath(GetTemplatePath())#/02_cfdocument.pdf" > <cfdocumentsection name="First Section"> <cfdocumentitem type="header“><h1>TeraTech Training</h1></cfdocumentitem> <cfdocumentitem type="footer“> <cfoutput> Total Pages: #cfdocument.currentpagenumber# / #cfdocument.totalpagecount# <br /> Section Pages: #cfdocument.currentsectionpagenumber# / #cfdocument.totalsectionpagecount# </cfoutput> </cfdocumentitem> <cfloop index="loopid" from="1" to="10“><cfinclude template="tempcontent.cfm“></cfloop> </cfdocumentsection> <cfdocumentsection name="Second Section"> <cfinclude template="tempcontent.cfm"> </cfdocumentsection> </cfdocument>

  7. Working with PDF • Possibilities • Getting info about PDF file • Merging PDF files • Deleting pages from PDF files • Adding/removing Watermark • Security Settings • Thumbnail Generation from PDF files • Server Side Printing

  8. Working with PDF • Getting File Info <cfset myPDFDocument = "test.pdf"> <cfpdf action="getinfo" source="#myPDFDocument#" name="myResult"> <cfdump var="#myResult#" label="PDF Info">

  9. Working with PDF • Merging PDF Files <cfpdf action="merge" directory="#ExpandPath('.')#/myPDFFiles" destination="myFilesFromDirectory.pdf” overwrite="yes"> <cfpdf action="merge" source="#ExpandPath('.')#/myPDFFiles/test.pdf, #ExpandPath('.')#/myPDFFiles/test2.pdf" destination="myMergedPDFFiles.pdf" overwrite="yes">

  10. Working with PDF • Delete Page From PDF Files <cfpdf action="deletepages" source="test.pdf" pages="1-3" overwrite="true">

  11. Working with PDF • Add/Remove Watermark <cfpdf action="addWatermark" copyFrom="TTTraining.pdf" source="test.pdf" rotation="15“ position="100,0" foreground="true" overwrite="yes" destination="myPDFWatermark.pdf"> <cfpdf action="removewatermark" source="myPDFWatermark.pdf" destination="myPDFNoWatermark.pdf" overwrite="yes">

  12. Working with PDF • Security Settings <cfpdf action="protect" source="test.pdf" newUserPassword = "mypass" destination="mySecuredPDF.pdf" overwrite="true" > <cfpdf action="protect" source="test.pdf" newOwnerPassword="mypass" destination="mySecuredPDF2.pdf" overwrite="true" permissions="AllowAssembly, AllowFillIn, AllowModifyAnnotations, AllowModifyContents, AllowScreenReaders, AllowSecure">

  13. Working with PDF • Creating Page Thumbnails <cfpdf action="thumbnail" format="png" resolution="high" overwrite="yes" source="test.pdf" destination="#ExpandPath('.')#/thumbs" transparent="no" scale="30">

  14. Working with PDF • Server Side Printing <cfset aSet=StructNew()> <cfset aSet["paper"] = "letter"> <cfset aSet["sides"] = "duplex"> <cfset aSet["copies"] = "5"> <cfset aSet["printer"] = "\\myserver\myprinter"> <cfprint type="pdf" source="test.pdf" attributeStruct="#aSet#">

  15. PDF Forms • Populating PDF form • Prefilling PDF forms • Form embedding • Data extraction from PDF form • Adobe Acrobat forms • XML Forms Data Format (XFDF) • Adobe LiveCycle Designer • XML Forms Architecture (XFA)

  16. Resources • Adobe PDF Technology Center http://www.adobe.com/devnet/pdf/ • Livedocs http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=formsPDF_01.html • PDFUtils Custom Tag (Ray Camden) http://pdfutils.riaforge.org • MXNA (search as PDF) http://weblogs.macromedia.com/mxna/

  17. Questions & Answers? oguz@teratech.com

More Related