Hi!
I created (and still developing) a calc file to print any file in batch. From those files I get some info, like Author’s name and title. And works well for most file types.
However, I had some problems with pdf files, if the file is not hybrid or native from LO. So, I think I could use Shell Function to solve this problem, calling the specific Printer Driver or Name.exe
.
I found something that could help on this topic.
To sum up, I tried to run something like the above example code.
Sub ShellTest()
On Error GoTo eHandler
sFileFullPath = ConvertToUrl(/home/USERNAME/Documents/test.pdf)
Shell ( "/usr/bin/evince " & sFileFullPath )
eHandler:
MsgBox Err " - " Error
End Sub
Meanwhile, is not working as I expected.
Since I am new to the Linux environment, I think it may be something simple, but I couldn’t find the solution by myself.
.
So, my questions are:
- Someone could help pointing what exactly I’m missing with the function ?
- There is a way to use Shell Function to print a
.pdf
(or any other file type) instead of usePrint
Method ? - If so, how can I do that using cups-pdf, e.g ?
.
.
Version: 7.3.4.2 / LibreOffice Community
Build ID: 8cb1c265a8f71ce63e37a2ff337b4f2ebc525cbc
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: pt-BR (pt_BR.UTF-8); UI: pt-BR
Calc: threaded
.
–EDIT–
In a nutshell, I need to make the command line below works on Ubuntu 20.04.4 LTS, passing by Shell Function in LibreOffice.
Shell ("lpr " & sFullFilePath)