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 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. )
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.
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.
[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]
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.
[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]