Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Dookieman

macrumors 6502
Original poster
Oct 12, 2009
390
67
I am looking to make an iOS app that fills out a form for the field instead of writing them by hand, which would make it more manageable. My idea is to assign different text boxes e.g. "Project Name", "Date", "First Paragraph about project in the field", a Drop down menu with some standard language that is used to assess what you find in the field. Then have it transpose on top of the word document/PDF so I can print it off when I get back to the office.

I have the ability to design the layout and store the data after being written, but not sure how to "save it" to a file.
How would I approach this?

Thanks,
 

chown33

Moderator
Staff member
Aug 9, 2009
10,740
8,416
A sea of green
If your question is about saving the text-composited-atop-PDF to a file, see here:
https://developer.apple.com/library...gprintingios/GeneratingPDF/GeneratingPDF.html
The UIKit framework provides a set of functions for generating PDF content using native drawing code. These functions let you create a graphics context that targets a PDF file or PDF data object. You can then create one or more PDF pages and draw into those pages using the same UIKit and Core Graphics drawing routines you use when drawing to the screen. When you are done, what you are left with is a PDF version of what you drew.

If your question is about saving the plain textual data, which will be composited atop PDF later, then I think an NSDictionary and a plist file would work. See the NSDictionary class reference, and look for method names that start with "writeTo".
 

Dookieman

macrumors 6502
Original poster
Oct 12, 2009
390
67
If your question is about saving the text-composited-atop-PDF to a file, see here:
https://developer.apple.com/library...gprintingios/GeneratingPDF/GeneratingPDF.html
The UIKit framework provides a set of functions for generating PDF content using native drawing code. These functions let you create a graphics context that targets a PDF file or PDF data object. You can then create one or more PDF pages and draw into those pages using the same UIKit and Core Graphics drawing routines you use when drawing to the screen. When you are done, what you are left with is a PDF version of what you drew.

If your question is about saving the plain textual data, which will be composited atop PDF later, then I think an NSDictionary and a plist file would work. See the NSDictionary class reference, and look for method names that start with "writeTo".

I would like to have it "Fill it out in the background of the app" so I think pasting it on top of a PDF would be the best.

Thanks, I'll look into it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.