I am writing a custom module that will be used to print consignment labels for a shipping provider.
The labels print 4 to a page. The module provides a form that allows the user to specify the number of packages, the dimensions etc then prints a label for each package. I will want to format them with CSS so that they print correctly to the label peel off sections etc
One way I had worked out to do this was to have a second form on the page which submits to a PHP file in my module directory. I place the code in this PHP page to process the labels and output which I can then print from.
This solution works, however it is outside of Drupal in that the form posts to a standalone PHP script. Is there a way to do this within Drupal? I have looked at the Print, PDF module but I dont know if I can configure it in this way.