title: ghostscript header over pdf file
body: <p>want to write header over pdf files using ghostscript. i tried several thread of this forum </p>
  
  <p><a href="https://stackoverflow.com/questions/8885483/can-i-use-ghostscript-to-overlay-a-text-fax-header-onto-a-pdf-and-or-tiff">can I use Ghostscript to overlay a text (fax) header onto a PDF and/or TIFF?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/3689834/how-can-i-make-a-program-overlay-text-on-a-postscript-file/3699354#3699354">How can I make a program overlay text on a postscript file?</a></p>
  
  <p>i tried this code and it works. i cant see the header but when i search header using find function i can see header somewhere but its not visible.</p>
  
  <pre><code>gs \
   -o /5/7007.pdf \
   -sDEVICE=pdfwrite \
   -g5030x5320 \
   -c "/Helvetica-Italic findfont 15 scalefont setfont 453 482 moveto (544) show" \
   -f /5/77.pdf
  </code></pre>
  
  <p>and other code is </p>
  
  <pre><code>gs -dBATCH  -dNOPAUSE  -sDEVICE=pdfwrite \
  -sOutputFile=/5/7007.pdf \
  -c "/Times findfont 12 scalefont setfont 50 765 moveto (header text) show" \
  -f /5/77.pdf
  </code></pre>
  
  <p>both codes generate the pdf fileand header also but header is not visible.</p>
  
  <p>my output of ghostscript is </p>
  
  <pre><code>Page 2
  Page 3
  Page 4
  Page 5
  Can't find (or can't open) font file %rom%Resource/Font/Arial-ItalicMT.
  Can't find (or can't open) font file Arial-ItalicMT.
  Can't find (or can't open) font file %rom%Resource/Font/Arial-ItalicMT.
  Can't find (or can't open) font file Arial-ItalicMT.
  Didn't find this font on the system!
  Substituting font Helvetica-Oblique for Arial-ItalicMT.
  Page 6
  Page 7
  Page 8
  Page 9
  Page 10
  Page 11
  </code></pre>
  
  <p>i want to write header and footer in all pages and i am ok with any font or if possible can change</p>
  
  <p>. i used fc-list which listed several fonts . i used one of them then also getting similar error. seems ghostscript is trying to match each page font.i am not interested in matching each page font. just want to use some font for header which is available.</p>
  
  <p>partial list of fonts are here</p>
  
  <pre><code>fc-list
  Liberation Mono:style=Regular
  Utopia:style=Bold Italic
  Nimbus Sans L:style=Regular Italic
  DejaVu Serif,DejaVu Serif Condensed:style=Condensed,Book
  Hershey\-Gothic\-English:style=Regular
  URW Palladio L:style=Roman
  DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic
  Century Schoolbook L:style=Bold Italic
  DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold,Bold
  Liberation Sans:style=Regular
  DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique
  DejaVu Sans Mono:style=Bold Oblique
  Carlito:style=Italic
  Liberation Serif:style=Bold Italic
  Caladea:style=Bold
  DejaVu Serif:style=Bold Italic
  Nimbus Sans L:style=Bold
  OpenSymbol:style=Regular
  Utopia:style=Bold
  Caladea:style=Bold Italic,Italic
  Hershey\-Plain\-Duplex\-Italic:style=Regular
  </code></pre>