Non-Standard Paper Sizes for Printing Physical and Virtually? Not a Problem with LEADTOOLS!

LEADTOOLS Support recently had a case where a customer was using an old AS/400 machine, a dot matrix printer that is often used with COBOL or Fortran to print results. The issue they faced was that while normal standard letter paper is 8.5” x 11”, this machine printed paper at 15” x 12”.

When the customer decided to switch to virtual printing instead of the AS/400 machine, their rows and columns would become distorted and misaligned upon export. Their tables would look very similar to the image below.

Our support team modified the PageWidth property to adjust the page width and modified the PageHeight property to adjust the page height. These properties know to use inches as the correct value type because the Unit property default is set to use inches. It can also be specified to use pixels or millimeters if needed.

So The Issue is Fixed, Right?

Well… almost. If we set the width to that massive 15″ size, sure it would cover full tables, but what about ones that don’t need that much space? This is where we introduce a Boolean variable named VariableWidth, allowing the width to be adaptable based on the amount of columns in the data. Now the table would grow or shrink to the size of the columns!

However, this came with its own trouble… now the table could be way too small! The VariableWidth variable scaled the size of the paper to the number of columns, so if there weren’t a lot of columns, not a lot of paper would be used either.

Not adhering to the minimum 8.5″ size doesn’t look very professional. By coming up with a MinimumWidth variable, this ensures that the width would never go below 8.5″. Pairing that with VariableWidth, now the customer can print or save pages as wide as needed while also maintaining a set minimum width.

Wait a Second… What About the Height?

That’s a good point! What we applied to the width, we also had to apply to the height. Following the same idea, similar variables of VariableHeight and MinimumHeight were made to accommodate this. However, enabling both VariableWidth and VariableHeight could lead to massive pages and slow down productivity, depending on the data. We recommend using the VariableWidth to account for the columns and allow the excess rows to be on separate pages.

I Have a Similar Problem This Could Solve, Where Can I Get Started?

If you find yourself facing something similar be sure to Download our FREE 60-day evaluation SDK to test all of our features and actually program with the entire LEADTOOLS toolkit! During this time, you will receive our fully-sourced demos and technical support.

Need more hands-on help? Schedule a walk-through with our support team to check out our many features that will expedite your application development! We aim to help all developers Build Better Apps and our excellent support staff is proof. We standby ready to assist you, even while you’re just evaluating our products.

For pricing or licensing questions, contact our sales team via email or call us at 704-332-5532. Be sure to check out our product wizard and pricing estimator as well.

About 

This entry was posted in Document Imaging, Virtual Printer and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *