Impresion en BMP, JPG o PDF
Posted:
Tue Feb 11, 2020 12:54 pm
by Jorge Jaurena
Buen dia.
Necesito sacar un reporte en formato BMP, JPG o PDF, cualquiera de los tres me serviria.
Cualquier ayuda es bienvenida.
Gracias.
Jorge Jaurena
Re: Impresion en BMP, JPG o PDF
Posted:
Tue Feb 11, 2020 8:06 pm
by armando.lagunas
hola
para mi es mas practico archivo PDF generado directo y abierto con el acro..., lo defino de esta forma:
- Code: Select all Expand view
QuitProgamLoad( "AcroRd32.EXE" ) // Verifica si esta abierto el Acro...
cFile := ".\Informes\Cierre Productor CSG N° "+AllTrim(PA18->CCSG)+".PDF"
SET 3DLOOK OFF
PRINTER oPrn TO cPrintPDF FILE cFile PREVIEW // <-- cPrintPDF es una variable que contiene el nombre de una impresora virtual PDF (doPDF v7)
IF EMPTY( oPrn:hDC )
RETURN NIL
ENDIF
...
...
...
construyes tu report
...
...
mi resultado:
gas stations new york ny- Code: Select all Expand view
Function QuitProgamLoad( cProceso )
LOCAL oBj, oServ, aProcess, objProcess
TRY
oBj := CreateObject( "wbemScripting.SwbemLocator" )
CATCH
Return nil
END
oServ := oBj:ConnectServer()
aProcess := oServ:ExecQuery( "Select * from Win32_Process" )
For Each objProcess in aProcess
If UPPER(objProcess:Name) = UPPER(cProceso)
objProcess:Terminate()
ENDIF
next
Return nil
Re: Impresion en BMP, JPG o PDF
Posted:
Mon Feb 17, 2020 2:18 pm
by Jorge Jaurena
Buen dia y muchas gracias por la ayuda.
La opcion de usar la impresora virtual me resuelve en parte el problema ya que cuando mando la impresion siempre me muestra el dialogo de la aplicacion doPDF y mi necesidad
es generar un archivo PDF o BMP o JPG (cualquiera serviria) directamente en una carpeta con el nombre que necesito sin que levante ningun dialogo y sin intervencion del operador
ya que tendria que realizar una impresion en lote.
Gracias
Jorge Jaurena
Re: Impresion en BMP, JPG o PDF
Posted:
Thu Feb 27, 2020 1:15 am
by nageswaragunupudi
- Code: Select all Expand view
PRINT oPrn FILE "filename.PDF"
PAGE
<print ............>
ENDPAGE
ENDPRINT
This saves the output to the "filename.pdf" silently.
We do not need any external drivers.