chaging background color of the text on the pdf page in iphone sdk - ios

Does iOS provide any control upon the attributes of the text present on a PDF,i.e can we change the background color of the text present on the pdf, say for when a audio sync is in progress? I guess CGPDF does not provide much to control or rather extract the content information of a PDF page. Any other library that can help? Thanks !

Related

Menu is not showing pdf file- pdf Annotation in iOS

I am developing the app like ibooks by reference,in that the pdf is not enabling the menu i.e while I long tap the pdf it not showing Menu like copy , define.
How can I work in menu? Help me.
The linked solution simply does not implement text selection or glyph coordinate extraction/conversion. You need to parse the PDF page content stream and track glyphs on the page. CGPDFOperatorTable can be a starting point, however I suggest reading the PDF spec and getting familiar with the multiple transformation matrix states that a page can have - it's quite tricky to get right. You also need to embed various CMaps (character maps) so that all fonts can be correctly parsed. It took me more than a year to get a reliable text extraction for >99% of all PDF documents. If you want to save this time, you can check out the commercial PDF SDK I am working - google for PSPDFKit. We support iOS and Android.

Pdf / Docx preview in a Phonegap app on iOS

I need to open Pdf / Docx documents for preview from a Phonegap app.
On Android it's possible to open files in extenal apps using WebIntent plugin.
Now what about iOS? It seems possible to do this entirely with the build-in browser (which surprisingly does render docx) by creating a html page with a header and a back button in the top and an iframe taking up the rest of the screen.
It would be great if the user could zoom and drag the document while the header would remain stationary, but I couldn't get to zoom working at all inside the iframe.
Any suggestions?
I ended up using InAppBrowser Plugin with enableViewportScale=yes. It displays a toolbar with a back button with custom caption. It would be better if I can add my own toolbar, so the navigation is consistent in the whole app, but this is good enough.

highlight certain text in pdf ios sdk

I am using pdf reader sample for display pdf and book marking.
But i need some extra features i.e highlight certain text in pdf and want to make it saved.
using ios sdk.
Is there any way to do it?

CGPDFDocument and voiceover

I have a PDF rendering app that loads PDF content from a URL (CGPDFDocumentCreateWithURL). The PDF loads fine, and I can display on screen no problem. These PDF also contain text for searching. I'm trying to make this comtent visible to the VoiceOver API. I've never worked with this frameowrk before.
Anyone have any hints or links that can help me get started?
If you have access to the text from the particular PDF page, you can set the accessibilityValue of the view you are using to display the page to the text value. This will then read the contents out.
If for some reason your PDF view is not accessible to voiceover, you can use an overlay view, and update its accessibility value as you change pages.

How to determine the dimensions of the iOS keyboard in Mobile Safari

I'm currently trying to create a suggestion UI in a web page targeted at Mobile Safari. The main components are a text box and a scrolling list that is displayed below the textbox that contains the list of suggestions.
To do this I need to 1) determine that the keyboard has shown and 2) determine the size of this in order to resize the suggestion list to fit in the available space.
I've been able to accomplish (1) by waiting for the focus event, but (2) is still problematic. I have not been able to find any way to measure the size of the keyboard as it doesn't seem to impact the window dimensions or anything else that I could think of trying to measure.
Is there anyway to programically determine the size of the iOS keyboard when it is displayed in mobile safari?
Unfortunately, there is no way to calculate the height of the keyboard. None of the window properties change when the keyboard comes up.
To determine that the keyboard is showing, you can use this solution:
iPad Web App: Detect Virtual Keyboard Using JavaScript in Safari?
Then you'll need to add a device specific class and use media queries in your CSS along with these classes to style appropriately for device and orientation.
If someone has a better hack, I'd really love to hear about it.

Resources