Einzelnen Beitrag anzeigen

nahpets
(Gast)

n/a Beiträge
 
#3

AW: PDF Datei ausdrucken

  Alt 26. Mär 2017, 17:28
Würde das über ShellExecute (oder entsprechendes lösen):

AcroRd32.exe <filename>

Code:
The following switches are available:

    /n - Launch a new instance of Reader even if one is already open
    /s - Don't show the splash screen
    /o - Don't show the open file dialog
    /h - Open as a minimized window
    /p <filename> - Open and go straight to the print dialog
    /t <filename> <printername> <drivername> <portname> - Print the file the specified printer.
http://stackoverflow.com/questions/6...line-reference

http://stackoverflow.com/questions/1...s-command-line

Eventuell geht es so in der Art (ungetestet):
Delphi-Quellcode:
function PDFPrint(A_PDF_FileName : String; A_Printer : String) : Integer;
begin
  // Statt SW_HIDE auch SW_MAXIMIZE, SW_MINIMIZE, SW_SHO*WNORMAL möglich
  Result := ShellExecute(Application.Handle,'open','"C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe"',PChar(Format('/t %s %s',[A_PDF_FileName,A_Printer])),'',SW_HIDE);
end;
Von der Kommandozeile funktioniert dashier unter Windows XP:
Code:
"c:\programme\adobe\reader 11.0\reader\AcroRd32.exe" /t c:\Ueberweisungsvorlage.pdf Kyocera
  Mit Zitat antworten Zitat