• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Printing on custom sized paper.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

I am trying to iron out my problems with printing on custom sized tractor paper (using an impact printer). Every time I print a test page, the printer behaves as if it was loaded with tractor paper that is 11 inches long, rather then the 7 inches that the forms are on.

Before I list my code, let me explain everything that I have done. I am running Windows XP, so I went to the Printers and Faxes folder, clicked File > Server Properties, and created a custom form size (8.5" wide by 7" long with zero margins). Going back to the Printers and Faxes folder, I right clicked on the impact printer and clicked properties. From there I clicked the Device tab and selected my custom form that I had created for the tractor feed section. I then clicked the general tab and clicked the printing preferences. From there I clicked the Paper/Quality tab and selected Tractor Feed for the source. Then I clicked the advance button and selected my custom form for paper size. I also changed the resolution to 360X180.

The printer itself has hardware settings for paper size. I've went through the menu and selected 7 inches for the form length.

Now going to the code, I created the paper object and set it size to 612 for width and 504 for height. I also changed the ImageableArea to the size of the paper (which I think eliminates the margins), and set its orientation to 0, 0. I then set the paper object to the PageFormat, and used drawString to test my settings.

Program compiles fine. When I run it and click the button, I select the correct printer. I also went through the preferences to make sure that all the setting are correct (especially to make sure my custom form is selected.). The closest I can get the string to the corner of the page is 75, 80. On the paper it measures 7/8" from the left, and 1" from the top.

I have tested my custom form settings with word 2007. I was able to get the text on the very corner of the paper, and the printer was able to determine where the next form started. I believe that my problem lies within my code. Any help would be greatly appreciated!

Thanks!

 
Robert Bardwell
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understand that this may not be an easy problem to solve. Does anyone know of anywhere else that I may find help with this issue? Thanks!
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the same problem. Did you solve it?

Thanks
 
It's a tiny ad only because the water is so cold.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic