iPhone - view PDF like in iBooks - iphone

I have question about view for displaying multipage PDFs in my app. I have found solutions with webview but they lack ability to zoom and scroll between pages horizontally. Also found solutions using Quartz2D but the same problem as above.
Is there any way to present PDF like in iBooks? You can pinch-i/out zoom, list between pages horizontally. And also how to do taht with single PDF file, not split PDF to pages.
Thanks a lot.

Update: 04 Feb 2012
Check out this project, it's opensource and very well made:
Project:
http://www.vfr.org/
Source:
https://github.com/vfr/Reader

I can't give you the answer, but i can redirect you to a example project that is able to load and render a multipage pdf page by page.
To be honest this application it's manly on the iBook curl effect (forget it, it's a private API, no way) but inside there is a class that render on a view a pdf page, I'm sure that if you play a little with that code, CGAffineTransformMakeScale, CGAffineTransformMakeTranslation and touch control you will be able to obtain that effect.
Link to the project:
http://blog.steventroughtonsmith.com/2010/02/apples-ibooks-dynamic-page-curl.html

Checkout this sample code from Apple:
http://developer.apple.com/library/ios/samplecode/ZoomingPDFViewer/Introduction/Intro.html
It tells you how to efficiently display and zoom PDF documents.
For paging, see this link:
http://www.random-ideas.net/posts/42
Between the two of those you should be all set.

Related

Is there a way to add extra margin space to a page in PDFKit/PDFView?

This is perhaps a more general question as I'm looking for ideas on how to approach a problem working with PDFView/PDFKit. I have a small sample application that allows you to display a page, select a range of text and then associate a comment with that text. Once the comment is saved the comment is displayed on the PDFView page in the margin via an overridden draw() function for PDFView.
Problem is that with very small margins the comments can be very squished. I've been looking for a straight-forward solution and would very much appreciate ideas on how to address it.
The obvious (ie, easy) solution is to change the actual "page size" in the PDFView and have wider margins, but of course PDFKit has no support for that (I don't think). Another thought was to go to a custom PDFView library but the only ones I found when I last looked were iOS (not Cocoa) based.
Last idea was to instead of drawing directly on the page have some sort of pop-up window (like a sticky-note) contain the note but then it would need to be moved dynamically with the scrolling of the page. And of course one other was to recreate the PDF dynamically for viewing and make all the pages larger... but I've not dug into how much of a performance hit / effort that would entail.
Maybe there's a simple/obvious solution that I've missed?
I created a simple sample app in gitHub which shows the basic functionality for people to play with if that's of help. https://github.com/jcnolan/PDFMarginTextView

CRM365: images do show in columns in Unified Interface

Subject: Display custom icons instead of values in list views
Under the Classic interface the icons are working fine as described in the documentation. However, if I switch to Unified Interface they are not displayed anymore.
Inspecting the page (visually and in the generated html) it looks that the space is indeed reserved for the image as DIV. So I suspect the code behind the page is not able to find/retrieve the images when in Unified Interface even if I supply the full URL of the picture.
Did anybody else encountered similar problems when moving from Classic to UI interface?
We are in an on-premise installation.
What type is your image? Is it PNG, JPEG, or GIF.
In new UI it should only be PNG and that too of size 16*16.
Reference article to look into

Search for a word in a PDF on iPad

I use CGPDFDocumentRef control to view pdf file in iPad. I want to add search capability and highlight the results. Any suggestions on how I can do so? In addition, I would like to know if there there a way to zoom in and out using a multi-touch?
following sample has most of the features you need.
https://github.com/mobfarm/FastPdfKit

How to display a PDF (w/hyperlinks) in an iPhone app like GoodReader?

All I need to know is how to put a PDF page into a UIWebView, and then retrieve the URL value (into an NSString) of a link when clicked. Can somebody please offer their knowledge on this? Thanks in advance.
Most iPhone PDF viewers are using CGPDF to render the PDF content.
To implement features like hyperlinks (AFIK hyperlinks in PDF are done via a "link annotation" tag, but there may be some other way), the PDF viewer uses the CGPDF API to scan/parse the PDF content stream for a given page, pull out any data it is interested in, then implement support for that feature.
So for hyperlinks, a viewer may use CGPDF to render the page in a view. It would also use CGPDF to scan the page looking for link annotations, and pull out any attributes it needed (contents, destination, coordinates, etc.) It would implement a touch-handler for the view and any code to execute when a user tapped the hyperlink.
This is not possible if you render PDFs in UIWebView.

iPhone UIWebView epubs split page by page

It's really interesting how book reading applications like Stanza or Eucalyptus split epubs which is html by page so lines are clear and next page starts at the correct line.
Does anyone has any idea how this could be accomplished?
The easiest way is to render a chapter inside an epub in a UIWebView and the use javascript to compute page boundaries. The interface between Cocoa and JS is kind of tricky but stringByEvaluatingJavaScriptFromString: can be used to run JS inside a UIWebView.
Once you have the page boundaries you can scroll the chapter using window.scrollTo(x,y); and adjust the size of your UIWebView according to your page boundaries to prevent any incomplete lines showing from the bottom.