First version of IFXPDFFactory for iOS is now available. It's an alpha version which means it has bugs and only the basic features are implemented but it lets you feel the API and test the concepts shown in the articles published so far.

There are 14 samples included in the samples browser application to show the features implemented so far. There is no Apple style documentation yet, but it will come.

Support for drawing images on PDF pages has been implemented. An image drawn on a PDF page is represented by the IFXPDFImage class. At this moment a PDF image can be created only from a CGImage object, later I'll add support for creating images directly from image files or memory.

After a long break and finishing the implementation of several internal details that will support the future public APIs, the library is ready to create content. For the beginning I added support for vector graphics: lines, curves, etc.

I have finished implementing support for PDF functions. Usually they are a niche feature in PDF libraries and you might wonder why did I choose to implement them in such an early stage of the development. The answer is they are heavily used for defining separation colorspaces (does Pantone colors ring a bell?), PDF smooth shadings (gradients) and for other features.

Functions in PDF represent static, self-contained numerical transformations. In general, a function can take any number (m) of input values and produce any number (n) of output values. In PDF functions, all the input values and all the output values are numbers, and functions have no side effects.

In July I started working on iFXPDFFactory, a new PDF library for iOS and OS X. It is being developed entirely in Objective-C with a native Objective-C public interface.

The reason I started this library is that there is no native Objective-C library for iOS and Mac OS X. PDFKit for Mac OS X, although has an Objective-C interface, is very limited in features and libHaru, PoDoFo and CGPDF* API are all C/C++ based so no ARC or garbage collection. PDFKit is mainly designed to display PDF files, libHaru can only create PDF files, PoDoFo can create and modify PDF files but it has to be built from source code, not a simple thing for novices, and CGPDF* API is a readonly API for reading PDF files at very low level. The graphic context on iOS/OS X lets you also create PDF files but it is limited to graphic features available in all types of graphic contexts so no standard PDF features such as annotations or form fields.

With iFXPDFFactory I plan to fix several of the problems above. It is designed specifically for iOS/OS X and being written in Objective-C lets you take advantage of ARC or garbage collection on OS X. It will support both PDF creation and editing of existing PDF files. Some of the planned PDF features are: multiple colorspaces, fonts, images, vector graphics, form XObjects, annotations, form fields, encryption, content extraction and many more.