Skip to main content
Participant
November 18, 2010
Question

Add EPS into a PDF

  • November 18, 2010
  • 1 reply
  • 1816 views

Hi everyone,

I'm a bit stuck to this problem.

I have a PDF file and an EPS file generated with sam2p. I'd like to add the EPS file to each page of the PDF when i print it (on the fly). I'm using ghostscript to print the PDF. Each of my test, the EPS file was on the first page then i have the PDF. I can't find a way to incorporate the EPS file into the PDF file.

Any tips or solution is welcome.

Thanks a lot for taking the time of reading my post.

This topic has been closed for replies.

1 reply

NicoEIDAuthor
Participant
November 19, 2010

I"m going to solve my problem.

You need to create a postscript file with :

/do_it
{
  gsave
.1 dup scale
  (c:\\appli\\sharedro\\formul\\eid_logo.ps) run
grestore 
} store

<< /EndPage [
   currentpagedevice /EndPage get /exec load
   /do_it load /exec load
   ] cvx
>> setpagedevice

This will load the postscript file and add it to every page of the PDF document.

Inspiring
April 29, 2011

This will work

But you need to address the EndPage routine properly accordiung to Red Book.

I think you need to define BeginPage as well.

Also you need to convert PDF to PS and merge it with your routine Endpage to make it actrive.

Regards

Adam.

Participating Frequently
April 29, 2011

As Ghostscript processes PDF using it's PostScript interpreter, you do not need to convert the PDF to PostScript in advance.

Helge