shell(...) verweigert die Mitarbeit

Programmierung unter AOO/LO (StarBasic, Python, Java, ...)

Moderator: Moderatoren

Benutzeravatar
sven-my
*****
Beiträge: 358
Registriert: Fr, 14.12.2007 19:56

shell(...) verweigert die Mitarbeit

Beitrag von sven-my »

Hallo Experten,

folgendes "Makro" bringt mir die Fehlermeldung:

Basic-Laufzeitfehler
Datei nicht gefunden

Code: Alles auswählen

sub pdf_merge
shell ("E:\pdf_split_merge\pdfsam-starter.exe",1)
end sub
Dabei habe ich den Pfad aus den Eigenchaften des Desktop-Icons rauskopiert, da das PRG von dort aus ohne Probleme startet.

Andere Programme, die ich auf diese Art starte machen es ohne Maulerei.

Hat jemand eine Idee ???

gruß
sven-my
win7 prof / AOO 4.1.2 & AOO 3.4.0 portable
Karolus
********
Beiträge: 7517
Registriert: Mo, 02.01.2006 19:48

Re: shell(...) verweigert die Mitarbeit

Beitrag von Karolus »

Hallo
Benenne die ..exe mal um , mglw. macht der -Bindestrich im Programmnamen Probleme
.
Gruß Karo
LO7.4.7.2 debian 12(bookworm) auf Raspberry4b 8GB (64bit)
LO24.8.2.1 flatpak debian 12(bookworm) auf Raspberry4b 8GB (64bit)
Benutzeravatar
sven-my
*****
Beiträge: 358
Registriert: Fr, 14.12.2007 19:56

Re: shell(...) verweigert die Mitarbeit

Beitrag von sven-my »

Hallo Karolus,

hat leider nichts gebracht. Bei der Sucherei nach dem Fehler bin ich bei einer älteren Version auf folgende Information gestoßen:

======================

pdfsam-console is a command line application.
It uses jcmdline to parse input parameters and it executes the proper command. It's the core application and it provides pdf manipulation.
The main GUI loads plugins, once clicked the plugin "Run" button (merge or split), the plugin performs input data validation and, if everything is correct, it creates an arguments array and than it sends it to the console.

To run the console type the following command:
"java -jar /PATH_TO_PDFSAM/lib/pdfsam-console-CURRENT_VERSION.jar"

Here is a list of the console arguments:

Usage: Pdfsam options command
where: command = command to execute {[concat], [split]} (required)

and options are:

Merge

-?
prints usage to stdout; exits (optional)
-f <file>
pdf files to concat. a list of existing pdf files (EX. -f /tmp/file1.pdf -f /tmp/file2.pdf)
-h
prints usage to stdout; exits (optional)
-help
displays verbose help information (optional)
-l <file>
csv file containing pdf files list to concat in comma separated value format (optional)
-log <file>
text file to log output messages (optional)
-o <file>
pdf output file. if it doesn't exist it's created, if it exists it must be writeable (required).
-u <string>
page selection script. You can set a subset of pages to merge.
A
ccepted values: "all" or "num1-num2" separated by ":"
(EX. -f /tmp/file1.pdf -f /tmp/file2.pdf -u all:all:),
(EX. -f /"num1-num2" separated by ":"
(EX. -f /tmp/file1.pdf -f /tmp/file2.pdf -u all:all:),
(EX. -f /tmp/file1.pdf -f /tmp/file2.pdf -u all:12-14:)

to merge file1.pdf and pages 12,13,14 of file2.pdf.
If -u is not set default behaviour is to merge document completely (optional).

-overwrite
if passed, overwrite existing output file

-copyfields
use this if input documents contain forms. This option will lead to a high memory usage.

-version
displays command's version (optional).

=====================================

Mir ist absolut nicht klar, wie ich dieses umsetzen könnte.

Wie kann ich das in mein Makro einbauen, wenn ich die Dateinen file1.pdf, file2.pdf, und file3.pdf zu file4.pdf in Lw:\Ordner verbinden will, wobei file4.pdf überschrieben werden soll ?

gruß
sven-my
win7 prof / AOO 4.1.2 & AOO 3.4.0 portable
Antworten