Search code examples
iosformspdfquartz-2d

Export form data on iPad into printable PDF


I have an issue with "exporting" to PDF on an iPad. My goal is, to take all the user data, a user has passed into the app for a form. The form itself is only available as a printed form, but I have the PDF as well. The thing is, after all the data has been given by the user, the output PDF I want to create for printing has to look completely like the printed version.

I have no idea of any "best practices" around how to accomplish this efficiently. So my questions are:

  1. Do I have to draw the form completely by myself and measure out all form field components on the printed form to draw them maybe with quartz2d?
  2. Can I kind of parse the PDF I got already and read out all information to write a kind of script to transform the PDF into usable code?
  3. What are best practices for filling out a form given in a paper version only to recreate the look of the original as close as possible? the look would be absolutely essential for the users of the app.

I do not have to read out form fields from the pdf. The only goal would be:

  1. User taps on a print button in the app
  2. from the user data provided by the app form a pdf should be created looking as close as possible compared to the printed version.

Thanks for any help on this

Sebastian


Solution

  • if you are doing this for iOS5 they check Ray's article

    http://www.raywenderlich.com/6581/how-to-create-a-pdf-with-quartz-2d-in-ios-5-tutorial-part-1
    http://www.raywenderlich.com/6818/how-to-create-a-pdf-with-quartz-2d-in-ios-5-tutorial-part-2