Printer Management

Started by Petrus Vorster, June 15, 2015, 01:48:23 PM

Previous topic - Next topic

Petrus Vorster

I suppose when they started this Freebasic project they were hoping to allow Qbasic code to compile for windows.
I don't think they had any idea back then that this may become something of interest to another compiler's gang of users.

I have been playing around a bit and since I make user tools that requires printing to paper a lot I find the help on that forum regarding Printing, Printer Management, and paper control (Borders, sizing, etc) not very helpful.
I downloaded a very promising .inc file that promised easy page and printer management, just to get a list of errors the length of a football field.

These guys work for free, so I don't want to tick someone off, so if anyone had played around with Paper formatting, borders, fonts and so forth then i would be grateful if they would share some ideas.
-Regards
Peter

Klaas Holland

Hello Petrus,

I do use PowerBasic XPRINT a lot and also LPRINT in a few programs.
So I am in the same need as you are for the help with these printing matters.

Klaas

James Klutho

#2
You might look into DDOCs which is only $25.  Check the PowerBasic forum for more info if you are unfamiliar with the utility.  Someone on the Freebasic site may already produced the .bi and object files.

Richard Kelly

I bit the bullet and wrote a basic PDF class and let Adobe do all the hard word.

http://www.powerbasic.com/support/pbforums/showthread.php?t=55036

Rick Kelly

Marc Pons

@ Petrus

Please could you share that "very promising .inc file" you are speaking about.

I want to check what's wrong.

thanks

Marc

Knuth Konrad

Petrus,

you might want to have a look at the Virtual Print Engine (VPE): http://www.idealsoftware.com/en/download/vpe_win.html. The community edition is free of charge, even for commercial purposes, but of course limited. But that way you can give it a real world try.

Petrus Vorster

Hi everyone.

Someone posted a FBWINPRINT.INC which looked very interesting, but at first it was very hard to find the file.
When finally i got it, it was full of bugs.
Someone now replied on the forum about FLTK, whatever that may be.
http://freebasic.net/forum/search.php?keywords=FLTK

Richard, I may have to follow you in that PDF route since we have unbelievable strict IT rules at work, and they dont allow any installs of unapproved software.
Thats where Powerbasic/FB comes in handy, no need to install the exe.
Print outputs has to be via the Printer directly or Adobe or one of the MS Office tools.

Like I said, this forum has some amazing people, you dont get such helpful responses anywhere else! Thanks!
-Regards
Peter

James Klutho

I forgot about VPE.  The community version is actually pretty powerful and there are includes and sample code on the PowerBasic forum.  I don't know if FreeBasic has .bi and objects files created yet.

Petrus Vorster

Thanks James

I Downloaded VPE and just had to make one small adjustment in the include file which kept on generating an error.
last night i was already able to create a basic document using their DLL and i haven't even worked through 1% of the documentation.

If this can be used in Freebasic then it would be great.
It has Native VB6 support also, so I wonder if it cannot be used in Freebasic too.

Thanks for this tip, this seems to be a real winner.
-Regards
Peter

Knuth Konrad

Quote from: Petrus Vorster on June 17, 2015, 01:21:47 PM
It has Native VB6 support also, so I wonder if it cannot be used in Freebasic too.

Pro tip: don't use it (=the ActiveX). If you look through the (strangely for an OCX) named methods and properties, it becomes clear that it's a just a wrapper for the native DLL. It has also caused uncatchable GPFs for me that didn't happen using the native DLL calls in VB6.

This has happened in an older VPE version, but having gone throuh a few VPE updates where the ActiveX basically didn't change - and given VB6's "official death" > a decade ago - I doubt that much development time goes into the OCX ...

Petrus Vorster

I am just going to learn this in Powerbasic for now, but I will have to find some way to make this work in Freebasic since the movement is in that direction.
I am really pleased with the progress this far, it is indeed powerful.
For now, i wont use the ActiveX.
I find the Dll calls not too much troublesome and its reasonably straight forward.
I think Klaas mentioned he was having the same issues with printer management as I did now in Freebasic. Perhaps he can take a look at this too and find us a way to FB.
For now, thank you all for the advice, it is really helpful!
-Regards
Peter

Marc Pons

Here you can find my class printer for freebasic
https://db.tt/FwIs4N7P
it includes the source and exe files to test

I am on winXP sp3 and it works for me, can somebody test to compile with 64bits compiler version , I'm interrested on the results

as you'll see , it prints text , graphics , pictures ...
choose or select, printer, page, font, orientation,colors...

Petrus Vorster

Thanks Marc.

I will give this a shot and let you know!

Peter
-Regards
Peter

Petrus Vorster

Marc, that's quite a lot of work you did there!!!
I read through it and it must have taken quite a while to achieve!
It creates the Pdf and it works fine.

I have discovered VPE, but i am still going with Powerbasic with that one.
I am also carefully watching that other Post of Paul and Jose about using Powerbasic Dll's with Fbasic.
Once I get that nailed, I will drop Powerbasic like a rock.

Thank you for the hard work and effort! Its much appreciated!

-Peter
-Regards
Peter