I have not tried this with UIWebView, but you can do something similar to programmatically position the border so that it looks on the screen:
CGRect frame = webView.frame;
If you use UIWebView to display PDF files and HTML, you will of course only change the frame when displaying the PDF file, and then return the original values ββwhen displaying other content.
I did similar things with UIScrollView for another reason: to ensure that the items displayed in UIScrollView are populated so that there is a scrolling failure (as shown in the Apple PhotoScroller example from WWDC 2010). I suppose this may also work to move borders around PDF from the screen.
Greg
source share