xPrint - Printing Engine (WIP)

Developed or developing a new product in PureBasic? Tell the world about it.
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

I have an update for download. This changes how the preview window looks (more like Microsoft Word print preview on a floating page) and adds in header support. There is no footer yet since I want to make sure header works first. There are some variables you can use in the header - %PAGE%, %DATE%, etc...

I'd like a little testing to make sure it works before moving on with footers and other things. Check the example to see how headers work.

Take care! ^_^

http://www.seijin.net/Storage/Code/xPrint.zip
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Post by LuckyLuke »

Xombie ...
Any news on new features ? (Report Designer ?)
Maybe we can use the PDF library to export the reports ?

Take care !

LuckyLuke

LuckyLuke
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

Huh. Didn't figure anyone was interested since it's been something almost 2 months that I posted.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Xombie, this is brilliant. Haven't checked it out yet, but on paper this is exactly what I need to save one hell of a lot of time and effort so I'll be making use of this. :)

One question, the LPGL licence; can I use your code in a commercial application? Guess I should go and have a look at the details of the LPGL licence!

Actually, two questions! Does this run okay on Win 98? I only ask because I know from experience that with GDI, you have to be very very careful to tidy up where Win 98 is concerned.

Thanks.
I may look like a mule, but I'm not a complete ass.
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Post by LuckyLuke »

I'm testing this for the moment ... exactly what I was looking for ... :)

LuckyLuke
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

Licenses... I don't know too much about them, actually :) I just didn't want someone ripping off my work and calling it their own without me being able to say something. I think when I wrote this, I was paranoid about people stealing code and calling it their own. Something caused me to do it but I'll be darned if I can remember what exactly. Something about someone taking code and saying they wrote it. :shrug: Something like this doesn't need it, I'm sure. What's the general consensus on licenses? One of the things that bothers me is when I make a fairly big thing like this that can be used in different apps and then get nothing. No recognition and probably my name stripped from the code. I'm not saying I want people flooding my email with letters gushing about how great I am... but I wouldn't mind a little tiny footnote in the readme.txt or whatever with something like "Report printing code by Sam 'Xombie' Shults" or something like that. For most of the code I share, I don't care so much. But others took a while. Like this and especially the xGrid code.

Sorry, meandering there for a little bit ^_^

As for the Windows 98 issue, yeah, don't use this just yet. Give me the week to finish adding the footer code and cleaning it up. I'm not properly handling the hdc returned and I'm not freeing up the structure strings properly.

I might even have the beginnings of a GUI report designer by then but I'll concentrate on getting it in better shape before that.

Feel free to still send suggestions in the meantime.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Any objections to me then using this in a commercial app? All credit due will appear in the help about and accompanying .chm files etc.

With win 98, it's so much deleting the hdc (although this is important of course). I've found that win 98 will not delete pens, brushes etc. if still selected in a hdc. even if the hdc is released! Further, it won't report any problems, it just crashes out when the gdi resources are spent! :) And even knowing this doesn't stop me making the same mistakes again, and again, and again...
I may look like a mule, but I'm not a complete ass.
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

No, no objections to you using it in your commercial application :) If the LGPL license restricts that usage then I'm granting special permission to you, srod, to use my code without restrictions. Was that official enough? :D I trust you enough to use the code as you like. I'd just appreciate feedback on bugs or feature requests/enhancements that you spot. I haven't had to use it beyond simple testing yet. I plan on using it more soon so I was going run it through more rigorous tests but extra eyes (especially good coders) are always nice.

Also, I'll double check that I'm handling pens/brushes/etc... properly. I usually try to remove them before deleting but there's always those I miss :) Or forget about in a rush.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Thanks.

I'm about a week (estimate) away from requiring printing facilities and so any feedback won't be immediately forthcoming.

I look forward to using it though. 8)
I may look like a mule, but I'm not a complete ass.
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Post by LuckyLuke »

Xombie ...

Using Minolta Di350f I've got the following error :
xprint.pb 3450 Invalid memory access.

Code: Select all

*HoldJob\Header = AllocateMemory(4)
Is probably an error in xp_CreatePrintJob() procedure ?

Using PDF Creator it's working fine.

LuckyLuke
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Xombie are you still developing this?

Post by Fangbeast »

Someone asked me when I would be putting print support into my address book and this seems like a good way of doing it.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

No, no objections to you using it in your commercial application If the LGPL license restricts that usage then I'm granting special permission to you, srod, to use my code without restrictions.
I may like to use your code too, if I do then you will get mentioned in the help, etc

If I do, can I get the same special permission as SRod? :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

DoubleDutch - sorry, I missed this. Yes, feel free to use it if you find it useful.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Thanks :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

Excellent work, I may swiitch my report output format to this and see how it plays. I had been playing with this sort of idea for a while and had sort of half coded the same idea. An HTML Text style parser...

Now if only I could find a way to export to an excel file!!! TSSOFT says his computer is broken so he can't fix his original! :wink:
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
Post Reply