I am working on an application in which I need to print labels ranging from 1"x3" up to 8"x10". The text and images that will be printed on the labels is defined in a xml file that contains all needed info including its location on the label as defined by the top-left xy coordinate. I do not want to preview the print job, just send it to the printer on command. My question is, what is the preferred method for doing this?
I have toyed around with 2 different methods.
Method one: Reading the xml and locating the items on a form, creating an image of the form and then printing it. This works but it just seems a bit hokey?? I have to display the form for a second to create the image and I really do not want to do that.
Method two: I have looked into using MigraDoc to create a label document and then sending it to the printer. This approach will create the form and send it to the printer without being displayed however, I do not see how I can locate the items within the document based on xy coordinates?? Maybe I have missed something here but everything seems to be section and paragraph driven.
What would be the best/easiest way to accomplish this?