Loading PDF's to an iPad split view - objective-c

I'm working on a split view application that is used to view PDF files in a webView. Right now I am able to get three PDF's loaded to the app, and have their titles displayed in the table in the RootView. I'm able to select them and have them displayed to the DetailView, however the sizing the of PDF isn't what I want it to be.
My hope is that the PDF will take up the whole screen and will resize itself to fit the screen if it is too large or too small. One PDF I have is too large and I have to scroll left or right to view the sides of the file, another I have is too small, it isn't centered and instead pushed to the left side of the screen and the empty side on right is filled in with black.
How do I make it so that the PDF's size themselves correctly to fit the whole screen and have even margins on the sides?
Thanks in advance!

Lots of PDF questions on SO today. Sounds like you may have to abandon the webview and go to a tiledlayer CGPDFDocument route. Check out the answer I just posted at Reading text and images from a pdf document in iOS

Related

How to build below screen in titanium?

below i attached an app help guide screen. I am understanding how to build this screen.
If any body have idea please share here
View with semi transparent background color (backgroundColor:"rgba(0,0,0,0.5)";) and some images on top of it.
So, using images is bad. You'll need images for translations and if you do this as one image you'll need to ensure all devices are covered so your arrows point to the right element.
Minimise images == smaller app.
First thing you'll need to do is a create a blocker view -- so that's a view that will fill the screen and have a black background with opacity.
You can't apply that to the window as everything in it will be semi-transparent so:
Create a transparent Window that fills the screen.
Add to that window a view that fills the window and has opacity say 0.5 and black background
Add to the Window (not the view you just created) the other elements and button -- ideally, these should be individual graphics of the arrows, sized in such a way that you can position them based on the host element (the item they are pointing to / referring to). Use real text so you can handle translations / reduce file size.
So you'll need a way to associate each tip with a control they are anchored too, and that will ensure that regardless of the screen size, the tip will appear in the correct place.
First of all, always give a try before putting questions anywhere because it makes you learn things on your own for long time.
The easiest step for you to do this is to ask your designer to create a complete image just like that & you just have to show it on top.
If you have to show that image in different translations, then you can ask your designer to provide you required translations images.

Obscuring a bottom part of the screen by a "curtain" while displaying a pdf file

Is there a way to obscure a bottom part of the screen by a "curtain" while displaying a pdf file? I would like to be able to do that while using a classroom lcd projector, so that I can make students focus on the upper part of a page and ask questions before showing the rest of the page. The curtain should be easily movable up and down, like a blank page covering part of display in the old style overhead projectors.
Obviously, the "curtain" program could be independent of pdf viewer, as long as it can work with a pdf viewer in the full screen mode.
(Anticipating comments: slide shows with layers eliminate need for a curtain, but 1. preparing them takes a lot more time and time if of the essence 2. I need to display certain pdf documents which are not slide shows.)

Using QLPreviewController to scroll through PDF horizontally

Hello i'm currently using QLPreviewController to view a pdf for a magazine app, but i want to have horizontal scrolling, i have got PSPDFKIT (think it's called that) and FastPDF to work fine but i don't have the money to pay for the liencese and don't wish to leave the water mark. is there any way to get QLPreviewController to view horizontally or even UIDocumentInteractionController to view horizontally.
Have you checked out this UIImage category? https://github.com/mindbrix/UIImage-PDF
You could use that to create a UIImage and add that to a UIScrollView. If you have separate PDF files for each page, you can create a UIImage for each one and create a horizontal scroll.
If you need to deal with multipage PDFs, then look at the file PDFView.m lines 43 & 83 - here it is assuming you always want page 1, it should be relatively trivial to add a property for the page number you wish to render instead.

Chaning the background color around a PDF in a UIWebView on Device

I'm using a webview to display a PDF.
The webview displays the PDF at it's actual size which is a little smaller than the size of the webvieww itself, revealing the scroll view underneath it.
I've tried setting the Webview to opaque and setting it's background color to another color, which works fine and dandy in the simulator, but fails to change the color on the device. On the device it changes the color of the background of the view behind the scroll view, this can be seen when the PDF is pulled all the way down.
I've also tried setting all the UIView's backgrounds, by iterating through the subviews but to no avail.
I've updated a diagram to help illustrate which area I'd like to color.
Uploaded Diagram
You really shouldn't mess around with UIWebView's internals.
They can change anytime and your code might just crash on the next version of iOS.
If you need more control about pdf display, you might wanna take a look at other possibilities to show pdf, like using the CGPDFDrawPage* functions. Of course they are pretty low-level and it's a lot of work required until you can get fast page display, zooming, etc all right.

Easy way to use an UIScrollView

Does someone have an "easy way" to make a view like camera roll app? I need to display miniature photos (buttons) and push new views from them. I don't know how to display miniature images in a scroll view. The number of miniatures is large, so they don't fit the screen, and I think UIScrollView is the only solution.
Check out TTThumbsViewController, part of Three20; this should pretty much do what you want (and it's open source if you need to change it).
A scroll view really just controls the visible region of a single content view. If you want a grid of small images, you'll need to create a view that contains a number of image views or otherwise displays the grid of images. Make this the content view of the scroll view. Also, it'd be a good idea to construct your image grid view such that it only loads and draws the images that are visible, particularly if you're going to display a large number of such images.