In search of a lightweight pdf viewer - pdf

I am looking for a lightweight pdf viewer ( commercial / free) for my windows application.
I presently display the pdf documents on a webbrowser with Adobe Reader Plug-ins.
Background :
The problem i am having with Adobe Reader is the Loading time. To display a pdf document for the very first time, Adobe Reader nearly takes 15 seconds !! .The application when deployed on customer locations (usually run on Windows Embedded OS) the pdf viewing time is still worse, sometimes takes more than a minute.
Hence i need to find an alternative for Adobe Reader.
My simple requirements are :
Lightweight - viewer should initialise itself and load the pdf as
fast as possible.
SVG support.
If anyone has any idea regarding such a tool. Kindly let me know
Regards
Srivatsa

Try : Foxit PDF SDK

Try SumatraPDF (Download full kit for MOZ plugin npPDFViewer.dll sorry there is NO IE.OCX)
For a minimal install use with the portable executable in same directory and you can call via DDE or command line

I think best light weight option for Windows is MuPDF for those who would rather not use any plugin in the Chrome.
http://mupdf.com/

Related

Forge Viewer, PDF mirrored

I correctly setup Forge Viewer for loading local PDFs, using integrated extension Autodesk.PDF.
Some PDF are visualized in mirrored view, unlike when opened in Acrobat Reader.
I do not make any call to rotate/resize PDF, so we think the problem is related to these PDF and how Autodesk.PDF render it.
I can share PDF if needed for testing
Using this approach, I was able to reproduce your issue with Viewer 7.37.
Let's use one of the pdfs provided as an example:
Here we have the pdf with Viewer 7.37:
And below, we have the one using Viewer 7.38:
This might occur on your end due to a caching problem.
Can you please ensure you have the latest version (7.38 as of March 2021). If the problem persists, please share the PDF.

Force a webbrowser to display a PDF file only on Adobe Acrobat Reader

I create a PDF with iTextsharp and then I show the preview of the PDF inside a webbrowser control. From the preview the user can SAVE or PRINT using the defaults Adobe Reader's buttons
Working on Windows x64 bits with Adobe Reader as the default PDF viewer everything works fine.
The same program on a Windows x64 bits but with Foxit Reader as the default PDF open the file on Foxit Reader on full application window, outside my program.
I need to manage that.
My code is like
Dim PathToPDF As String
PathToPDF = DirectoryOfMyApp & "\ReportPreview.pdf"
ReportPreviewWebBrowser.Navigate(PathToPDF)
Where DirectoryOfMyApp just gets the C: or D: letter of the hard disk.
I read this link
How to start an Adobe Reader or Acrobat from VB.NET?
but a line like
ReportPreviewWebBrowser.Navigate("acrobat", PathToPDF )
didn´t work and I think the webbrowser control don´t have the option to choose the PDF viewer
https://msdn.microsoft.com/es-es/library/system.windows.forms.webbrowser(v=vs.110).aspx
Is there a way to set the webbrowser to use Adobe Acrobat Reader only or to force any other PDF viewer to show the PDF inside the webbrowser control?
I agree with Zaggler on his comments on this. You are making assumptions at a certain point on software that is installed on an end user's computer. Unless you are going to make the application's PDF viewer be part of a dependency installation or cooked into .NET you cannot guarantee they have that program to use. Nor can you guarantee it's installed location.
However there is a cheap hack for Windows based processes you can do in VB.NET. You can use the ole System.Diagnostics.Process()
Sub Main()
Dim nProcess = New System.Diagnostics.Process()
nProcess.Start($"D:\PdfFile.pdf")
End Sub
In this example I did a quick file location, you can try to ensure it is a valid location that will not change or is in your app's running process folder. This is really low tech as far as development goes, but it is basically saying: "Run me a process, any process, at this location. I don't care what it is, use the Windows defaults to determine what to do with it."
So when I run this on my Windows 10 Dev box it loads up Edge to display it, at home it would fire up Adobe Viewer. It is just opening the file essentially with the OS's choice of what is using that file extension. Not glamorous or very good for hardened code but it works when you want something quick to happen.
No, you can't do this.
You can't even guarantee that Adobe Reader is installed at all.
Reader might not even exist on the machine. It's not built into Windows, and not everyone uses it. Even if it is, FoxIt isn't the only alternative. A big one is that Chrome includes it's own PDF viewer.

Error when opening PhantomJS generated PDF in Adobe Acrobat Reader DS

I am generating a PDF using PhantomJS, and it opens fine with Macs built in Preview, Google Docs, and a few other tools that I tested it on. However, when I open it using Adobe Acrobat Reader DC version 15.010.20056, I receive one of the most unhelpful messages of all time.
After this, my PDF is only partially generated. This happens both on PCs and Macs. I have no idea how to debug this or even start to figure out the cause.
In case anyone was wondering, PhantomJS doesn't properly render Tiling Patterns, setting up offsets X and Y offsets to be 0, which is actually not proper PDF specifications. This is one of the many reasons that PhantomJS renders things differently depending on how you open the generated PDF.

Viewing XPS file inside WebView or RichEditBox for Windows Store

Long time reader, first time poster :)
I'm developing an Windows Store app and I'm trying to load a formatted page into an in-app viewer. As Windows 8.0 does not support PDF natively, I'm trying to load the XPS format instead.
I've tried loading the XPS Uri directly into WebView using the code below, but the result is just a blank page:
ResultsWebView.Navigate(xpsFile);
Is there a way to view XPS file within Windows Store apps?
If not, can anyone think of a way to view formatted documents in app? My next option is probably to find an API to convert the PDF into a PNG image, and load the image directly. I'm trying to avoid using non-native APIs as my app needs to be cross-platform, so the tricky part with APIs is that I need to make sure whatever I use is compatible with both Windows RT and Windows 8.
PDF support was added in Windows 8.1 (in essence).
I researched extensively and could not find a suitable solution that was easy to implement, so I resorted to creating a new module that reads my inputs, generate an html stream, and use that stream to display on WebView.
In the end it was a couple of days' work to format it properly to match the PDF, but not hard at all to implement. I've already spent a lot of time researching an "easy" way out by reading PDF/XPS directly to no avail anyway.

PDF file custom zoom level

i have a task about .PDF files that pdf file should open in browser with custom zoom level of 125% or 150%, i tried many times, but it is not working properly in firefox, as it implements zoom on PDF file but it switch on page#2, i study the adobe's given parameters for PDF file and tried to use them as following in href,
"SICS-47.pdf?page=1&zoom=125,0,0"
"SICS-47.pdf#page=1&zoom=125,0,0"
but no success, anyone here can help me please ?
thank you so much in advance.
The adobe partner reference states on page 5 that this is for IE and Netscape. I'm not sure how old this document is, but you might want to check the Firefox support for this functionality as it could be incomplete.
Reference: Adobe Partner
Another thing you could do is modify the PDF content to make sure the document opens properly. Depending on which tool you're using you could use a free library like the Perl API2 library or a paid tool like the Java iText library. Maybe there are command line tools out there that do the same, but I'm not aware of them.