Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Insert an image on every page of a postscript file

New Here ,
Jun 12, 2014 Jun 12, 2014

Hello,

I am generating a ps file of a document using ps printer.

on every page of the document i want to print my image.

so please help me how to insert my image in ps file to print image on all pages

Regards,

Vijay

TOPICS
Programming
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 12, 2014 Jun 12, 2014
LATEST

%!PS
/imgFile

Below is an example of a simple image using a reusable stream on each page.

%!PS

/imgFile

currentfile
<< /Filter /SubFileDecode
   /DecodeParms << /EODCount 0 /EODString (%%*EOD*) >>
>> /ReusableStreamDecode filter
f011
ff00
ff00
0000
0000
0000
ff00
ff00
ff00
ff00
ff00
0ff0
00ff
00ff
00ff
ee00
%%*EOD*
def

/doimage

{

10 10 scale

36 36 translate

/temp 4 string def

<<

  /ImageType 1

  /Width 16

  /Height 16

  /BitsPerComponent 1

  /Decode [ 1 0 ] % 1 is on 0 is off

  /ImageMatrix [1 0 0 1 0 0]

  /DataSource { imgFile temp readhexstring pop }

>>

imagemask

imgFile resetfile

}def

<<

   /EndPage {pop pop save initgraphics doimage restore true}

>> setpagedevice

/Helvetica 72 selectfont

72 720 moveto

(PAGE 1) show

showpage

72 720 moveto

(PAGE 2) show

showpage

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines