Page 1 of 1

Latex server/network printer

Posted: 31. Aug 2011, 04:06
by Sigil
I'm setting up a linux virtualbox for use with my networking and database classes. I was going to include latex for use with typing up math homework; however, the guest doesn't have a graphical desktop as I am using this as a reason to learn to configure a server via the command line. This means making the tex files from inside the guest would be a bit of a hassle, which having to transfer files back and forth between the host and guest would also be a pain. My laptop is a few years old now so I'm trying to limit the number of guests open for performance reasons.

Therefore, I wondering if there was a way to configure the guest to work as either a virtual printer like PDFCreator to convert .tex files to pdf's or, if that's not practical/overly complex, executing latex via php (I'm not familiar with php so if this is obvious I apologize in advance). PHP would probably be the easy answer either way, but implementing a printer over the network seems more interesting and more practical as a local network service for a small business or whatnot. Over all I think it would at least be interesting in the sense of figuring out how to offer a normally non-networked service over the network.

So far Apache, php, MySQL, and latex are all up and running. I configured 2 Ethernet adapters, one on NAT and one for host only. The host-only adapter is set auto connect. The NAT adapter was left as manual because I am only using the internet to pull down packages and updates, and there is no reason to leave the guest open to the outside as it is more of a sandbox/workspace than a production server.

I'm not so much looking for a laid out answer as much as sources that would be helpful in solving the problem. I did notice latex is available for windows but that seems like it would be boring (install and done) and/or painful (windows command line >.<). This is now more of a puzzle or personal challenge and a learning device more than anything, but I'm not sure were to even start looking.

My ideas from thinking on the problem:
  • Some sort of shared network printer configuration; however my guess would be a shared network printer would not be able to return a file to the client.
  • A client/server application pair. Client offers the tex file to the server which sends back either a PDF which can be saved or an error log from latex.
  • A PHP page that uploads the file and displays an error log or offers the PDF as a result. While it would still be interesting to do it has less integrated feeling than a virtual or shared printer.
My programming experience is pretty much limited to Java and LISP (but I have no desire to even attempt lisp GUI code. My school was very theory based, not so much on applicability >.<). I'm not sure how feasible it would be for the application route to install as a printer with Java as the implementing language. A regular program with an association to tex files would be a possible alternative if not.

I'm fairly sure this is doable with the PHP route however I've never worked with PHP before only HTML, but then I'll probably have to learn it at some point anyway.

If this question would is more appropriate on another forum I'd be happy to move it as well. I wasn't sure where to ask it and figured I'd start somewhere. :D

Re: Latex server/network printer

Posted: 31. Aug 2011, 13:16
by mpack
Your question would be more appropriate in the Linux guests forum.

When asking a question, please bear in mind that the question and answer is not just for you, it's for all readers of that forum. So you need to ask yourself, in which forum would most readers probably find this discussion useful (or at least relevant)? Hence, you wouldn't post it in "Windows Hosts" because not all Windows Hosts users are interested in reading about a Linux guest. You certainly wouldn't post your question in "Using VirtualBox", which is intended for questions about using / configuring / installing the VirtualBox software itself.

It also helps to keep your question short and sweet. That way busy volunteers might have time to read it.

As to your question, yes it is possible to set up a network shared printer.