![Image](https://s12.postimg.org/gpjhod1c9/20170508_091331.jpg)
si se fijan hay 2 imagenes una con sumatrapdf y con acrobat, y si fijan salen con mucho espacio en blanco, prove tambien con PDF24 CREATOR pero no se como hacer por linea de comando
gracias
Code: Select all | Expand
function BoletaPdf(cFilePdf)
*----------------------------
local cSumatra := ".\SumatraPdf.exe"
local cPrinter := PrnGetName()
local cFile,cCmd
cFile := cFilePdf
cCmd := cSumatra + ' -Print-to "' + ;
alltrim( StrToken( cPrinter, 1, "," ) ) + ;
'" -exit-on-print ' + cFile
// MsgRun( "Imprimiendo archivo "+cFile, "Espere..", { || winexec( cCmd, SW_HIDE ) } )
WinExec( cSumatra+" -reuse-instance -lang es "+cFile) //-restrict -fullscreen
jbrita wrote:karina no funciono
saludos
Code: Select all | Expand
nRet := PrinterSetUp()
nPrn := PrnGetName()
IF( nRet # 0 )
// WinExec(PastaSistema+"\sumatrapdf.exe -print-to "+nPrn+" -reuse-instance -lang br "+cArq) // sem preview
// WinExec( cDirExe+"sumatra\sumatrapdf.exe -print-to-default -reuse-instance -lang pt "+gravaPDF) //-restrict -fullscreen
WinExec( cDirExe+"sumatra\sumatrapdf.exe -print-to "+nPrn+" -reuse-instance -lang es "+gravaPDF) //-restrict -fullscreen
ENDIF
Code: Select all | Expand
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------//
function Main()
local oBar
DEFINE WINDOW oWnd TITLE "IMPRIME PDF CON SUMATRAPDF.EXE"
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar ACTION ImpPdf()
SET MESSAGE OF oWnd TO "IMPRIME PDF CON SUMATRAPDF.EXE" NOINSET CLOCK DATE ;
KEYBOARD
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------//
function ImpPdf()
LOCAL cArchivo, vcomando
// Donde esta el .PDF
cArchivo := "C:\FWH1701\SAMPLES\BOL-20.PDF"
// Llama la impresora default. En mi caso: pdfmachine.exe Impresora Virtual
vcomando := 'c:\sumatra\sumatrapdf -print-to-default ' + cArchivo
WinExec( vcomando )
return nil
// fin