Tamaño de página A6

Post Reply
FiveWiDi
Posts: 1467
Joined: Mon Oct 10, 2005 2:38 pm

Tamaño de página A6

Post by FiveWiDi »

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

User avatar
karinha
Posts: 8720
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Tamaño de página A6

Post by karinha »

viewtopic.php?p=64317#p64317

Intenta asi:

Code: Select all | Expand

#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 nil

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
Posts: 8720
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Tamaño de página A6

Post by karinha »

No pude encontrar "WinGdi.ch" en la carpeta XHARBOUR. No lo entiendo.

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
Posts: 8720
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Tamaño de página A6

Post by karinha »

Enrico Maria Giordano wrote: Thu Apr 30, 2026 6:13 pm

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.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Enrico Maria Giordano
Posts: 9054
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Tamaño de página A6

Post by Enrico Maria Giordano »

No, wingdi.ch has never been included with xHarbour. It belongs to xharbour-builder.

FiveWiDi
Posts: 1467
Joined: Mon Oct 10, 2005 2:38 pm

Re: Tamaño de página A6

Post by FiveWiDi »

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

User avatar
karinha
Posts: 8720
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Tamaño de página A6

Post by karinha »

Enrico Maria Giordano wrote: Fri May 01, 2026 7:16 pm

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#DDgO71UkF ... USk9hymh7s

Gracias, tks.

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Enrico Maria Giordano
Posts: 9054
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Tamaño de página A6

Post by Enrico Maria Giordano »

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.

User avatar
karinha
Posts: 8720
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Tamaño de página A6

Post by karinha »

Imprimir en formato A6 (\(105 \times 148\) mm), Aparentemente, el archivo "WinGdi.ch" no es necesario en xHarbour simplex.

Code: Select all | Expand

// 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 / END

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
Posts: 8720
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Tamaño de página A6

Post by karinha »

Enrico Maria Giordano wrote: Sat May 02, 2026 3:43 pm

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.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Post Reply