Can i include SumatraPDF as part of my application

i am currently include the program mention above as a pdf reader just in case window user doesn’t has any pdf reader registered for the pdf extension.

in my code, i just create the pdf and then used SHELL to open the pdf with the above program which is located under a MiscLibs folder of my application.

it does mention somewhere the program is free under GPL license. So my question, is is save to include the above program in my application??

Personally I would leave it out…
Don’t force the use of one 3rd party application over another… especially with regard to PDF reader.
If you Shell to SumatraPDF, and the person has/wants/prefers Adobe Reader you are removing that choice.

Inform the user a PDF reader is required, let them decide which one they want…

Then use FOLDERITEM Launch to view the PDF… this will automatically use what ever the default PDF reader installed on the user computer is.

i only do the shell to sumatra if they don’t have acrobat reader or any other pdf reader registered.

once the client install something, my program is smart enough not to use sumtrapdf.

I would recommend warning users without a registered reader to install one of their choice, rather than making a choice for them.

If an application wants me to use one specific third party app that I either don’t know or don’t like, I will simply not install (or remove, if I did not find the issue early enough) the offending application. I will also generally issue a very nasty email to the author… (You know, the kind that starts with “Who the h*** do you think you are blablabla”) I removed from my system an application that did not tell me that they install a third party update system for automatic patch installation. I would probably not have installed it in the first place, had they told me… I am sure there are other weird animals like me out there.

Save yourself and your customers grief. Treat them as if they know something, and as if they can choose what they use. (We know the first part of this statement is probably not true, but regardless, it is less trouble for all. :wink: )

I wouldn’t include it directly, as it would most likely mean that you would then have to make your product Open Source as well (may or may not be an issue for you), unless you get special permission from them.

Instead, if you detect that there is no PDF reader installed, pop up a dialog box that informs them that they need a PDF viewer. Offer them a choice between three or four viewers with download links that automatically download and do a silent install.

will take it out then…

Since your app is smart enough to detect whether a PDF reader is installed, when one is not just put up a dialog stating that fact and offering to direct them to a website where they can download one.

Could you also check to see if it can be displayed on the HTML viewer? I can think of two browsers that have PDF viewing integrated/embedded.

Chrome is one of them…

how do i load the pdf into htmlviewer and will i be able to print the pdf??

something like this perhaps:

Dim f as FolderItem = GetOpenFolderItem(FileTypes1.ApplicationPdf) If f is Nil then //user cancelled return Else HTMLViewer1.LoadPage(f) End if

i try the code above, but unable to print the pdf from htmlviewer

[quote=74575:@LangueR]something like this perhaps:

Dim f as FolderItem = GetOpenFolderItem(FileTypes1.ApplicationPdf) If f is Nil then //user cancelled return Else HTMLViewer1.LoadPage(f) End if [/quote]

Does not work with Windows :confused:

do u mean does not open… do u have acrobat reader installed??

Well. On Mac the same code opens the PDF in the HTMLViewer and displays it.

On Windows, it simply says that the page cannot be displayed.

I could open the pdf through file.launch and whatever program is set to open PDF like Acrobat Reader, just wanted to see if it could be done with HTMLViewer.

No problem.

Works on Win7 and 8 for me; but I am sure it depends on whether it calls IE or Webkit, or ?

I tried with both renderers under Windows 8.1. 64 bits. No luck.

Have tested under Windows 7 64 bits as well. No work either.

Now I have a lot of doubts about this working under Windows at all :confused:

I just tested under Win7x64 and it worked using webkit. Native didn’t but that was because I have the browser helper objects disabled.

You can just use pdf.js in the htmlviewer to render the pdf but be aware that it is rather unsatisfactory most of the time and I prefer f.launch.

[quote=76537:@Bob Coleman]I just tested under Win7x64 and it worked using webkit. Native didn’t but that was because I have the browser helper objects disabled.

You can just use pdf.js in the htmlviewer to render the pdf but be aware that it is rather unsatisfactory most of the time and I prefer f.launch.[/quote]

Why not just use the HTMLViewer with webkit?

I have no objection I was just posting back testing results.

Personally I am of the f.launch crowd.