PageScript 32 Library from Harbour ?

1,290 views
Skip to first unread message

ChrisGillard

unread,
Oct 19, 2012, 5:56:13 AM10/19/12
to harbou...@googlegroups.com
PageScript 32 is W32 printing library from AbeeLabs.com which I successfully use from xHarbour but now would like to use from Harbour.
 
There is a file tpscript.prg and a dllcall.c file which have the source of some wrapper/helper functions which you add to your xHarbour project.
 
Tpscript.prg & dllcall.c appear to compile ok under Harbour but the link shows 4 Pagescript functions as undefined.
 
I'm afraid looking at the .prg and .c to do with calling dll functions is well beyond me.
 
I am hoping that it should be fairly easy but anyone already achieved this would be good!
 
Thanks
 
Chris
 
  

vszakats

unread,
Oct 19, 2012, 6:22:01 AM10/19/12
to harbou...@googlegroups.com
Hi Chris,
You'll find necessary files in /extras/ps32/ of Harbour source distro.
(or /examples/ps32/ in 3.0.0)

-- Viktor

ChrisGillard

unread,
Oct 22, 2012, 7:54:33 AM10/22/12
to harbou...@googlegroups.com
Hi Viktor,
 
Thank you for your reply and good news that Harbour already has support for PS32 .... with a little work I have it working.
 
I found that the patch file did not appear to change my tpscript.prg file so I attempted to do the edits manually from the .def file ..... only 3 or 4 changes thankfully.
 
I then traced that I needed hbxpp.lib and all is fine now.
 
Thanks again for your help.
 
Regards
 
Chris

gabo

unread,
Oct 22, 2012, 11:41:48 AM10/22/12
to harbou...@googlegroups.com
His Chris
Please you can publish the changes made..
Regards

Zeljko

unread,
Oct 23, 2012, 1:14:56 AM10/23/12
to harbou...@googlegroups.com
I tried to follow the instructions in the samples folder, but they didn't work for me. I tried this small Hello world program:

#include "PScript.ch"
FUNCTION Main()
   if PSInit() == 0
        BEGINDOC USING PSGetDefPrinter() TITLE "Hello world"
                PSSetUnit(APS_TEXT)
                @ 5,5 TEXTOUT "HELLO world"
        ENDDOC
   else
       alert("PageScript not responding or not installed")
  endif

But the result of PSInit is always different from 0 (PageScript not installed). I installed a trial version from Abee Labs and I am running Windows 7. I tried it with Harbour 3.0. What are the necessary manual modifications to make this work?

ChrisGillard

unread,
Oct 23, 2012, 4:11:26 AM10/23/12
to harbou...@googlegroups.com
Hi gabo, Zelkjo,
 
Attached are two screen shots of the small changes that worked for me.
 
I started with the pscript.prg from the AbbeLabs \ps32\xHarbour folder and implemented the changes shown in the .def file suggested by vszakats.
 
Please ignore the #else as this may be related to me using Xailer sometimes with this pscript.prg.
 
The second change is to do with psinit so may help those problems.
 
For the link you need to include hbxpp.lib
 
Seems to work OK for me.
 
Good luck.
 
Chris
pscript for harbour 1.png
pscript for harbour 2.png

Vikram Chhajer

unread,
Nov 17, 2019, 10:54:47 AM11/17/19
to Harbour Users
Hello Chirs 

Can You provide me the sample prg i want to that how to start pagescprit , havent done before . so please provide  a sample prg . 

Thanks 
Vikram

Franz

unread,
Nov 18, 2019, 3:42:07 AM11/18/19
to Harbour Users
Mini Sample to get PDF , change PSSetDevice do print

#include "minigui.ch"
#include "PSCRIPT.CH"

Function Main

  cFiletoSave := "TEST.pdf"

   if PSInit() = 0

  PSSetDevice( 3 ) && PDF
  PSSetFileName(cFiletoSave)
  PSSetUnit(APS_MILL)
  PSSetCPI(12)
  
  PSBeginDoc(, "test", APS_PORTRAIT)
  
  @ 10,10 FRAME TO 110, 110  THICKNESS 2  COLOR APS_BCYAN, APS_BLUE     PATTERN APS_FDIAGONAL

  @ 15,15 BITMAP "PS4.JPG" COLOR RGB(255,253,254)   && BORDER COLOR OF PS4.JPG
  @ 55,15 BITMAP "PS4.BMP" COLOR RGB(255,253,254)   && BORDER COLOR OF PS4.JPG
  @ 95,15 BITMAP "PS4.GIF" COLOR RGB(251,252,251)   && BORDER COLOR OF PS4.JPG
  @ 15,100 BITMAP "PROVA.GIF" COLOR RGB(-255,-255,-255)

  PsEndDoc()

  ShellExecute(0,"open",cFiletoSave,,,0)

  endif

return Nil

Vikram Chhajer

unread,
Nov 18, 2019, 4:23:30 AM11/18/19
to harbou...@googlegroups.com
Thank you but using harbour 3.2
How will include Minigui.ch  
 Vikram


On 18-Nov-2019, at 2:12 PM, Franz <fr...@valgraveglia.net> wrote:


--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to a topic in the Google Groups "Harbour Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/harbour-users/xX620gnMXRo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/3c321f98-1bf2-4f19-9aa1-f3f5a875e615%40googlegroups.com.

Franz

unread,
Nov 18, 2019, 4:27:03 AM11/18/19
to Harbour Users
no need minigui.ch in this sample

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to a topic in the Google Groups "Harbour Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/harbour-users/xX620gnMXRo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to harbou...@googlegroups.com.

Vikram Chhajer

unread,
Nov 18, 2019, 1:01:19 PM11/18/19
to Harbour Users
Hello 
After Compling Getting this Error


hbmk2: Linking... main.exe
.hbmk/win/mingw/ps.o:ps.c:(.data+0x28): undefined reference to `HB_FUN_PSINIT'
.hbmk/win/mingw/ps.o:ps.c:(.data+0x38): undefined reference to `HB_FUN_PSSETDEVICE'
.hbmk/win/mingw/ps.o:ps.c:(.data+0x48): undefined reference to `HB_FUN_PSSETFILENAME'
.hbmk/win/mingw/ps.o:ps.c:(.data+0x58): undefined reference to `HB_FUN_PSSETUNIT'
.hbmk/win/mingw/ps.o:ps.c:(.data+0x68): undefined reference to `HB_FUN_PSSETCPI'
.hbmk/win/mingw/ps.o:ps.c:(.data+0x78): undefined reference to `HB_FUN_PSBEGINDOC'
.hbmk/win/mingw/ps.o:ps.c:(.data+0x88): undefined reference to `HB_FUN_PSFRAME'
.hbmk/win/mingw/ps.o:ps.c:(.data+0x98): undefined reference to `HB_FUN_PSBITMAP'
.hbmk/win/mingw/ps.o:ps.c:(.data+0xa8): undefined reference to `HB_FUN_PSENDDOC'
.hbmk/win/mingw/ps.o:ps.c:(.data+0xb8): undefined reference to `HB_FUN_SHELLEXECUTE'
collect2: ld returned 1 exit status
hbmk2[main]: Error: Running linker. 1
gcc.exe .hbmk/win/mingw/ps.o .hbmk/win/mingw/_hbmkaut_ps.o    -Wl,--nxcompat -Wl,--dynamicbase -mwindows -Wl,--start-group -lhbnf -lhbformat -lhbfoxpro -lxhb -lhbct -lhbtip -lhbfship -lhbxpp -lhbwin -lpng -lhbziparc -lhbmzip -lminizip -lhbhpdf -llibhpdf -lhbzebra -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib   -Wl,--end-group -omain.exe  -Lc:/hb32/lib/win/mingw

hbmk2: Error: Referenced, missing, but unknown function(s): PSINIT(),
       PSSETDEVICE(), PSSETFILENAME(), PSSETUNIT(), PSSETCPI(), PSBEGINDOC(),
       PSFRAME(), PSBITMAP(), PSENDDOC(), SHELLEXECUTE()
Message has been deleted

d s

unread,
Nov 18, 2019, 3:51:19 PM11/18/19
to Harbour Users
Hi Vikram.
I am sending you pagescript32.abc file. Please rename it to pagescript32.chm and tou will get PageScript guide.  For beginning find and read chapter First steps. Also you can find full list of PageScript funkctions and how to use it.
Best regards,
Simo.

pagescript32.abc

Hurricane

unread,
Nov 26, 2019, 12:35:47 PM11/26/19
to Harbour Users
Hi,
I know PS (I did consulting for third parties), and recommend other alternatives (with everything: be known, with users, support, website, forum, documentation, updated. Today began the discount):
a) FRX - FastReport for [x]Harbour (console, GUI) - It is one of the best generators in the world.
or/and
b) Xailer/GUI/RAD - It is the only robust, complete and intuitive development environment (includes printing, SQL and more)

regards,

Franz

unread,
Nov 26, 2019, 12:44:22 PM11/26/19
to Harbour Users
I use PScript from Clipper time. Very very good solution. With Harbour I started using hbprinter because I bought PScript for Clipper but not for Harbour. Now I use PScript for Harbour same good results as with hbprinter but with very useful PDF capacity so no more need of PDFCreator.
Franz

Vikram Chhajer

unread,
Nov 26, 2019, 8:55:16 PM11/26/19
to harbou...@googlegroups.com
Sir can you give me one example file 
actually dont know how to start and how to to put all print command to pagescript . Wheter have to change all prg which i am using right now for printing or same will work with little bit changes . 
Thanks 
Vikram

Sent from my iPhone

On 26-Nov-2019, at 11:14 PM, Franz <fr...@valgraveglia.net> wrote:


I use PScript from Clipper time. Very very good solution. With Harbour I started using hbprinter because I bought PScript for Clipper but not for Harbour. Now I use PScript for Harbour same good results as with hbprinter but with very useful PDF capacity so no more need of PDFCreator.
Franz

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to a topic in the Google Groups "Harbour Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/harbour-users/xX620gnMXRo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/5dd64675-c868-42bc-8f19-a7ced9865627%40googlegroups.com.

oleksa

unread,
Nov 27, 2019, 2:30:22 AM11/27/19
to harbou...@googlegroups.com
Hi!


And you need a PSCRIPT.dll in your app folder.

Regards,
Alexey Myronenko

27 листопада 2019, 03:55:18, від "Vikram Chhajer" <vikram...@gmail.com>:

You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/0B745142-F13B-4748-BA4F-38404291C19F%40gmail.com.
Reply all
Reply to author
Forward
0 new messages