LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   embed an EPS file into a PS file (https://www.linuxquestions.org/questions/linux-newbie-8/embed-an-eps-file-into-a-ps-file-751971/)

aussierob 09-02-2009 12:07 AM

embed an EPS file into a PS file
 
Hi there,

I realise the an eps file is a ps file with reduced command set and a bounding box.

I create PS files and want to place a common graphic in many, so made an EPS of the graphic and want embed it into the PS.

I presume I insert some lines in the file.ps and insert the file.eps
in between those lines,
but I cannot find out how to do it.

Any advice would be much appreciated.
Regards Robert

Caballero del norte 10-01-2009 01:42 AM

Because this question has been here so long I will give an inexpert suggestion:

Create your files in OpenOffice.org Writer rather than as a raw PS*file. If you need to use a PS*file, you may wish to open it in a graphics program and save the image in a way that you can use it in Writer.

Where you want to insert EPS files, Insert > Picture > From file and select the EPS file.

Save your file in OpenOffice.org and then File > Export to PDF.

(There probably is also a simple way to edit PS files for this... but I know very little about PS.)

neonsignal 10-01-2009 09:31 AM

Although you can just use '%%BeginDocument:' and '%%EndDocument', it takes some work to preserve the state around an inlined eps file. If you are writing PostScript directly, you can use the Astigmatix functions to do this for you, typically like this:

Code:

{ StatEPSF 100 100 0 1 1 ReadyEPSF ExecEPSF }
currentfile exch exec
%%BeginDocument:
  inlined eps code
%%EndDocument

Of course, if you are using something like LaTeX to produce the postscript file, you can just do

Code:

\usepackage{graphics}
...
\includegraphics{file.eps}



All times are GMT -5. The time now is 06:02 PM.