Problem with FiveWin and PDF995 on Windows 11.

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby leandro » Wed Feb 14, 2024 9:27 pm

Amigo Joao, gracias por responder

Con las libs que me enviaste, nos sale un nuevo error

Code: Select all  Expand view

Turbo Incremental Link 6.98 Copyright (c) 1997-2023 Embarcadero Technologies, Inc.
Error: Unresolved external '_HB_FUN_HPDF_USEUTFENCODINGS' referenced from C:\FWH2310\LIB\FIVEHX.LIB|FWPDF
Error: Unable to perform link
Link Error
 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby nageswaragunupudi » Thu Feb 15, 2024 1:06 am

We are using the library that comes with the FW2310 distribution.

The libraries in fwh\lib\xhb are only meant for xhb.com users but not xharbour users.

For xharbour link the libraries from "\xharbour\lib\"

Always the best way to know what libraries are to be linked, please open fwh\samples\buildx.bat and see the path and libraries included.

This is extract from buildx.bat
Code: Select all  Expand view
echo %hdirl%\hbhpdf.lib + >> b32.bc
echo %hdirl%\libharu.lib + >> b32.bc
 

and %hdirl% means xharbour\lib

I posted a sample above.
Please save that sample as it is to \fwh2310\samples folder and build it with buildx.bat and let us know if it is working for you.
We will take it forward from there.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10642
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby nageswaragunupudi » Thu Feb 15, 2024 1:54 am

byron.hopp wrote:I will try your suggestion, but I do have several "Extend Class TPrinter with Data" and "with Message", can this be the problem? I use this everywhere I print, if this is the problem, can I rename the class and solve the problem?


Yes.
Works correctly if you are using unmodified printer.prg
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10642
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby byron.hopp » Thu Feb 15, 2024 3:20 pm

So does lUseHaruPDF stay set to true until you set it back to false?
If I access the lUseHaruPDF through the Class does it still act as static?

Also even through using Haru may be the best, I would have to rewrite many of my print routines which uses Inch2Pix, and Pix2Inch.
And possibly many other methods.
Which I will rewrite to using Unit2Pix, and Pix2Unit, or may not need at all because of the cUnits parameter on most print methods.
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby Enrico Maria Giordano » Thu Feb 15, 2024 3:24 pm

byron.hopp wrote:So does lUseHaruPDF stay set to true until you set it back to false?
If I access the lUseHaruPDF through the Class does it still act as static?


Yes.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby nageswaragunupudi » Thu Feb 15, 2024 3:32 pm

byron.hopp wrote:So does lUseHaruPDF stay set to true until you set it back to false?
If I access the lUseHaruPDF through the Class does it still act as static?

Also even through using Haru may be the best, I would have to rewrite many of my print routines which uses Inch2Pix, and Pix2Inch.
And possibly many other methods.
Which I will rewrite to using Unit2Pix, and Pix2Unit, or may not need at all because of the cUnits parameter on most print methods.


Using cUnits parameter is the best option. That keeps compatibility between Pdf class and Printer class.

For now you can start creating PDF files with FWH without HaruPdf.
This command
Code: Select all  Expand view
PRINT oPrn FILE cFilePDF

directly creates PDF file even without HaruPdf.

You don't need it now but just for information:
Code: Select all  Expand view
PRINT oPrn FILE "test.png" / "test.jpg" etc

will save the output as an image file too.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10642
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby byron.hopp » Thu Feb 15, 2024 3:35 pm

Sweet, Thank you,
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby nageswaragunupudi » Thu Feb 15, 2024 3:42 pm

Also we advise using the PRINT commands from print.ch rather than directly using the methods.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10642
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby leandro » Thu Feb 15, 2024 3:56 pm

nageswaragunupudi wrote:
We are using the library that comes with the FW2310 distribution.

The libraries in fwh\lib\xhb are only meant for xhb.com users but not xharbour users.

For xharbour link the libraries from "\xharbour\lib\"

Always the best way to know what libraries are to be linked, please open fwh\samples\buildx.bat and see the path and libraries included.

This is extract from buildx.bat
Code: Select all  Expand view
echo %hdirl%\hbhpdf.lib + >> b32.bc
echo %hdirl%\libharu.lib + >> b32.bc
 

and %hdirl% means xharbour\lib

I posted a sample above.
Please save that sample as it is to \fwh2310\samples folder and build it with buildx.bat and let us know if it is working for you.
We will take it forward from there.


Gracias Mr. Rao con las librerías que nos indicaste se pudo compilar correctamente.

Pero, el proceso de generación de los pdf con EasyReport no funciona. Modificamos este ejemplo con las opciones que nos indicaste, pero genera un pdf en blanco.

El código del ejemplo de EasyReport modificado

erep01.prg
Code: Select all  Expand view


#include "FiveWin.ch"
#include "easyrep.ch"

// ----------------------------------------------------------------------------//

REQUEST FWHARU

FUNCTION Main()

   LOCAL aStates, aCust, aRow, nAt, nStateCol
   LOCAL oDlg,  oBrwStates, oBrwCust, oBtn

   TPrinter():lUseHaruPDF := .t.

   USE STATES
   aStates  := FW_DbfToArray()
   USE CUSTOMER
   nStateCol := FieldPos( "state" )
   aCust    := FW_DbfToArray()
   CLOSE CUSTOMER

   AEval( aStates, {| a| AAdd( a, Array( 0 ) ) } )
   FOR EACH aRow in aCust
      nAt   := AScan( aStates, {| a| a[ 1 ] == aRow[ nStateCol ] } )
      IF nAt > 0
         AAdd( aStates[ nAt, 3 ], aRow )
      ENDIF
   NEXT

   DEFINE DIALOG oDlg ;
      TITLE "EasyReport with Array" ;
      SIZE 1000, 600 ;
      PIXEL ;
      TRUEPIXEL

   @ 0, 0 ;
      BTNBMP oBtn ;
      PROMPT "EasyReport" ;
      OF oDlg ;
      ACTION DruckListe( aStates ) ;
      COLOR CLR_WHITE, CLR_MAGENTA ;
      FLAT  SIZE 100, 32

   @ 40, 20 XBROWSE oBrwStates SIZE 270, -20 PIXEL OF oDlg ;
          DATASOURCE aStates ;
          COLUMNS 1, 2 HEADERS "CODE", "NAME" ;
          CELL LINES NOBORDER

   WITH OBJECT oBrwStates
      :bChange := {|| oBrwCust:aArrayData := oBrwStates:aRow[ 3 ], ;
         oBrwCust:GoTop(), oBrwCust:Refresh() }
      :CreateFromCode()
   END

   @ 40, 290 ;
      XBROWSE oBrwCust ;
      OF oDlg ;
      PIXEL ;
      SIZE - 20, -20 ;
      DATASOURCE aStates[ 1, 3 ] ;
      COLUMNS 2, 3, 5, 6 ;
      HEADERS "FIRST", "LAST", "CITY", "STATE" ;
      CELL ;
      LINES ;
      NOBORDER

   WITH OBJECT oBrwCust
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED

   RETURN NIL

// -----------------------

FUNCTION DruckListe( aStates )

   LOCAL oVRD
   LOCAL lPreview       := .T.
   LOCAL cDruckerName   := ""
   LOCAL cTemp := ""
   LOCAL nNr := 1
   LOCAL nSeite := 0
   LOCAL nIdx := 0
   LOCAL I := 0
   LOCAL aTemp := {}
   local oPrn

   // ----------------------------------------------------------

   TPreview():lListViewHide := .f.

   EASYREPORT oVRD NAME "erep01\states.vrd" PREVIEW .t. //FILE "erep01.pdf"

   PRINTAREA 1 OF oVRD   ;
      ITEMIDS    { 101, 102 } ;
      ITEMVALUES { "Report with array", DToC(  Date() )  }

   PRINTAREA 2 OF oVRD;
      ITEMIDS    { 100 } ;
      ITEMVALUES { "Anyone have a sample how i can relationate 2 arrays (masterdata/detail) and pass to fastreport?" }

   PRINTAREA 7 OF oVRD

   FOR nIdx := 1 TO Len( aStates )

      PRINTAREA 3 OF oVRD ;
         ITEMIDS    { 100, 101,  102 } ;
         ITEMVALUES { "c:\fwh\samples\xVrd\kreis.jpg", aStates[ nIdx, 1 ], ;
         aStates[ nIdx, 2 ] }

      aTemp := aStates[ nIdx, 3 ]

      FOR I := 1 TO Len( aTemp )
         PRINTAREA 4 OF oVRD   ;
            ITEMIDS    { 102, 103, 104, 105 } ;
            ITEMVALUES { aTemp[ I, 2  ], aTemp[ I, 3  ], aTemp[ I, 4  ], aTemp[ I, 5  ] }

         IF oVRD:nNextRow > oVRD:nPageBreak
            nSeite := nSeite + 1

            PRINTAREA 5 OF oVRD   ;
               ITEMIDS    { 100 } ;
               ITEMVALUES { AllTrim( Str( nSeite ) ) }

            PAGEBREAK oVRD
            PRINTAREA 6 OF oVRD
            PRINTAREA 2 OF oVRD
            PRINTAREA 7 OF oVRD   ;
               ITEMIDS    { 120 } ;
               ITEMVALUES { DToC( Date() ) }
         ENDIF

      NEXT

   NEXT

   oVRD:End()

   RETURN NIL

// ----------------------------------------------------------------------------//


 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby nageswaragunupudi » Thu Feb 15, 2024 5:35 pm

Did you first try to build the sample I posted above with buildx.bat in the samples folder?
If you let me know if it is working for you or not, then I can advise you further
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10642
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby byron.hopp » Thu Feb 15, 2024 6:16 pm

I use BuildH.bat to compare. Let me do it again using BuildX.bat. No matter, your sample worked great when I tested even though I setup using the BuildH.bat for Libs. I did notice that my exe on me production program is much larger.
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby leandro » Thu Feb 15, 2024 6:25 pm

nageswaragunupudi wrote:Did you first try to build the sample I posted above with buildx.bat in the samples folder?
If you let me know if it is working for you or not, then I can advise you further


El ejemplo que publicaste al inicio funciona correctamente.

Image
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby byron.hopp » Thu Feb 15, 2024 7:37 pm

Yes, your sample works great, however my code utilizes many methods of the TPrinter class, and not all of them are duplicated in the FWPdf class.
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby byron.hopp » Thu Feb 15, 2024 9:59 pm

I am trying to create a new mak file based on the Buildx.bat, cannot find libharu.lib, anyone know where I can find this?
It is not in my Harbour Lib directory. Does this mean I might not have the right version of Harbour?
Thanks,
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: Problem with FiveWin and PDF995 on Windows 11.

Postby Enrico Maria Giordano » Thu Feb 15, 2024 10:11 pm

The correct names of the haru libraries are hbhpdf.lib and libhpdf.lib. Please look inside buildh.bat.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 88 guests