i had used pdf.js in one of my projects. It is loading in the example. But, In an HTML page, It shows loading. If i try to see in full screen, it loads the pdf and then shows the pdf in html page for about 10 seconds after exiting full screen view. After that it will shows blank page with loading.
Whenever I try to see the pdf in full screen the same happens.
If anyone got the solution or any idea why it is so, then please do reply ASAP.Thanks in advance
Related
I'm using WKWebView to load a local html file using
[self.webView loadFileURL:tmpUrl allowingReadAccessToURL:directoryUrl];
Currently the webView will keep white screen for a long time, and once it shows content, all images were already downloaded.
It looks like the WKWebView will only render after all images downloaded.
Sample HTML content is here: https://pastebin.com/681btcSa
Then I did some test for pages without images. It seems that when loading complex HTML, WKWebView always takes a long time before render anything on screen.
I tried to call _updateVisibleContentRects and setNeedsLayout, but it helps little.
We have a View that is just a UIWebView and some navigation buttons. When you click on a link in the UIWebView that opens a PDF, it loads the PDF appropriately, and I can see the (Page 1 of X) where X is the number of pages in the PDF. So the PDF is fully loaded, but it is stuck on the first page. I can even scroll the page that is displayed up so I can see the second page, but it only allows me to go the standard "bounce" distance on the scrollview.
I looked at a problem with similar symptoms (showing a pdf in uiwebview on ios9 sometimes scrolling is stuck), but I don't load the about:blank page first, and the fix of trying to load a blank PDF did not fix our issue. Is anyone else experiencing this issue?
Of note this seems to only be affecting iOS 9 devices.
My upcoming mobile web project requires viewing dynamically chosen pdf files inside the webpage. I am using iFrame to display the pdf file and the file can be scrolled using two-finger scrolling. But the problems I am facing are:
The first page of the file is not displayed completely on the iPad and gets cut off along the width unlike when I view it on the desktop browsers where the first page of the pdf is always entirely displayed although zoomed out to fit in the iFrame area.
There is no visual indication for the users that the pdf document can be scrolled, i.e., there is no scroll bar on the pdf document.
The controls (page navigation, zoom etc.) for the pdf viewer (Adobe reader) don't appear on the document unlike when I see it on the desktop browsers.
What is the best way to achieve what I am trying to do? Do any of you experts know any solutions/workarounds to the problems I am facing? An entirely different approach using anything other than iFrame can also be considered.
The reason why the pdf should be inside the html page is that, the list of pdf files will be on a menu bar on the left side of the page and the user can click on any of them to view on the same page. Ideally, they will have the capability to toggle between full screen view and that view.
Any help is appreciated.
I created a tiny JavaScript module that helps you to show a PDF inline and be able to scroll it. But I also couldn't figure out a way to make it fit the total width of the parent container.
Check it out: https://github.com/williamrjribeiro/ipdf-scroll
Cheers.
I came across this Recommended way to embed PDF in HTML? while researching on the web to find an answer.
The mentioned link discusses about some options that I can use and the google document viewer works for me though don't know if there is anything (like data limit) I need to be aware of before using it on the website. Also I have no idea if it is a good solution (though the full screen mode is not available, but zoom-in/zoom-out and next/prev page buttons are there are show up in the mobile safari on the iPad) to use for an web app that will be run on the iPad.
Anyway, I will keep researching for a better solution and if i don't find any, I'll stick to the google document viewer.
The issue appears to be a bug with Safari on the IPad.
I didn't find a solution for embedding the pdf in html but I did find this:
If you return FileStreamResult from your controller action instead of a view, the pdf will open in a new tab, it's not embedded html but at least your user is not having to download files and open them manually.
I had the same problem of the pdf not being displayed completely. The only thing I found to fix this was the change the size of the div containing the pdf.
For example if the element containing the pdf is a div then I change its width to any value and the rollback to the value it had before. Changing Width or height any one works.
Sometimes I had to wait a little using a setTimeout before calling my resizable method
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.
I want to enable printing a picture from my web page so that the picture will be previewed and printed twice on the same page i.e. 1 A4 with the image printed 2 or 4 times on the same A4.
Is it possible with the FF and IE browsers interface?
Thanks,
Yuval.
I dont see why not?
Better to brush up on print stylesheets in order to hide non-relevant items on the page.
Make a print link below the picture or wherever you like. Make it point to another HTML site on which you have placed the pictures as you like (with CSS or plain HTML).
Finally, use javascript (at page load) on that site with the pictures to open the printing dialog in the browser.
Good luck.