How to switch the orientation of the Card when printing?

J Joshua Preston 2 years 11 months ago
106 1 0

I am using the Zebra Technologies - Card ID Printing – Zebra Card SDK for ZXP Series 3 Printers – C#  sample code. I am having trouble setting the Orientation of the card being printed to Portrait. I set the orientation to be portrait in the Printer Preferences for the printer and clicked Print Test Page and a test card came out correctly in portrait orientation. However, when I print a card from the sample application code from the link above it only prints the card in Landscape mode. I even dived into the code, there is nothing that even uses or sets the orientation of the card anywhere. The only thing I see is in the ZBRUtil.cs it has a enum called Orientation that is never even set or used throughout the entire solution.
 

 
Any advice?

Please register or login to post a reply

1 Replies

S Stephen Troup

hmmm, I've looked and not found anyway other way than to call the other function ZBRGDIInitGraphicsFromPrintDlg that allows you to change the printer settings when initialising, the documentation describing the sdk also makes no mention of changing the page orientation. If you're having to switch between landscape and portrait from front to back of the a card it'll make life difficult.

tbh, I've stopped using that version of the sdk and switched to the driverless version as that does allow you change orientation in code when initialising the graphics object but it only supports the zxp 1 and 3  The driverless version does have it's issues though but can be more versatile as it exposes more functionality plus you can use the .net graphics objects if you use reflection to expose the graphics handler.

If you've only just started then I'd suggest switching over to the driverless if possible. It's a little more work but ultimately can be far more powerful.

CONTACT
Can’t find what you’re looking for?