Open external pdf files in BASE

Hello, I need a control that let me to open external pdf files from different folders ,I have a folder for each user saved in a db table. I prefer open them with the default reader (adobe)
At the moment the closest solution ,that I found , is to convert the single pdf page, in an image and load it with the “image control”.
Can you help me?
Thanks in advance!

Hello,

Are you looking to open random files or do wish to store a list of these in Base to be opened when required?

Please provide LO version used, OS and database used.

Hello my conf is:
libre office 5.2 , windows 7 32bit, I use the internal .odb database.
No, it is not a random selection , I need to store specific pdf files, for every user stored in a table.

The only solution that I found is to convert a pdf page in jpg and to store it in the blob field of db, I saw that I can link the field to an external image https://www.youtube.com/watch?v=IsHqqvn2zYg, but
it is uncomfortable for me to convert many pdf pages in one or more jpg images.
Thanks again!

Hello,

Not certain as to the direction you wish to take so here are a few alternatives.

Link in image control. This works for images and documents → How to insert a link to an odb database to display an image. From the sound of your question this is the least likely solution.

There is also the ability, using a macro, to move the absolute path of the document into a push button to be opened with the default document viewer → libreoffice base requires an absolute url to display images

Or. again using a macro, open the document directly with a Shell command:

open pdf in linux with help of base-macro

base - how to pass parameters between forms

Thanks I’ll study this example Libreoffice base requires an absolute url to display images - #2 by Ratslinger

Hello I found this solution

I put in a form(frmUser), a button (btnOpenDoc ), and a text box(txtDocPath ).
Then I set the button property “Action” with the value “Open Document/web page”, so , in the relative procedure, I wrote:

oform = thiscomponent.drawpage.forms.getbyname("frmUser")
oform.txtDocPath = "D:\Manuals\code.en.pdf" 
oDocPath= oform.txtDocPath
oButton = oform.btnOpenDoc    
oButton.TargetUrl=oDocPath.text 

the last instruction open the pdf