Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Aug 2017 12:20:11 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Antonio Olivares <olivares14031@gmail.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Imposing a pdf/postscript on top of another one
Message-ID:  <20170821122011.3bd9e8bd.freebsd@edvax.de>
In-Reply-To: <CAJ5UdcMiT9_6FdtaNTAeBmtbMGvN84SWHW8mJXsb%2BEnExDRYaQ@mail.gmail.com>
References:  <CAJ5UdcNUfUqNRGNrmE8cYrd3-uqSLbQRqXmdy094gk7rWaWOeA@mail.gmail.com> <20170820195252.51ddf82b.freebsd@edvax.de> <CAJ5UdcMiT9_6FdtaNTAeBmtbMGvN84SWHW8mJXsb%2BEnExDRYaQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 20 Aug 2017 18:53:47 -0500, Antonio Olivares wrote:
> On Sunday, August 20, 2017, Polytropon <freebsd@edvax.de
> <javascript:_e(%7B%7D,'cvml','freebsd@edvax.de');>> wrote:

Erm... I'm not Mister Javascript Underscore Percent Percent.
You are probably using a webmailer with a slight hickup.. ;-)



> The stackexchange page has pdftk as its first choice
> 
> https://stackoverflow.com/questions/501723/overlay-one-
> pdf-or-ps-file-on-top-of-another
> 
> However, my machine which has the postscript files is offline (no internet
> connection) and no pdftk is available to do this :(

Okay, so you have to stick with the installed tools. I can
fully relate to this very special kind of situation ("use
what you have, not what you don't have"). Of course, that
doesn't make things easier.

A solution that I would have in mind is to do the whole
work in LaTeX, but you said you don't want to do that.
You _could_, however, create the gnuplot output with a
white / transparent background and either use it in EPS
format, or use convert (from ImageMagic) to turn it into
a PNG file; then use \includegraphics{} with the package
inclusion \usepackage[pdftex]{graphicx} to include the
image into the file. With \usepackage[absolute]{textpos},
put it into a "textblock" environment (to position it at
the desired location of the page) _before_ you add the
actual content; e. g., \begin{textblock}{width}(pos,pos)
\includegraphics[width/height=,keepaspectratio]{backgr.png}
\end{textblock} - and _now_ your text.

With pdflatex, the output will be a PDF file, as desired.



> Thanks for your input.  I may have to copy the files and take them to
> another machine so I can try to use pdftk or maybe use a command from
> imagemagick which can do the job?

I think ImageMagick's ability to process PS or PDF is quite
limited, but you could - attention! stupid idea ahead! - turn
the PDF file's pages into images, the background GNUplot out-
put too, then overlay them with convert's -composite option,
and finally turn the result back into a PDF file; of course
now all text information will be lost, as there is only the
image of text, which might reduce the usability of the result.
But I said it's a stupid idea. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170821122011.3bd9e8bd.freebsd>