1
votes

I'm using CGPDFDocumentRef to render PDF content for an ebook app. This works great, but it seems to preclude allowing the user to read text in "landscape mode" by tilting the phone- I have no way to reflow the text to make use of the wider space. (Yes, I can scale the whole page to fit the new space, but that's not really helpful to the reader.)

Is it possible to reflow paragraph text in PDF documents based on a given page width? I realize that HTML does this nicely, but the "export to HTML" from tools such as Keynote just draws a JPG.

If what I'm asking for is impossible, that would be an acceptable answer; I'd just like to know for sure.

1

1 Answers

2
votes

Yes, it is technically possible to temporarily reflow text in PDFs to the full width of the page, but I haven't been able to find any functionality in CGPDFDocumentRef reference that would enable you to take advantage of this PDF feature.

On a somewhat related note, if you do manage to find the necessary functionality, creating a tagged PDF makes automatic reflow of text and associated graphics easier and more accurate.

However, I don't believe that CGPDFDocumentRef lets you create tagged PDFs either.