How to use OPRN and error pdf2.prg sample
How to use OPRN and error pdf2.prg sample
Hello, I'm trying to run pdf2.prg from your test server: https://www.modharbour.org/modharbour_samples/pdf2.prg.
However I am getting the error:
Error: Can't open #include file 'hbclass.ch'
called from: __PP_PROCESS, line: 0
called from: ../apache.prg, EXECUTE, line: 130
Source:
0128: ENDCLASS
0129:
0130 =>//------------------------------------------------------------------------------
0131:
0132: METHOD New( cFileName, cPassword, cOwnerPassword, nPermission, lPreview ) CLASS TPdf
could they help me? I would like to use this example in my hosting at https://xbhosts.com/.
However I am getting the error:
Error: Can't open #include file 'hbclass.ch'
called from: __PP_PROCESS, line: 0
called from: ../apache.prg, EXECUTE, line: 130
Source:
0128: ENDCLASS
0129:
0130 =>//------------------------------------------------------------------------------
0131:
0132: METHOD New( cFileName, cPassword, cOwnerPassword, nPermission, lPreview ) CLASS TPdf
could they help me? I would like to use this example in my hosting at https://xbhosts.com/.
- Patricio Avalos Aguirre
- Posts: 1028
- Joined: Fri Oct 07, 2005 1:56 pm
- Location: La Serena, Chile
- Contact:
Re: How to use OPRN and error pdf2.prg sample
hello
Code: Select all
// {% hb_SetEnv( "HB_INCLUDE", "C:\hb30web\include" ) %}
STATIC aTtfFontList:= NIL
STATIC cFontDir
//--- problemas con cos,sin
function Main()
local def_font, tw, i := 0
local cPageTitle := "Title of the page"
local font_list := { "Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique",;
"Helvetica", "Helvetica-Bold", "Helvetica-Oblique", "Times-Roman",;
"Times-Bold", "Times-Italic", "Times-BoldItalic", "Symbol", "ZapfDingbats" }
local oPrn
oPrn := TPdf():New( "list" )
oPrn:LoadedFonts := font_list
if Empty( oPrn:hPdf )
? "PDFs not available!"
return NIL
endif
oFont1 := oPrn:DefineFont( 'Helvetica', 24 )
oFont3 := oPrn:DefineFont( 'Helvetica', 16 )
oFont2 := oPrn:DefineFont( 'Helvetica-Bold', 16 )
oPrn:StartPage()
height := oprn:nVertSize()
width := oprn:nHorzSize()
oPrn:Rect( 10, 10, height-20, width-20 , 1 )
oPrn:cmSay( 2, 7, cPageTitle, oFont1 )
x = 90
for n = 1 to Len( font_list )
samp_text = "abcdefgABCDEFG12345!#$%&+-@?"
oFont2 = oPrn:DefineFont( font_list[ n ], 16 )
oPrn:Say( x + n * 40, 30, font_list[ n ], oFont2 )
oPrn:Say( x + n * 40, 220, samp_text, oFont2 )
next
oPrn:EndPage()
oPrn:Save( hb_GetEnv( "PRGPATH" ) + "/test2.pdf" )
oPrn:end()
?? "<iframe src='test2.pdf' style='width:calc( 100% + 16px );height:100%;border:0px;margin:-8px;'></iframe>"
return nil
Saludos
Patricio
__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Patricio
__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Re: How to use OPRN and error pdf2.prg sample
After use your code:
Error: Unknown or unregistered symbol
operation: TPDF
called from: ../../apache.prg, (b)MAIN, line: 50
called from: HB_HRBLOAD, line: 0
called from: ../../apache.prg, EXECUTE, line: 116
called from: ../../apache.prg, MAIN, line: 61
Error: Unknown or unregistered symbol
operation: TPDF
called from: ../../apache.prg, (b)MAIN, line: 50
called from: HB_HRBLOAD, line: 0
called from: ../../apache.prg, EXECUTE, line: 116
called from: ../../apache.prg, MAIN, line: 61
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: How to use OPRN and error pdf2.prg sample
Please, how to mod_harbour update on xbHosts.com sever?
and how to find release of mod_harbour in 32bits for my local workspace server?
and how to find release of mod_harbour in 32bits for my local workspace server?
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: How to use OPRN and error pdf2.prg sample
> Please, how to mod_harbour update on xbHosts.com sever?
cd mod_harbour
git pull
> and how to find release of mod_harbour in 32bits for my local workspace server?
Is it for Windows 32 ?
cd mod_harbour
git pull
> and how to find release of mod_harbour in 32bits for my local workspace server?
Is it for Windows 32 ?
Re: How to use OPRN and error pdf2.prg sample
>> after execute:
cd mod_harbour
git pull
some error in access sample: http://54.37.60.42/modharbour_samples/pdf2.prg:
Error: Can't open #include file 'hbclass.ch'
called from: __PP_PROCESS, line: 0
called from: ../source/exec.prg, EXECUTE, line: 64
Source:
0062: DATA LoadedFonts
0063: DATA aPages
0064 => DATA nCurrentPage
0065:
0066: DATA nPageSize INIT HPDF_PAGE_SIZE_A4
and after access http://54.37.60.42/jbiloja/index.prg
Error: Unknown or unregistered symbol
operation: AP_HEADERSIN
called from: HB_HRBLOAD, line: 0
called from: ../source/exec.prg, EXECUTE, line: 70
Source:
0068: endif
0069:
0070 =>
0071:
0072:
>> about mod_harbour32.zip with 3.2.0 where's find this file?
Thank you very much for your attention so far!
cd mod_harbour
git pull
some error in access sample: http://54.37.60.42/modharbour_samples/pdf2.prg:
Error: Can't open #include file 'hbclass.ch'
called from: __PP_PROCESS, line: 0
called from: ../source/exec.prg, EXECUTE, line: 64
Source:
0062: DATA LoadedFonts
0063: DATA aPages
0064 => DATA nCurrentPage
0065:
0066: DATA nPageSize INIT HPDF_PAGE_SIZE_A4
and after access http://54.37.60.42/jbiloja/index.prg
Error: Unknown or unregistered symbol
operation: AP_HEADERSIN
called from: HB_HRBLOAD, line: 0
called from: ../source/exec.prg, EXECUTE, line: 70
Source:
0068: endif
0069:
0070 =>
0071:
0072:
>> about mod_harbour32.zip with 3.2.0 where's find this file?
Thank you very much for your attention so far!
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: How to use OPRN and error pdf2.prg sample
Please create a /url/include/harbour folder and place all Harbour CH files there:
sudo mkdir /url/include/harbour
sudo cp -R /home/user/harbour/include /url/include/harbour
mod_harbour Win32 version:
https://github.com/FiveTechSoft/mod_har ... harbour.so
https://github.com/FiveTechSoft/mod_har ... arbour.dll
sudo mkdir /url/include/harbour
sudo cp -R /home/user/harbour/include /url/include/harbour
mod_harbour Win32 version:
https://github.com/FiveTechSoft/mod_har ... harbour.so
https://github.com/FiveTechSoft/mod_har ... arbour.dll
Re: How to use OPRN and error pdf2.prg sample
I performed the procedures above and when accessing: "http://54.37.60.42/modharbour_samples/pdf2.prg"
He returned:
Error: Can't open #include file 'hbclass.ch'
called from: __PP_PROCESS, line: 0
called from: ../source/exec.prg, EXECUTE, line: 64
Source:
0062: DATA LoadedFonts
0063: DATA aPages
0064 => DATA nCurrentPage
0065:
0066: DATA nPageSize INIT HPDF_PAGE_SIZE_A4
He returned:
Error: Can't open #include file 'hbclass.ch'
called from: __PP_PROCESS, line: 0
called from: ../source/exec.prg, EXECUTE, line: 64
Source:
0062: DATA LoadedFonts
0063: DATA aPages
0064 => DATA nCurrentPage
0065:
0066: DATA nPageSize INIT HPDF_PAGE_SIZE_A4
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: How to use OPRN and error pdf2.prg sample
Please modify the header file used in pdf2.prg to use:
#include "/usr/include/harbour/hbclass.ch"
#include "/usr/include/harbour/hboo.ch"
#include "/usr/include/harbour/hbclass.ch"
#include "/usr/include/harbour/hboo.ch"
Re: How to use OPRN and error pdf2.prg sample
Dear Antonio,
Many thanks.
Do you automatically update the examples on GitHub?
Best regards,
Otto
Many thanks.
Do you automatically update the examples on GitHub?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: How to use OPRN and error pdf2.prg sample
Dear Otto,
yes
yes
Re: How to use OPRN and error pdf2.prg sample
I put the suggested information in the header of the file but it generated the error:
------------
Error: Can't open #include file '/usr/include/harbour/hbclass.ch'
called from: __PP_PROCESS, line: 0
called from: ../source/exec.prg, EXECUTE, line: 64
Source:
------------
Would it be possible to "format" the server and create it again with the updated mod_harbour?
------------
Error: Can't open #include file '/usr/include/harbour/hbclass.ch'
called from: __PP_PROCESS, line: 0
called from: ../source/exec.prg, EXECUTE, line: 64
Source:
------------
Would it be possible to "format" the server and create it again with the updated mod_harbour?
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: How to use OPRN and error pdf2.prg sample
> Would it be possible to "format" the server and create it again with the updated mod_harbour?
Yes, sure, we are going to do it
Yes, sure, we are going to do it
Re: How to use OPRN and error pdf2.prg sample
Estimado Antonio
Hice el cambio sugerido y ahora sale:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Gracias por la ayuda
Hice el cambio sugerido y ahora sale:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Gracias por la ayuda
Saludos,
Adhemar C.
Adhemar C.