Kbase P134951: How to make a background print of a PDF document to the default printer using 4GL
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  22/09/2008 |
|
Status: Unverified
GOAL:
How to make a background print of a PDF document to the default printer using 4GL
FACT(s) (Environment):
OpenEdge 10.1C
Windows
FIX:
Use the source code below: DEFINE VARIABLE readerPath AS CHARACTER NO-UNDO.
LOAD "SOFTWARE" BASE-KEY "HKEY_LOCAL_MACHINE".
USE "SOFTWARE".
GET-KEY-VALUE SECTION "Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe" KEY DEFAULT VALUE readerPath.
UNLOAD "SOFTWARE". DEFINE VARIABLE mon-pdf AS CHARACTER NO-UNDO.
DEFINE VARIABLE mon-pdf2 AS CHARACTER NO-UNDO.
DEFINE VARIABLE pdf-exe AS CHARACTER NO-UNDO.
DEFINE VARIABLE pdfParam AS CHARACTER NO-UNDO. pdf-exe = '"' + readerPath + '"'.
mon-pdf = "disque:\repertoire\fichier.pdf ".
pdfParam = ' /t '. OS-COMMAND SILENT VALUE(pdf-exe + pdfParam + mon-pdf). The mon-pdf variable must not contain any spaces in the directory name or the file name, other wise running the source code above will generate errors.