views:

2448

answers:

2

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.

+2  A: 

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.

Rowan
Cool, I really thought it wasn't possible. I think I will base my ebook reader app on PDF, and implement landscape viewing in a future update if the reflowing solution ever surfaces. Thanks!
Caffeine Coma
No worries. The PDF reference can be found online using the link below. You might find it useful while building your apps, just to get some background info when necessary.http://www.adobe.com/devnet/pdf/pdf_reference.html
Rowan
A: 

Can you tell how to read data from certain pdf file and change its font, color and size?

Thank You,

Jindal
You should consider posting this comment as a new question rather than riding on this one.
Caffeine Coma
Hello kaffeine coma, my intense was to know the answer coz you are knowing. i thought you can help me on this. That's why i posted here.
Jindal