2009年3月16日 星期一

Epson LQ-580紙張設定問題

有一個工程因為要用過低紙,所以要使用Epson LQ-580針機,但之前有個問題,就算系統設定了紙張大小,列印機都是用Letter Paper Size,類似的問題之前遇過一次,最後利用Excel來解決了,但今次客戶要求不能用Excel,所以必須去研究,有網友有解決方案嗎?

我是用Borland C++ Builder 6.0,可以用QReport或其他工具,如果用Esc/2 commands,那就要花相當長的時間學習,而且要做Report (調位列印等),這麼簡單的要求,為何Epson沒有容易的解決方案呢? 類似我使用的Receipt Printer,只要指明Paper Size,就能聽聽話話列出想要的size了.

9 則留言:

  1. What is the problem exactly? If Excel could do the correct printing using that printer device/driver, why your program could not do it? It may help if you could give more details (e.g. codes for that printing action).

    回覆刪除
  2. william :
    What is the problem exactly? If Excel could do the correct printing using that printer device/driver, why your program could not do it? It may help if you could give more details (e.g. codes for that ...
    Excel的解決方法是在Printer Driver, insert a paper size setting, e.g., "memdb", when printing, I can select memdb and the printer can print correctly.
    However, if I use QReport (or GmPreview), there is no way for me to select the paper size "memdb", or even I use Custom Paper size e.g, set to 70height, the printer still acts as Letter size.

    回覆刪除
  3. no api?
    無辦法嘅係epson針機都幾多人用

    回覆刪除
  4. dot matrix printer 用text mode會有D physical limitation... 試吓用graphics mode.. 不過會印得慢好多...

    回覆刪除
  5. "insert a paper size setting" 是最方便的方法了,如果你是用 QuickReport ,應該可以解決的呀,http://www.qusoft.com/WebInfoPage.aspx?WebInfoID=629

    回覆刪除
  6. 閒人 :
    "insert a paper size setting" 是最方便的方法了,如果你是用 QuickReport ,應該可以解決的呀,http://www.qusoft.com/WebInfoPage.aspx?WebInfoID=629
    C++ Builder 6.0 沒有qreport的source code, 是否要另外購買呢? 其實最好是用我使用的GmPreview可以解決問題.
    有怎麼方法可以像Excel那樣, 可以選擇到在 Printer Driver set好的paper size呢? 謝謝幫忙.

    回覆刪除
  7. Enoch :
    閒人 :"insert a paper size setting" 是最方便的方法了,如果你是用 QuickReport ,應該可以解決的呀,http://www.qusoft.com/WebInfoPage.aspx?WebInfoID=629
    C++ Builder 6.0 沒有qreport的source code, 是否要另外購買呢? 其實最好是用我使用的GmPreview可以解決問...
    如果真的沒法,在 print 之前,可以用program 改 window 的 default printer ,而這個 printer 的default paper 是 memdb. 以前 vb 時代便是用這方法,可以試試。

    回覆刪除
  8. Hardly used any reporting tools... only rarely Rave + Crystal :P
    Found this:
    http://www.greatis.com/delphicb/tips/lib/devices-printqrep.html
    and I noticed that an interesting point:
    >> If you select a paper size not supported by a printer QuickReport will automatically switch to the default paper size when preparing the report.
    So can you try setting the default paper size in the driver? Or perhaps remove all but the custom paper size in the driver.

    回覆刪除
  9. william :
    Hardly used any reporting tools... only rarely Rave + Crystal :P
    Found this:http://www.greatis.com/delphicb/tips/lib/devices-printqrep.html
    and I noticed that an interesting point:>> If you se...
    修改了GmPreview, 加入以下就成功了:
    {Set to custom size}
    pDMode^.dmFields := pDMode^.dmFields or DM_PAPERSIZE or DM_PAPERWIDTH or DM_PAPERLENGTH;
    pDMode^.dmPaperSize := DMPAPER_USER;
    pDMode^.dmPaperWidth := 2500 {SomeValueInTenthsOfAMillimeter};
    pDMode^.dmPaperLength := 1400 {SomeValueInTenthsOfAMillimeter};

    回覆刪除