-1

I am currently building an iOS app that will be manipulating PDF documents. You will be able to type in information about yourself and the app will populate certain text fields on a document with the correct information and create a PDF that you will be able to save, share, etc.

I'm rather new to iOS programming. What are some things I should know?

Can I use Core Data with PDF's?

Can I populate a stock PDF with the info or do I have to use some other format and create a PDF from the final product.

Cody Winton
  • 2,989
  • 5
  • 25
  • 48

1 Answers1

1

You could use Core Data to store your information, but that would be separate to any PDF consideration that your app had. It may be best for your app to store the information and provide a view which shows the PDF layout, but not actually as PDF, and then allow the view to be exported as a PDF.

This answer shows how to save the view as a PDF.

Community
  • 1
  • 1
Wain
  • 118,658
  • 15
  • 128
  • 151
  • Please don't save the PDFs in Core Data. It's totally wrong to store objects with more than 100KB as blobs. – Pacu Jul 03 '13 at 03:15
  • 1
    @Pacu, I agree that the PDF probably shouldn't be stored in Core Data, but you can ask Core Data to use external file storage and it will decide of storing in a blob or a file is the most efficient on a case-by-case basis. – Wain Jul 03 '13 at 06:45
  • How can you configure that? I guess that does not apply to transformable attributes doesn't it? – Pacu Jul 03 '13 at 15:02
  • 1
    @Pacu, using `setAllowsExternalBinaryDataStorage` – Wain Jul 03 '13 at 16:09
  • Cool. Does it work with transformable attributes? – Pacu Jul 04 '13 at 13:11