====== PDF4Smalltalk ====== This is a Smalltalk library for PDF.\\ PDF files can be opened and all PDF objects are available as Smalltalk objects, which can be manipulated in any way you like. Likewise, any Smalltalk PDF object (net) can be written out as conforming PDF file. This is a system library implementing the PDF specification (ISO standard PDF 32000-1:2008) in Cincom's VisualWorks Smalltalk in version 7.10 and up. The syntax is covered comprehensively, which means that //any// PDF file can be read and //any// PDF object can be written in a conforming way. Most of the common PDF types are modeled explicitely as Smalltalk classes, while non-modeled types are represented by dictionaries. The library code is annotated with the original descriptions and definitions from the specification, so that learning about PDF itself is well supported. There is also a tool to inspect PDFs: the [[PDFExplorer]]. This library is for programmers who need full control over all details of PDFs. ===== Get started ===== The slides {{esug2011_slides_pdf_in_smalltalk.pdf|"PDF in Smalltalk"}} (a talk at [[http://www.esug.org/|ESUG]] 2011), give an overview of what this project is about. Load the **PDF Development** bundle from the [[StoreAccess|Cincom Public Store]] into your [[http://www.cincomsmalltalk.com/main/products/visualworks/|VisualWorks]] image. Try the [[examples|demos and examples]]. To get the latest news and to participate in discussions, subscribe to the [[http://www.freelists.org/list/pdf4st|mailing list]]. ===== Documentation ===== The {{pdf32000_2008.pdf|PDF specification}} is vast and this implementation covers only parts of it. Topics of interest: * [[PaintingAPage|Hello World]] Shows how to put text on a page. * [[Colors]] Usage of colorspaces and colors * [[Images]] Bitmapped images in PDF * [[Changing]] Changing existing PDFs * [[Implementation]] Notes the state of the implementation of the features structured along the specification chapters. * [[Typing]] PDF attributes are typed. To make use of this, the typing system was implemented. Since this is complex, it deserves its own topic. * [[PackageStructure]] Describes the structure of the bundles and packages in store and explains the meaning of it. * [[Extending]] How to add a new PDF Object to the library from the specification. * [[Porting]] Comments about issues around porting the library to another Smalltalk dialect. * [[Examples]] Various examples of Smalltalk generated PDF documents. Brief descriptions of the releases are documented in the [[History]] of the project. ===== References ===== The project was discussed in a podcast (German) from [[http://smalltalkinspect.podspot.de/post/smalltalk-in-den-charts/|Smalltalk Inspect]] (mentioned in [[http://joachimtuchel.wordpress.com/2011/11/27/smalltalk-inspect-episode-11-smalltalk-in-den-charts/|Joachims Small World]]). Bob Nemec is using the library to [[http://smalltalk-bob.blogspot.com/2012/01/pdf-report-and-law-of-demeter.html|build a report generator]]!