Metafile error

Metafile error

Postby Silvio.Falconi » Mon Oct 25, 2021 11:37 am

Image

suddenly while I was trying to do a print I got this message, how do I fix it?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: Metafile error

Postby karinha » Mon Oct 25, 2021 1:39 pm

Si todavía recuerdo esto:

REVISE SU CÓDIGO, DEBE TENER UN BUCLE ETERNO DENTRO DE LA PÁGINA ... STARTPAGE, O DUPLICAR ENDPAGE.

o llamando a ENDPRINT sin terminar con EndPage () (abrió una página con StartPage () y no se cerró con EndPage (), llamado ENDPRINT directamente).

//

If I still remember this:

REVIEW YOUR CODE, IT MUST HAVE AN ETERNAL LOOPING WITHIN STARTPAGE... ENDPAGE, OR DUPLICATE ENDPAGE.

or calling ENDPRINT without ending with EndPage() (opened a page with StartPage() and not closed with EndPage(), called ENDPRINT directly).
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7872
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Metafile error

Postby Silvio.Falconi » Tue Oct 26, 2021 7:26 am

karinha wrote:Si todavía recuerdo esto:

REVISE SU CÓDIGO, DEBE TENER UN BUCLE ETERNO DENTRO DE LA PÁGINA ... STARTPAGE, O DUPLICAR ENDPAGE.

o llamando a ENDPRINT sin terminar con EndPage () (abrió una página con StartPage () y no se cerró con EndPage (), llamado ENDPRINT directamente).

//

If I still remember this:

REVIEW YOUR CODE, IT MUST HAVE AN ETERNAL LOOPING WITHIN STARTPAGE... ENDPAGE, OR DUPLICATE ENDPAGE.

or calling ENDPRINT without ending with EndPage() (opened a page with StartPage() and not closed with EndPage(), called ENDPRINT directly).









Sorry,
I have this structure

PRINT oPrn PREVIEW TITLE cTitle //FROM USER
DEFINE FONT oFn1 NAME "ARIAL" SIZE 0,- 8 OF oPrn
DEFINE FONT oFn2 NAME "ARIAL" SIZE 0,- 8 BOLD OF oPrn
DEFINE FONT oFn3 NAME "ARIAL" SIZE 0,-11 BOLD OF oPrn
DEFINE FONT oFn4 NAME "ARIAL" SIZE 0,-16 BOLD OF oPrn

oPrn:lPrvModal:=.f.
oPrn:SetLandscape()

CursorWait()
// Page 1
PageBegin()

//here oPrn boxes and cmsay

endpage


// Page 2
PageBegin()

//here oPrn boxes and cmsay

endpage
oFn1:End(); oFn2:End(); oFn3:End();oFn4:End()
endPrint
RETURN NIL


What is wrong ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: Metafile error

Postby Otto » Tue Oct 26, 2021 8:59 am

********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: Metafile error

Postby Silvio.Falconi » Tue Oct 26, 2021 9:22 am

Otto wrote:http://forums.fivetechsupport.com/viewtopic.php?f=3&t=20484&p=108609&hilit=metafile&sid=238523c790cfe46bff34886f881266bc#p108609


First time you answer me according to the requested topic ... mhm do you want to make it snow? :D
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: Metafile error

Postby karinha » Tue Oct 26, 2021 12:54 pm

Code: Select all  Expand view  RUN

#Include "FiveWin.ch"

#define PAD_LEFT            0
#define PAD_RIGHT           1
#define PAD_CENTER          2

static oWnd

FUNCTION Main()

   DEFINE WINDOW oWnd FROM 1, 1 TO 20, 60 TITLE "Printing Silvio"

   @ 3, 3 BUTTON "&Print me" OF oWnd SIZE 80, 20 ;
      ACTION Imp_Silvio()

   ACTIVATE WINDOW oWnd

RETURN NIL

FUNCTION Imp_Silvio()

   LOCAL oPrn, oFn1, oFn2, oFn3, oFn4

   CursorWait()

   // oPrn:lPrvModal:=.f.  //-> For Classe REPORT.

   // Page 1
   //here oPrn boxes and cmsay
   PRINT oPrn NAME "Impresión en Vertical.." PREVIEW MODAL

      DEFINE FONT oFn1 NAME "ARIAL" SIZE 0,- 8 OF oPrn
      DEFINE FONT oFn2 NAME "ARIAL" SIZE 0,- 8 BOLD OF oPrn
      DEFINE FONT oFn3 NAME "ARIAL" SIZE 0,-11 BOLD OF oPrn
      DEFINE FONT oFn4 NAME "ARIAL" SIZE 0,-16 BOLD OF oPrn
 
      oPrn:SetPage(9)    // A4
      oPrn:SetPortrait() // Vertical

      PAGE

         oPrn:cmSay( 1.0,  1.0, "Superior Izquierda", oFn4,,CLR_BLACK,,PAD_LEFT  )

      ENDPAGE

   ENDPRINT

   // Page 2
   PRINT oPrn NAME "Impresión en Vertical.." PREVIEW MODAL

      DEFINE FONT oFn1 NAME "ARIAL" SIZE 0,- 8 OF oPrn
      DEFINE FONT oFn2 NAME "ARIAL" SIZE 0,- 8 BOLD OF oPrn
      DEFINE FONT oFn3 NAME "ARIAL" SIZE 0,-11 BOLD OF oPrn
      DEFINE FONT oFn4 NAME "ARIAL" SIZE 0,-16 BOLD OF oPrn
 
      oPrn:SetPage(9)    // A4
      oPrn:SetPortrait() // Vertical

      PAGE

         oPrn:cmSay(28.0, 10.5, "Inferior Centro",    oFn4,,CLR_BLACK,,PAD_CENTER )

      ENDPAGE

   ENDPRINT

   CursorArrow()

   oFn1:End()
   oFn2:End()
   oFn3:End()
   oFn4:End()

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

Re: Metafile error

Postby karinha » Tue Oct 26, 2021 3:23 pm

Code: Select all  Expand view  RUN

// \SAMPLES\METAFIL2.PRG

#Include "FiveWin.ch"

#define PAD_LEFT            0
#define PAD_RIGHT           1
#define PAD_CENTER          2

static oWnd

FUNCTION Main()

   DEFINE WINDOW oWnd FROM 1, 1 TO 20, 60 TITLE "Printing Silvio"

   @ 3, 3 BUTTON "&Print me" OF oWnd SIZE 80, 20 ;
      ACTION Imp_Silvio()

   ACTIVATE WINDOW oWnd

RETURN NIL

FUNCTION Imp_Silvio()

   LOCAL oPrn, oFn1, oFn2, oFn3, oFn4, nLine, n

   CursorWait()

   // oPrn:lPrvModal:=.f.  //-> For Classe REPORT.

   // Page 1
   //here oPrn boxes and cmsay
   PRINT oPrn NAME "Impresión en Vertical.." PREVIEW MODAL

      DEFINE FONT oFn1 NAME "ARIAL" SIZE 0,- 8 OF oPrn
      DEFINE FONT oFn2 NAME "ARIAL" SIZE 0,- 8 BOLD OF oPrn
      DEFINE FONT oFn3 NAME "ARIAL" SIZE 0,-11 BOLD OF oPrn
      DEFINE FONT oFn4 NAME "ARIAL" SIZE 0,-16 BOLD OF oPrn
 
      oPrn:SetPage(9)    // A4
      oPrn:SetPortrait() // Vertical

       nLine := 2.50

      PAGE

         FOR n = 1 to 80

            oPrn:cmSay( nLine,  3.0, "Silvio Falconi de Italia", oFn4,,CLR_BLACK,,PAD_LEFT  )

            nLine := nLine += 0.50

            IF nline >= 27.50

               nLine := 2.50

               ENDPAGE // New page

               PAGE    // Continue...

            ENDIF

         NEXT

         nLine := nLine += 0.80

         oPrn:cmSay( nLine,  3.0, "FiveWin Es Extremamente Facil", ;
            oFn4,, CLR_BLACK,, PAD_LEFT  )

         nLine := nLine += 0.80

         oPrn:cmSay( nLine,  3.0, "FiveWin The Best Of The World", ;
            oFn4,, CLR_BLACK,, PAD_RIGHT  )

         nLine := nLine += 1.00

         oPrn:cmSay( nLine,  5.0, "FIVEWINNERS BRASIL LOS MEJORES", ;
            oFn4,, CLR_BLACK,, PAD_LEFT  )


      ENDPAGE

   ENDPRINT

   CursorArrow()

   oFn1:End()
   oFn2:End()
   oFn3:End()
   oFn4:End()

   // QUIT

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests