Print a Valentines card on Linux

BlitzMax Forums/BlitzMax Programming/Print a Valentines card on Linux

Czar Flavius(Posted 2009) [#1]
Here's the situation.. there a nice young lady (and Linux user) I want to impress on Valentines day, but I don't know her address so I've been thinking of a cute computer-based present I could make for her, and I've just had the perfect idea! I was going to send her an e-card but they're lame, so why not make a small BlitzMax program that contains a pdf e-card I made, and prints it out for her. And she won't be able to see what it is until it comes out the printer :)

My love crosses all barriers. With the exception of cross-platform compatibility - I know next to nothing about Linux! So if someone could give me a quick run-through on how to print something on Linux using BlitzMax, that would be great!!


Otus(Posted 2009) [#2]
You can use lpr from command line to print PDFs. If she has multiple printers, you'd need to know which to use, though.


Czar Flavius(Posted 2009) [#3]
Can I call the command line from inside a BlitzMax program? And if so how do I do this? Total Linux noob remember :)

I'm trying to avoid sending a lone pdf as the whole point is it's a suprise what it does ;)


Otus(Posted 2009) [#4]
Can I call the command line from inside a BlitzMax program?

It works the same as on Windows, basically. System_(command$) should work. If you include the PDF as incbin, you can write it somewhere temporarily and pass it as an argument. It should also be possible to pipe the data directly to lpr, but I don't know how to do that from Blitz.


Arowx(Posted 2009) [#5]
Ahh true love, I can recall building a rose that opened with some nurbs in opengl for my ex wife.

She was not impressed, I should have realised then! ;o)

Good Luck