我嘗試將手工製作的PostScript代碼注入pscript5.dll生成的較大文檔中。我使用的方法取自http://paulbourke.net/dataformats/postscript/(對於一些奇怪的的原因,我以前的代碼使用相同的變換矩陣打印4位與單個十六進制字符(0..f) - 停止工作)。HP LaserJet打印機上PostScript'image'命令的限制是什麼?
因此,示例代碼是:
100 200 translate
26 34 scale
26 34 8 [26 0 0 -34 0 34]
{<
ffffffffffffffffffffffffffffffffffffffffffffffffffff
ff000000000000000000000000000000000000ffffffffffffff
ff00efefefefefefefefefefefefefefefef0000ffffffffffff
ff00efefefefefefefefefefefefefefefef00ce00ffffffffff
ff00efefefefefefefefefefefefefefefef00cece00ffffffff
ff00efefefefefefefefefefefefefefefef00cecece00ffffff
ff00efefefefefefefefefefefefefefefef00cececece00ffff
ff00efefefefefefefefefefefefefefefef00000000000000ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efef000000ef000000ef000000ef0000ef0000efefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efef000000ef00000000ef00000000ef000000efefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efef0000ef00000000000000ef000000ef0000efefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff00efefefefefefefefefefefefefefefefefefefefefef00ff
ff000000000000000000000000000000000000000000000000ff
ffffffffffffffffffffffffffffffffffffffffffffffffffff
>}
image
showpage
繼它,同時變換爲1位的源圖像(PNG)(因此印刷每個像素是 '00' 或 'FF')在HP LaserJet 1320上,我偶然發現了一個奇怪的問題:在圖像大小達到128x128和300x450之間的某個值後,打印機會打印白色矩形而不是預期的圖像。總測試文檔大小爲2..9 MB。
Ghostscript的,9.07解釋顯示了較大的插入圖像正常,但它似乎在實施不同與惠普的嵌入式解釋 - 它還是老樣子正常工作與我以前的上述代碼和軟件翻譯的放縱是事實
什麼是可能的方法來解決whitesquaring,除bruteforcing打印機以確定最大。 '圖像'的可打印數據大小?
UPD:300x300的證實打印,但隨機500×500的圖像不是在280+字符打印:( 斷行 - 不利於
嘗試一些已建立的代碼,如pnmtops。 – agentp