If you own ChromeExplorer from CapeSoft, displaying the PDF file would be very easy.
See “View PDF File Directly on Clarion Window View PDF File Directly on Clarion Window” https://capesoft.com/accessories/chromeexplorersp.htm
All good suggestions here, if you want your own COM control that does exactly what you want (because you tell the AI what you want it to create). Stop by one of the ClarionAI Workshop Code-A-Thon sessions next week! We’re making COM controls for whoever stops by. For what you’re looking for, it will probably take less than 20 minutes from creation to implementation in your Clarion program.
Stop by www.clarionlive.com for more information about the Code-A-Thon! It’s five sessions over five days, with each session lasting two hours. We’ll be coding COM controls you can use in your Clarion apps, all free, and a great introduction to what AI can do to help you add value to your Clarion apps!
If you can’t make it to any of the sessions, email me at www.clarionlive.com and tell me what you need, and I’ll make the COM control for you, no charge!
Now I feel foolish…
Previously I had my PDF editor open with the instructions displayed. When I used the RUN command, it didn’t appear to do anything because I already had the PDF open.
Just a minute ago, I again tried the RUN command, PDF editor closed, and like magic, the editor opened and displayed the sheet as intended!
I’ve signed up for the Code-A-Thon, but is there a way, without purchasing a $400 accessory to show this in a window in my app rather than opening the editor?
I probably won’t be able to make it to the sessions but I would be very interested in seeing how to make a PDF viewer com control, so if you can make that session available off-line I would greatly appreciate it.
There is nothing you need to pay for at the Code-A-Thon. If after the Code-A-Thon you decide you want to make your own COM (Activex) controls, you can get started using Claude Code for $20 a month and that’s all you’d need. I’ve already created an HTML viewer as well as a Preview control that lets you preview pdf, word docs, jpg, etc. that would probably work for you as-is.
I’ll go over installing the UltimateCOM template and class, and show how to use the Clarion COM Exchange to retrieve COM controls that the community is sharing.
You bet, all sessions will be available on YouTube for viewing! Also on www.clarionlive.com, we take a transcript of the sessions and convert them to a nice summary and chapters, so you can read what happened in the session and jump right to the place in the recording that interests you!
Besides Capesoft Chrome Explorer, you can display a pdf inside your Clarion app using the WPViewPDF Control Wrapper addon tool from Klarisoft.com without using Adobe or a browser PDF viewer.
I have a browse list that shows all the pdf reports the user has created (using DIRECTORY). With WPViewPDF next to the list, the user can quickly scroll through all their reports.
I do this via an OLE control in Clarion 10 .. Shell.Explorer.2
Load the file .. ?OLE{‘Navigate(“myFilename.pdf”)’}
I have Acrobat Reader installed, it uses this somehow to display the PDF in the window control.
Apart from needing Acrobat Reader, all is nice and neat, just one line of code to load the PDF into one of my application windows.
I see there’s a AcroPDF.PDF.1 as well, not tried that.
One vote for Sumatra, I keep it in folder with my app, only one exe file and one txt for configuration. It can be configured to close with ESC key, so for end user same experiance.
EscToExit = true
Petar
Example from my code:
PDFFile=CLIP(GLO:EfakturePath)&CLIP(LocDodatak)&CLIP(NAR:BR_Tekuceg)&‘.pdf’
IF Exists(PDFFile)
RUN(CLIP(GLO:rootpath)&'\sumatra.exe '&CLIP(PDFFile))
END