Hola a todos,
Como establecerían el uso del tamaño de página A6 en PRINTER?
He mirado el código y parece ser que no lo contempla. :(
Muchas gracias
Un Saludo
Carlos G.
FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home
Hola a todos,
Como establecerían el uso del tamaño de página A6 en PRINTER?
He mirado el código y parece ser que no lo contempla. :(
Muchas gracias
Un Saludo
Carlos G.
FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home
https://forums.fivetechsupport.com/viewtopic.php?p=64317#p64317
Intenta asi:
#include "FiveWin.ch"
#include "WinGdi.ch" // Necessário para constantes DMPAPER_
function PrintA6()
local oPrn
// DMPAPER_A6 = 70
PRINT oPrn NAME "Impressão A6" PREVIEW
oPrn:SetSize( 1050, 1480 ) // Dimensões em décimos de mm (105mm x 148mm)
// Alternativamente, forçar o formulário:
// oPrn:hDC // ... configurar a estrutura DEVMODE
ENDPRINT
return nilRegards, saludos.
No pude encontrar "WinGdi.ch" en la carpeta XHARBOUR. No lo entiendo.
Regards, saludos.
Look inside wingdi.h of your C compiler.
Enrico Maria Giordano wrote:Look inside wingdi.h of your C compiler.
Thanks Enrico. They already sent me the "WinGdi.ch" file. I don't know what happened, but in previous versions of XHARBOUR, the "WinGdi.ch" file was included. In the newer versions of XHARBOUR, it's not included. Do you know why?
Gracias, Enrico. Ya me enviaron el archivo "WinGdi.ch". No sé qué pasó, pero en versiones anteriores de XHARBOUR, el archivo "WinGdi.ch" venía incluido. En las versiones más recientes, no lo viene. ¿Sabes por qué?
Gracias, tks.
Regards, saludos.
No, wingdi.ch has never been included with xHarbour. It belongs to xharbour-builder.
Voy a probarlo.
Muchas gracias João y Enrico
Un Saludo
Carlos G.
FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home
Enrico Maria Giordano wrote:No, wingdi.ch has never been included with xHarbour. It belongs to xharbour-builder.
Good afternoon Enrico, in 2015, someone sent me, or I downloaded from somewhere that I don't remember now, the WINDGI.CH file, in this version and in another that I found on a backup hard drive I have here. I don't know if the version was modified by whoever sent it to me.
Question: Does WINDGI.CH not work with xHarbour Simplex?
Buenas tardes Enrico, en 2015 alguien me envió, o lo descargué de algún sitio que ahora no recuerdo, el archivo WINDGI.CH, en esta versión y en otra que encontré en un disco duro de respaldo que tengo aquí. Desconozco si la versión fue modificada por quien me lo envió.
Pregunta: ¿WINDGI.CH no funciona con xHarbour Simplex?
Download del XHB010315:
https://mega.nz/file/5JtXnLrA#DDgO71UkF60d-5Pwtdy4oYxPbS7U7M-MaUSk9hymh7s
Gracias, tks.
Regards, saludos.
You can download the file wingdi.ch from the xHarbour Builder repository. I can download it for you if you can't. Just write me an email.
Imprimir en formato A6 (\(105 \times 148\) mm), Aparentemente, el archivo "WinGdi.ch" no es necesario en xHarbour simplex.
// C:\FWH2603\SAMPLES\PRNFORM6.PRG - version Beta funcionando. jajajaja.
#Include "FiveWin.ch"
#define PAD_LEFT 0
#define PAD_RIGHT 1
#define PAD_CENTER 2
FUNCTION PrintA6()
LOCAL oPrn, oFont, oPen
LOCAL cText := MemoRead( "testprn5.prg" )
Local nLinI, nColI, nLinF, nColF
// Definir impresora: A6 = 105mm x 148mm
// Los valores suelen estar en décimas de mm (1050, 1480)
// o en unidades de la impresora.
TPrinter():lUseHaruPDF := .T.
// PrnSetSize( 1050, 1480 ) // 105mm x 148mm Puede ser aqui tambien.
// PRINT oPrn PREVIEW FILE "prueba.pdf" // EN .PDF
PRINT oPrn NAME "Impresion A6" PREVIEW MODAL
DEFINE FONT oFont NAME "Courier New" SIZE 0, -10 OF oPrn
DEFINE PEN oPen WIDTH 2 OF oPrn
// Intenta configurar el tamaño personalizado
oPrn:SetSize( 1050, 1480 ) // 105mm x 148mm
oPrn:SetPortrait() //Vertical
PAGE
// @ 1,1 PRINT TO oPrn TEXT cText SIZE 6,9 INCHES FONT oFont
oPrn:SayBitmap( 1, 1, "..\bitmaps\fivewin.bmp" )
nLinI := 0.90
nColI := 0.90
nLinF := 10.6
nColF := 10.0
oPrn:Cmtr2Pix(@nLinI, @nColI)
oPrn:cmtr2Pix(@nLinF, @nColF)
oPrn:Box(nLinI, nColI, nLinF, nColF, oPen )
oPrn:cmSay( 1.0, 1.0, "Superior Izquierda", oFont,,CLR_BLACK,,PAD_LEFT )
oPrn:cmSay( 1.0, 07.5, "Superior Centro", oFont,,CLR_BLACK,,PAD_CENTER )
// oPrn:cmSay( 1.0, 15.0, "Superior Derecha", oFont,,CLR_BLACK,,PAD_RIGHT )
// oPrn:cmSay(15.0, 1.0, "Inferior Izquierda", oFont,,CLR_BLACK,,PAD_LEFT )
// oPrn:cmSay(15.0, 10.5, "Inferior Centro", oFont,,CLR_BLACK,,PAD_CENTER )
// oPrn:cmSay(15.0, 15.0, "Inferior Derecha", oFont,,CLR_BLACK,,PAD_RIGHT )
ENDPAGE
ENDPRINT
RELEASE FONT oFont
RETURN NIL
// FIN / ENDRegards, saludos.
Enrico Maria Giordano wrote:You can download the file wingdi.ch from the xHarbour Builder repository. I can download it for you if you can't. Just write me an email.
Enrico, I've never used the commercial xHarbour, xHarbour Builder repository: Where can I download it to test?
Gracias, tks.
Regards, saludos.