What is the best approach for changing margins of an interactive PDF form in iOS?

I make some kind of head, knock on it, and ask for advice.

I am creating an application that, as part of its functions, represents PDF forms; which means displaying them, allows you to change fields and save the modified PDF file. UIWebViews do not support interactive PDF forms.

Using the CGPDF apis (and use other questions posted here and elsewhere), I can of course submit a PDF (without fields / form widget), scan and find the fields in the document, find out where on the screen draw something and do their interactive.

I cannot figure out how to modify the CGPDFDictionary objects and write them back to the file. You can use CGPDF Apis to create a new PDF document from a solid fabric, but how do you use it to modify an existing file?

Should I search elsewhere, for example, third-party PDF files such as PoDoFo or libHaru?

I would love to hear from those who have successfully modified the PDF file and written it back regarding your approach.

+6
ios xcode pdf-generation podofo
source share
1 answer

I once did it incredibly cheaply, sneaking through PDFs - I mean using regular expressions - and just crudely modifying the source of the raw PDF data file.

It can work just fine in simple situations where you can easily find the value in question.

I donโ€™t know what you are trying to do here, but a side thought! Hope this helps!

+6
source share

All Articles