Search code examples
printingghostscriptpostscriptadobe-illustrator

Texture stripe appears when printing a PostScript file


I am using PostScript language to describe a page of uniform arranged dots. These dots are 600dpi, which means there are 600 dots in an inch. And I use one bit to represent each dot in PostScript, 1 for blank and 0 for a black dot.

My PostScript file of a unit of dots:

%% SetPageSize
/setPageSize {<</PageSize [595 842] >> setpagedevice} def
setPageSize
%% Dot Code
gsave
/mm {2.834645 mul} def
1 mm 1 mm translate
5.76 5.76 scale
48 48 1 [48 0 0 -48 0 48]
{<
fff7ff7ff7ff
ffffffffffff
ffffffffffff
fdffffffffff
ffffffffff7f
ffffffffffff
ffffffffffff
ffffffffffff
fffff7ffffff
fffffffdffff
ffffffffffff
ffffffffffff
7ff7ff7ff7ff
ffffffffffff
ffffffffffff
ffffffffffff
ffffffffffff
ffffffffffff
fffefffffeff
ffffffffffff
f7ffffff7fff
ffffffffffff
ffffffffffff
ffffffffffff
7ff7ff7ff7ff
ffffffffffff
ffffffffffff
fffffffdffff
fffff7ffffff
ffffffffffff
ffbfffffffff
ffffffffffff
fffffffffff7
ffffffffffff
ffffffffffff
ffffffffffff
7ff7ff7ff7ff
ffffffffffff
ffffffffffff
ffffffffffff
f7ffffffffff
ffffffffffff
fffffffffffb
ffffffffffff
ffffffff7fff
7fffdfffffff
ffffffffffff
ffffffffffff
>}
image
grestore
  • The code above represents a unit of dots, which is 2.03mm*2.03mm in 600dpi.

  • translate is used to move the user space to the desired position, for example:

    • Supposed that a unit is in the position of (1mm, 1mm).

    • Its right unit is in the position of (3.03mm, 1mm).

    • Its up unit is in the position of (1mm, 3.03mm).

  • scale is used to change the output dpi to 600. The factor is calculated by 72*48/600 = 5.76.

  • The matrix 48 48 1 [48 0 0 -48 0 48] is the scanning pixels vertically and horizontally.

  • The image structure at last represents the binary value of dots, which is written in hex.

These dots can be opened with GhostScript or Adobe-Illustrator and displayed very distinctly and clearly on the monitor.

Sample dots zoomed 4800% in AI.

enter image description here

However the printed dots appears texture stripe. The printer I use is an ink-jet printer Cannon ip2780 and a laser printer FX DocuPrint CP105b.

Printing result of 600dpi (laser). Vertical texture stripe is less obvious than 800dpi. enter image description here

Printing result of 800dpi (laser). Vertical texture stripe is more obvious. Line 2,4,6 is lighter than line 1,3,5. However the density of dots should be the same. enter image description here

Printing result of 800dpi (ink-jet). Appears horizontal and vertical texture stripe. enter image description here

Could someone help to explain how the strange behavior of printer happens? Or the way I compose unit of dots is wrong.

  1. Can I use translate to frequently move user space, especially the position is float values (does the precision is enough)?

  2. Can I use scale to manually change the dpi to 600. Is there any method to change the input dpi?

Thanks in advance!


Solution

  • What you are seeing is a aliasing of your signal, a moiré pattern to be more exact. What is happening is the dots you print do not entirely align up with the printers dot matrix (screen).

    Different printers have different screens and your pixels align to them differently. As a result sometimes your dot is spread over 2 printer pixels and sometimes not. If you really want to do this then each device should need it own halftone pattern if you use this method.

    further reading: