tPrinter
-
D.Fernandez
- Posts: 560
- Joined: Wed Jul 31, 2013 1:14 pm
- Location: Maldonado - Uruguay
- Contact:
tPrinter
Hola amigos.
La tengo una impresión desde hace años es la misma y funciona.
Al cambiar a versión 2501 de FWH, al dar clic en el botón para generar el pdf, me pregunta si quiero visualizarlo, digo que si.
Pero me da un mensaje que el archivo (PDF), no existe, esto me pasa con PDF's de varias hojas. No pasa con una sola.
Con la versión 2410 me da el mismo error.
Ahora para salir del paso compilo con la rPreview 2212. Todo funciona correctamente.
Alguna sugerencia.
Saludos
Gracias
Ruben Dario Fernandez
La tengo una impresión desde hace años es la misma y funciona.
Al cambiar a versión 2501 de FWH, al dar clic en el botón para generar el pdf, me pregunta si quiero visualizarlo, digo que si.
Pero me da un mensaje que el archivo (PDF), no existe, esto me pasa con PDF's de varias hojas. No pasa con una sola.
Con la versión 2410 me da el mismo error.
Ahora para salir del paso compilo con la rPreview 2212. Todo funciona correctamente.
Alguna sugerencia.
Saludos
Gracias
Ruben Dario Fernandez
Dario Fernandez
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
- Antonio Linares
- Site Admin
- Posts: 44515
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
D.Fernandez
- Posts: 560
- Joined: Wed Jul 31, 2013 1:14 pm
- Location: Maldonado - Uruguay
- Contact:
Re: tPrinter Creo que esto es mejor
Hola maestro, hice un comparación de archivos de la versión 2212 y la 2501.
Son de rpreview.prg
SE QUE ALGUNA DIFERENCIAS SON POR LAS MEPORAS
Solo pasa cuando son muchas páginas, en mi intento son 60 páginas
Muchas gracias
Saludos
Ruben Fernandez
Son de rpreview.prg
SE QUE ALGUNA DIFERENCIAS SON POR LAS MEPORAS
Solo pasa cuando son muchas páginas, en mi intento son 60 páginas
Code: Select all | Expand
CLASSDATA cResFile
**Esta en la 2212 y no esta en la 2501
2212- METHOD PrintPrv( oDlg, nOption, nPageIni, nPageEnd )
**Esta en la 2212 y esta diferente en la 2501
2501- METHOD PrintPrv( oDlg, nOption, nPageIni, nPageEnd, cFile )
2501 METHOD GetFileToSave( aExt ) INLINE PrnGetFileToSave( ::oDevice, aExt )
**No esta en la 2212
2212 ON RESIZE ( ::PaintMeta(), ::ResizeListView() ) ;
**Esta diferente en la 2501
2501 ON RESIZE ( nSizeType, nWidth, nHeight, ::PaintMeta(), ::ResizeListView() ) ;
2212 local oImageList, oReBar, oBar, oHand, uRet, oBtn
** Esta diferente en la 2501
2501 local oImageList, oReBar, oBar, uRet, oBtn
2212 //oImageList:AddMasked( TBitmap():Define( ,,, FWBitmap( "pdf" ) ), nRGB( 255, 0, 255 ) )
**Esta como comentario 2212
2501 oImageList:AddMasked( TBitmap():Define( ,,, FWBitmap( "pdf" ) ), nRGB( 255, 0, 255 ) )
2212 DEFINE BUTTON oBtn OF oBar ;
MESSAGE FWString( "Go to first page" ) ;
ACTION ::TopPage() ;
TOOLTIP FWString( "First" )
** Esta asi en 2212
2501 DEFINE BUTTON oBtn OF oBar ;
MESSAGE FWString( "Go to first page" ) ;
ACTION ( This, ::TopPage() ) ;
TOOLTIP FWString( "First" )
**Esta asi en 2501
2212 DEFINE BUTTON oBtn OF oBar ;
MESSAGE FWString( "Go to previous page" ) ;
ACTION ::PrevPage() ;
TOOLTIP FWString( "Previous" )
**Esta asi en la 2212
2501 DEFINE BUTTON oBtn OF oBar ;
MESSAGE FWString( "Go to previous page" ) ;
ACTION ( This, ::PrevPage() ) ;
TOOLTIP FWString( "Previous" )
**Asi en la 2501
Y TODOS LOS BOTONES DE LA BARRA NO TIENEN THIS EN LA BARRA de la 2212
2212 ::oMeta1:blDblClick := { | nRow, nCol, nKeyFlags | ;
::SetOrg1( nCol, nRow, nKeyFlags ),;
If ( ::lListViewHide, nil, If( ::lZoom, ::oLvw:Hide(), ::oLvw:Show() ) ) }
** esta as version 2212
2501 ::oMeta1:blDblClick := { || ;
::Zoom(),;
If ( ::lListViewHide, nil, If( ::lZoom, ::oLvw:Hide(), ::oLvw:Show() ) ) }
** esta asi en la 2501
2212 ::oMeta2:blDblClick := { | nRow, nCol, nKeyFlags | ;
::SetOrg2( nCol, nRow, nKeyFlags ),;
If ( ::lListViewHide, nil, If( ::lZoom, ::oLvw:Hide(), ::oLvw:Show() ) ) }
** diferencia entre 2212 y 2501
2501 ::oMeta2:blDblClick := { || ;
::Zoom(),;
If ( ::lListViewHide, nil, If( ::lZoom, ::oLvw:Hide(), ::oLvw:Show() ) ) }
2501 if IsAppThemed()
nCol += 75
endif
** no esta en 2212 // NO ESTABA IMPLEMENTADO TODAVIA
2212 ON CHANGE oThis:SetFactor( oThis:nZFactor )
** estan diferentes
2501 ON CHANGE ( Self, oThis:SetFactor( oThis:nZFactor ) )
2212 local lThemed := IsAppThemed()
2501 no Esta
2212 METODO BUILDMENU class TPreview
** Muchas diferencias con la version 2501
2212 local nWidth, nHeight, nMaxWidth, nAspect, nMetaWidth, nGutter
** falta nHeight en 2501
2501 local nHeight, nMaxWidth, nAspect, nMetaWidth, nGutter
METODO SETORG1 Y SETORG 2
** muchas diferencias que en la 2501 no estan
2212 METHOD CheckMouseWheel( nKeys, nDelta, nXPos, nYPos ) CLASS TPreview
if ! ::lZoom
2501 METHOD CheckMouseWheel( nKeys, nDelta, nXPos, nYPos ) CLASS TPreview
( nXPos, nYPos )
if ! ::lZoom
2501 ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( Self, oPageIni:Disable(), oPageEnd:Disable(), .T. )
** no esta el self en la 2212
2212 METHOD PrintPage() CLASS TPreview
** Muchas diferencias con la 2501
2212 METHOD PrintPrv( oDlg, nOption, nPageIni, nPageEnd ) CLASS TPreview
** diferencias con la 2501
2212 METHOD SaveAsMenu() CLASS TPreview
** muchas diferencias con la 2501
2212 METHOD SaveAs( lPDF, cFile, lView ) CLASS TPreview
** diferebcias con la 2501
2212 METHOD SendEmail() CLASS TPreview
** diferencia con 2501
2212 function ConvertToWordDoc( oPreview )
** diferencias con la 2501
2212 Function ToWordDocViaWriter( oPreview, aFiles, cFileType )
local oWriter, oDesktop, oDoc, oCusor, oText, oGraphic, cEMF, cURL, i, aProp
2501 en las variables locales falta AdsCacheOpenCursors
Saludos
Ruben Fernandez
Dario Fernandez
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
- Antonio Linares
- Site Admin
- Posts: 44515
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: tPrinter
Ruben,
gracias por tus indicaciones.
Si nos proporcionas un PRG de como lo usas, podremos probarlo aqui y ver como ayudarte, gracias
gracias por tus indicaciones.
Si nos proporcionas un PRG de como lo usas, podremos probarlo aqui y ver como ayudarte, gracias
-
D.Fernandez
- Posts: 560
- Joined: Wed Jul 31, 2013 1:14 pm
- Location: Maldonado - Uruguay
- Contact:
Re: tPrinter
Hola Antonio,
Preparo uno y lo pongo acá.
Aquí ya es muy tarde. 3.09 Am.
Gracias, saludos
Ruben Dario Fernandez
Preparo uno y lo pongo acá.
Aquí ya es muy tarde. 3.09 Am.
Gracias, saludos
Ruben Dario Fernandez
Dario Fernandez
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
-
D.Fernandez
- Posts: 560
- Joined: Wed Jul 31, 2013 1:14 pm
- Location: Maldonado - Uruguay
- Contact:
Re: tPrinter
Maestro, aquí va
Boton "Imprimir"
En el preview boton PDF (Acrobat) y cuando solicita verlo poner si.
Boton "Imprimir"
En el preview boton PDF (Acrobat) y cuando solicita verlo poner si.
Code: Select all | Expand
#include "FiveWin.ch"
#include "Ribbon.ch"
function Main()
local n, oWin, oFont
DEFINE DIALOG oDlg SIZE 1000,500
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
@ 10, 10 BUTTON oBtn PROMPT "Imprime" OF oDlg ACTION Imprime() FONT oFont
ACTIVATE DIALOG oDlg
oFont:End()
return nil
FUNCTION IMPRIME()
PRINT oPrn NAME "nada" PREVIEW MODAL
oPrn:lPrvModal:=.t.
oPrn:SetPage(1)
oPrn:SetPortrait()
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
PAGE
ENDPAGE
ENDPRINT
RETURN nilDario Fernandez
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
- Antonio Linares
- Site Admin
- Posts: 44515
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: tPrinter
Rubén, verifica que no estés utilizando el comando FROM USER en el comando PRINT.
Regards, saludos
Regards, saludos
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Re: tPrinter
Estimado Antonio, por favor prueba usando el comando FROM USER en WINDOWS 11. En el foro de Fivewin Brasil informaron que no funciona.
Regards, saludos.
Code: Select all | Expand
// C:\FWH\SAMPLES\RUBEN01.PRG
#include "FiveWin.ch"
FUNCTION Main()
LOCAL n, oDlg, oFont, oBtn
DEFINE FONT oFont NAME "TAHOMA" SIZE 0, - 14
DEFINE DIALOG oDlg SIZE 1000, 500 FONT oFont
@ 10, 10 BUTTON oBtn PROMPT "Imprime" OF oDlg ACTION Imprime()
@ 10, 20 BUTTON oBtn PROMPT "Salida " OF oDlg ACTION( oDlg:End ) CANCEL
ACTIVATE DIALOG oDlg
oFont:End()
RETURN NIL
FUNCTION Imprime()
LOCAL oPrn
PRINT oPrn NAME "Nada" PREVIEW MODAL FROM USER
oPrn:lPrvModal := .T.
oPrn:SetPage(1)
oPrn:SetPortrait()
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
PAGE
oPrn:Say( 20, 20, "This is a test in Portrait" )
ENDPAGE
ENDPRINT
RETURN NIL
// FIN / END
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- Antonio Linares
- Site Admin
- Posts: 44515
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: tPrinter
Gracias Maestro. Probablemente fue una falla de la versión de Windows 11. ¿Nada.PDF se abre perfectamente en ADOBE? Si es así, asunto cerrado.
Gracias, tks.
Regards, saludos.
Gracias, tks.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
-
D.Fernandez
- Posts: 560
- Joined: Wed Jul 31, 2013 1:14 pm
- Location: Maldonado - Uruguay
- Contact:
Re: tPrinter
Hola Maestro.
Luego de dar el boton (Adobe) para pasar a PDF, me pregunta si quiero abrirlo y no lo encuentra.
El PDF se genera bien, pero no puedo abrirlo cuando se genera desde el programa FWH, porque dice que no esta.
Gracias
Ruben Dario Fernandez
Luego de dar el boton (Adobe) para pasar a PDF, me pregunta si quiero abrirlo y no lo encuentra.
El PDF se genera bien, pero no puedo abrirlo cuando se genera desde el programa FWH, porque dice que no esta.
Gracias
Ruben Dario Fernandez
Dario Fernandez
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
- Antonio Linares
- Site Admin
- Posts: 44515
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: tPrinter
> Luego de dar el boton (Adobe) para pasar a PDF, me pregunta si quiero abrirlo y no lo encuentra.
Te muestra la ruta completa ? Aqui si
Te muestra la ruta completa ? Aqui si
-
D.Fernandez
- Posts: 560
- Joined: Wed Jul 31, 2013 1:14 pm
- Location: Maldonado - Uruguay
- Contact:
Re: tPrinter
Si Maestro, me muestra la ruta competa.
Si solo le doy al boton PDF y no lo quiero ver, crea el PDF con 0 byte y luego de unos momentos se crea definitivamente.
Gracias
Ruben Fernandez
Si solo le doy al boton PDF y no lo quiero ver, crea el PDF con 0 byte y luego de unos momentos se crea definitivamente.
Gracias
Ruben Fernandez
Dario Fernandez
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
Re: tPrinter
// PRV2PDF.PRG - Ruben, mira aqui:
Regards, saludos.
Code: Select all | Expand
function FWSavePreviewToPDF( oDevice, cPDF, lOpen ) // oDevice can be oPrinter or oPreview
local cOrient, oPDF, cPRGPATH
local hWnd
if oDevice:IsKindOf( "TPREVIEW" )
hWnd := oDevice:oWnd:hWnd
oDevice := oDevice:oDevice
endif
#ifndef USEGDI
if LoadFreeImage() <= 32
MsgAlert( FWString( "freeimage.dll not found" ), FWString( "Alert" ) )
return nil
endif
#endif
PRIVATE CDIRPLENO
// MODIFICADO EM: 14/03/2016 PARA SALVAR O PDF NA PASTA: C:\NFEPDF
cPRGPATH := cFILEPATH( "C:\NFEPDF\" )
lCHDIR(cPRGPATH)
// ? hb_CurDrive() + ":\" + CurDir() + "\"
DEFAULT cPDF := cGetFile( FWString( "PDF files | *.pdf |" ),;
FWString( "Select PDF File to Save" ),, ;
CurDir(), .T.,,,;
hb_CurDrive() + ":\" + CurDir() + "\" + ;
If( oDevice:IsKindOf( "TPreview" ),;
oDevice:cName, oDevice:cDocument ) + ".pdf" )
if ! Empty( cPDF )
cPDF = cFileSetExt( cPDF, "pdf" )
CursorWait()
cOrient = If( oDevice:nHorzSize() > oDevice:nVertSize(), 'L', 'P' )
oPdf = fwPdf():New( cPdf, cOrient )
AEval( oDevice:aMeta, { | cMeta | oPdf:AddMeta( cMeta ) } )
oPdf:Close()
CursorArrow()
DEFAULT lOpen := MsgYesNo( If( FWLanguageID() == 2, FWString( "¿" ) + " ", "" ) + ;
FWString( "View" ) + ;
" " + cPDF + " " + FWString( "(Y/N)" ) + " ?",;
FWString( "Please select" ) )
if lOpen
ShellExecute( IfNil( hWnd, GetWndDefault() ), "open", cPDF )
endif
else
cPDF := nil
endif
// VOLTO AO DIRETORIO DO PLENO PARA NAO QUEBRAR OS BANCOS. 14/03/2016 Joao
lCHDIR( cDirPleno )
// Ruben, aqui:
? hb_CurDrive() + ":\" + CurDir() + "\"
return cPDF
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341