I found simple way but only to show and print PDF files in Xojo (Windows). It is PDF-XChange Viewer Simple DLL SDK. It is free, but everything what you can do is to show and print PDF files.
First you must add ActiveX to project.
Then for simple viewing:
dim link as string = "C:/Simplepdf.pdf"
pdf_ActiveX.Src = link
and for PDF printing:
pdf_ActiveX.Print
There is also free version of Debenu Quick Pdf library which you can use for creating PDF files. Combination of this two free ActiveX controls is the way you can add PDF functionality to your project.
On Win - tested on XP and Win7 - make sure Acrobat Reader is installed ( this is pretty normal to have on a PC unless you are antedeluvian. ) Two options:
Load up a WebBrowser OLE control and use that ( ie: MSIE ) which in turn will use the Acrobat plugin.
Load up an Acrobat Reader OLE object and use that.
I have had no issues printing, as the AR takes control of the PDF.
If anyone wants the sample project just say so. ( Errors and Omissions, crap from a hobby programmer, exceptions escluded ).
[quote=182339:@Peter Job]On Win - tested on XP and Win7 - make sure Acrobat Reader is installed ( this is pretty normal to have on a PC unless you are antedeluvian. ) Two options:
Load up a WebBrowser OLE control and use that ( ie: MSIE ) which in turn will use the Acrobat plugin.
Load up an Acrobat Reader OLE object and use that.
I have had no issues printing, as the AR takes control of the PDF.[/quote]
Ok, but trick and aim od my example is to be Acrobat independent! You can offer PDF functionality without verifying if user have installed Acrobat Reader.
If Chrome is installed, it is a great way to display PDF. Windows 8 and 8.1 as well as 10 have an app more or less like Preview which displays PDF. Finally, the Edge browser (formerly Project Spartan) displays natively PDF.
Finally, after all these years, Microsoft has discovered PDF
I use a build in Xojo HTMLViewer with the native renderer for Window, Linux and OS X in my projects.
Const langHelpFile As String = “MyApplicationHelp.pdf”
dim MyHTMLView as HTMLViewer
In the open event:
dim f as FolderItem
f = app.executablefile.parent.child(“Resources”).child(langHelpFile)
if f <> nil then
if f.Exists then
me.LoadURL f.URLPath
end if
end if
That’s all. No plugin, no, dll, no ActiveX, no PDF writer. This is tested with Windows7, Windows8, Windows10 and Mac OS X 10.0 - 10.11
Good for them. I can understand they want to have their own electronic paper standard, but really, XPS is such a joke, somebody must have told them how ridiculous they were. For once her majesty Microsoft had to eat its own hat