35764

Endorsement Epson TM-h6000IV Java Printing

Question:

I need to print to an <strong>Epson Endorsement TM-h6000iv</strong> printer (usb version) with Java. However, I read the manual without hope to find sth can help. I change in printer preferences without hope also! I try with this code of java which <strong>TextPrinter</strong> class in java for printing work.

<strong>Main "Print" function:</strong>

// ----- start printing ------ public int print(Graphics g, PageFormat pf, int pageIndex) { double ww, hh, x, y; String s; pf = PF; // The PF indicates for defaultPage PF= Pj.defaultPage(); GG = (Graphics2D) g; s = "Serif"; GG.setFont(new Font(s, Font.BOLD, Fy)); GG.setColor(Color.black); GFont = GG.getFont(); FM = GG.getFontMetrics(); // Insure printing of ONE page if (pageIndex != 0) return Printable.NO_SUCH_PAGE; ww = pf.getImageableWidth(); hh = pf.getImageableHeight(); x = pf.getImageableX(); y = pf.getImageableY(); GG.translate(x, y); int xpos = 0; draw(getLine(10), xpos, 5);//getLine to return line of String from 0-9 this line will return "0123456789" draw(getLine(20), xpos, 6);//"01234567890123456789" draw(getLine(30), xpos, 7); // etc. draw(getLine(40), xpos, 8); int x0 = 0, x1 = (int) ww - 10; // GG.drawRect(x0, x0, x1, x1); // draw Rectangular GG.drawLine(x0, x0, x1, x0); GG.drawLine(x0, x0, x0, x1); GG.drawLine(x0, x1, x1, x1); GG.drawLine(x1, x1, x1, x0); return Printable.PAGE_EXISTS; }

<strong>However, the Expected Output Is as in this Image:</strong>

<img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/g8HAf.png" data-original="https://i.stack.imgur.com/g8HAf.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

<strong>BUT, the actual output Is as in this Image:</strong>

<img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/kLFVK.png" data-original="https://i.stack.imgur.com/kLFVK.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

<strong>Which</strong> as you can see without Border also some characters not appear! Where is the wrong in my Code I do not know?!

<strong>Here you can see The main properties of this printer which "Endorsement" one:</strong> <img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/nZaos.png" data-original="https://i.stack.imgur.com/nZaos.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

<strong>Sorry</strong> for this Long explanation BUT any help will be appreciated,

Answer1:

Finally, my problem solved after a lot of daily headache!! Just I changed on Epson Printer Slip Setting to [92,68] [Height,Length] ,, Then everything works perfect. Thanks to my God!..

Recommend

  • how to modify ASP.NET MEmbership stored procedures
  • How to add dropdownlist into Gridview in asp.net
  • reloadRootPageControllers and deep press
  • Print more than one page with Printable on Java
  • Implement same Generic Interface 2 times with different Generic parameter
  • UIPageViewController setViewController causing app to crash
  • Mixed content issue - insecure XMLHttpRequest endpoint
  • How to print a large JPanel in several page
  • Is there a nicer way of lifting a PartialFunction in Scala?
  • Efficient Custom Paging in ASP.NET 2.0 while sorting
  • Zip inside zip (php)
  • ABAP find out all program screens?
  • Why is python3 calling python2 libraries?
  • Start X server on Google Cloud (Debian) Compute Engine
  • How to draw shapens inside shapes?
  • Replace “names” of columns of a data frame with different (new) names in another file in R
  • ws_xpixel and ws_ypixel
  • How to implement paging for a TableView in JavaFX? [duplicate]
  • Firebase Save Notification to DB not working when app is not running
  • Why is the “map” version of ThreeSum so slow?
  • how to find the index position of the ARRAY Where NSPredicate pick the value. I use filteredArrayUsi
  • Formatting a TimeSpan to look like a time zone offset
  • How to parsing NSDate to RFC 822 always use in English?
  • draw a B+ tree in latex
  • Winforms: Add a close “x” button in a UserControl
  • react split panel resize
  • Using a canvas object in a thread to do simple animations - Java
  • Use of this Javascript
  • Linq Objects Group By & Sum
  • How to format a variable of double type
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • Buffer size for converting unsigned long to string
  • How get height of the a view with gone visibility and height defined as wrap_content in xml?
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • apache spark aggregate function using min value
  • unknown Exception android
  • Sorting a 2D array using the second column C++
  • failed to connect to specific WiFi in android programmatically
  • java string with new operator and a literal
  • How can I use threading to 'tick' a timer to be accessed by other threads?