Bug 206652

Summary: Missing text in landscape mode
Product: Ghostscript Reporter: Jack Moffitt <jack>
Component: Printer DriverAssignee: Ray Johnston <ray.johnston>
Status: NOTIFIED LATER    
Severity: normal CC: jackie.rosen
Priority: P2    
Version: master   
Hardware: All   
OS: All   
Customer: Word Size: ---

Description Jack Moffitt 2000-05-30 11:55:39 UTC
Originally reported by: gavalencia@users.sourceforge.net
Using GSWIN32C.EXE  with djet500 to print a file in landscape mode on a HP 2000C.  The first 3 characters on the left margin are missing.  When I edit the postscript file to use a larger offset (1st moveto parameter), the text appears ok.  When I send the postscript file to a printer with a builtin postscript interpreter, it prints ok.  I am not able to get ghostscript to print the file properly by setting /Margin etc.
Comment 1 Jack Moffitt 2000-05-30 12:04:14 UTC
Comment originally by gavalencia@users.sourceforge.net
%!PS-
%%Creator: SAP R/3 rel. 3.0A
%%EndComments
/fsize  7.100 def
/kerning 1.700 def
/linesize 7.500 def
/h 562 def
/hoffset 20 def
/reencsmalldict 12 dict def
/ReEncodeSmall
{ reencsmalldict begin
  /newcodesandnames exch def
  /newfontname exch def 
  /basefontname exch def
  /basefontdict basefontname findfont def
  /newfont      basefontdict maxlength dict def
  basefontdict
  { exch dup /FID ne
    { dup /Encoding eq
      { exch dup length array copy newfont 3 1 roll put }
      { exch newfont 3 1 roll put }
      ifelse }
    { pop pop } 
    ifelse }
  forall
  newfont /FontName newfontname put
  newcodesandnames aload pop 
  newcodesandnames length 2 idiv
    { newfont /Encoding get 3 1 roll put } repeat
    newfontname newfont definefont pop
end } def
/SAPvector [
64 /at 
91 /bracketleft
92 /backslash
93 /bracketright
94 /asciicircum
95 /underscore
96 /quoteleft
123 /braceleft
124 /bar
125 /braceright
126 /asciitilde
128 /grave
129 /acute
130 /circumflex
131 /tilde
132 /ogonek
133 /breve
134 /dotaccent
135 /dieresis
136 /ring
137 /cedilla
138 /hungarumlaut
139 /caron
161 /exclamdown
162 /cent
163 /sterling
164 /currency
165 /yen
166 /brokenbar
167 /section
168 /dieresis
169 /copyright
170 /ordfeminine
171 /guillemotleft
172 /logicalnot
173 /minus
174 /registered
175 /macron
176 /degree
177 /plusminus
178 /twosuperior
179 /threesuperior
180 /quotesingle
181 /mu
182 /paragraph
183 /periodcentered
184 /cedilla
185 /onesuperior
186 /ordmasculine
187 /guillemotright
188 /onequarter
189 /onehalf
190 /threequarters
191 /questiondown
192 /Agrave
193 /Aacute
194 /Acircumflex
195 /Atilde
196 /Adieresis
197 /Aring
198 /AE
199 /Ccedilla
200 /Egrave
201 /Eacute
202 /Ecircumflex
203 /Edieresis
204 /Igrave
205 /Iacute
206 /Icircumflex
207 /Idieresis
208 /Eth
209 /Ntilde
210 /Ograve
211 /Oacute
212 /Ocircumflex
213 /Otilde
214 /Odieresis
215 /multiply
216 /Oslash
217 /Ugrave
218 /Uacute
219 /Ucircumflex
220 /Udieresis
221 /Yacute
222 /Thorn
223 /germandbls
224 /agrave
225 /aacute
226 /acircumflex
227 /atilde
228 /adieresis
229 /aring
230 /ae
231 /ccedilla
232 /egrave
233 /eacute
234 /ecircumflex
235 /edieresis
236 /igrave
237 /iacute
238 /icircumflex
239 /idieresis
240 /eth
241 /ntilde
242 /ograve
243 /oacute
244 /ocircumflex
245 /otilde
246 /odieresis
247 /divide
248 /oslash
249 /ugrave
250 /uacute
251 /ucircumflex
252 /udieresis
253 /yacute
254 /thorn
255 /ydieresis
] def
/Courier      /SAP-Courier       SAPvector ReEncodeSmall
/Courier-Bold /SAP-Courier-Bold  SAPvector ReEncodeSmall
/sabld { /SAP-Courier-Bold findfont fsize scalefont setfont } def
/saoff { sauln_finish         /SAP-Courier findfont fsize scalefont setfont } def
/UL { currentpoint sauln_y_offset sub
      gsave newpath moveto 
      0 setlinewidth sauln_y_offset sub lineto stroke
      grestore } def
/sauln { sauln_finish 
         currentpoint /sauln_y exch store /sauln_x exch store
         /sauln_active 1 store } def 
/sauln_finish { sauln_active 1 eq {                   sauln_x sauln_y UL } if 
                /sauln_active 0 store } def 
/sauln_active 0 def
/sauln_x 0 def
/sauln_y 0 def
/sauln_y_offset 2 def
sabld
/lpos h 30 sub def 
/sline { show
         sauln_active sauln_finish
              /lpos lpos linesize sub kerning sub store
              hoffset lpos moveto
         1 eq { sauln } if
       } def
/showpart { show } def
/SetInputTray { /Intraynum exch def
mark { statusdict begin Intraynum setpapertray end }
stopped cleartomark } def
/SetPrintMode { /Printmode exch def
mark { statusdict begin
  Printmode 0 eq {false setduplexmode} if
  Printmode 1 eq {true setduplexmode false settumble} if
  Printmode 2 eq {true setduplexmode true settumble} if end}
stopped cleartomark } def
%%EndProlog
save
/lpos h 30 sub store
90 rotate
0 0 h sub translate
hoffset lpos moveto
() showpart saoff
() showpart sabld
(THE CORPORATION                                                                                                     PRODUCED AND SENT BY PRODUCTION CONTROL) sline
(REPORT:     SAP-ZPMR0010                                                                                                                                   PAGE:    1) sline
(                                                                   Project Cost Summary Weekly) sline
() sline
(CREATION TIME: 11:50:30                                                                                                                RPT FREQUENCY: \(undefined\)) sline
(CREATION DATE: 02/14/00                                                                                                                RPT SEQUENCE:  \(undefined\)) sline
(---------------------------------------------------------------------------------------------------------------------------------------------------------------------) sline
showpage
restore
%%Trailer
Comment 2 Jack Moffitt 2000-05-30 12:20:57 UTC
Comment originally by gavalencia@users.sourceforge.net
Ghostscript was invoked with theo following command line:

c:\aladdin\gs6.01\bin\gswin32c -dBATCH -sDEVICE=djet500 -r300x300 -sOutputFile=LPT saprint.ps

I then copied LPT to the printer with 

copy LPT LPT1:

Comment 3 Jack Moffitt 2000-05-31 09:15:07 UTC
Comment originally by gavalencia@users.sourceforge.net
I was able to work around the problem by sending the following postscript file to the printer prior to printing the problem file.  This works but it leaves a .5" margin at the top and left which is ok for this application.

%!PS-Adobe-2.0

% Reset the offset and margins.

<<
  /PageOffset [-12 -18]
  /Margins [0 0]
  /.HWMargins [0 0 0 0]
>>
setpagedevice
Comment 4 Ray Johnston 2001-04-05 14:18:07 UTC
Comment originally by rayjj@users.sourceforge.net
Logged In: YES 
user_id=11206

We acknowledge that this is a valid issue, but we do not have
resources available to address this at this time.

This problem report has been moved to doc/Issues.htm where it
may remain open for some time. Relevant comments are
captured there along with the ID# of this report.

By moving this issue to the widely distributed Ghostscript
documentation, we wish to make this issue well known and
solicit help in improving Ghostscript in this area.

Thanks for your input!