March 13th, 2013
Working with PDF files using the native APIs provided by iOS and Mac OSX can be a daunting task so I decided to find projects and products that will make your life easier. The list is open for updates, feel free to leave a comment if you know a PDF related project that is not on the list.
PDF Kit Apple's framework that allows you to display and manipulate PDF documents in Mac OS X applications
Apple Quartz 2D - The API from Apple for creating and viewing PDF files
MTPDF - A simple wrapper around GCGPDFDocument and CGPDFPage
PdfReportKit - a small library that helps you in the process of creating reports starting with some HTML code
PDFKitten - A framework for searching PDF documents on iOS
VFR Reader - PDF viewer framework
libHaru - open source library for generating PDF files
ZoomingPDFViewer - PDF viewer sample
PDFTouch SDK for iOS - A fast and customizable framework for rendering PDF files in your iOS apps
FastPDFKit - PDF viewer framework
PSPDFKit - PDF viewer framework
PDFTron Mobile PDF SDK - PDF viewer framework
Foxit Embedded PDF SDK for iOS - PDF viewer framework
PDFlib - PDF library for creating and editing PDF files
iANNOTATE PDF SDK - PDF viewer framework
March 12th, 2013
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.
Lets see how they work.
January 10th, 2013
In the previous post I showed the color support in IFXPDFFactory. How are these colors actually used? Pens and brushes enter the scene here.
December 20th, 2012
I finished implementing support for PDF colors and colorspaces. The following colors are supported: RGB, CMYK, Gray, CalRGB, CalGray, Indexed, Icc, Lab and Separation.
September 03rd, 2012
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.
August 13th, 2012
In the previous post I showed how PDF pages are created with iFXPDFFactory library. The default page size is Letter but it can be easily changed using the
IFXPDFDocument* doc = [[IFXPDFDocument alloc] init]; IFXPDFPage* page = [IFXPDFPage emptyPage]; [doc.pages addPage: page]; // Set page size to A4 page.width = 595; page.height = 842; [doc writeToFile: pathToPdfFile]; [doc release];
August 04th, 2012
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.
July 02nd, 2012
There are situations when we need to know if a PDF page contains, images, where on the page are the images located, what is the size on the page of a displayed image or other information about images in a PDF page.
Some of this information is available directly in the PDF file, other information needs to be computed.
April 22nd, 2011
A reader asked a me about image to PDF conversion a few days ago and I promised him an article, so here it is.
Image to PDF conversion is based on Quartz API. Using Quartz we can create PDF files and add content to them, the conversion actually means drawing the image on a PDF page.