From owner-freebsd-questions@freebsd.org Mon Aug 21 10:20:17 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D24D6DCF998 for ; Mon, 21 Aug 2017 10:20:17 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay10.qsc.de (mailrelay10.qsc.de [212.99.163.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 438D06885A for ; Mon, 21 Aug 2017 10:20:16 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay10.qsc.de; Mon, 21 Aug 2017 12:20:13 +0200 Received: from r56.edvax.de (port-92-195-91-117.dynamic.qsc.de [92.195.91.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 4EBF73CC42; Mon, 21 Aug 2017 12:20:12 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v7LAKBgP002283; Mon, 21 Aug 2017 12:20:11 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 21 Aug 2017 12:20:11 +0200 From: Polytropon To: Antonio Olivares Cc: FreeBSD Questions Subject: Re: Imposing a pdf/postscript on top of another one Message-Id: <20170821122011.3bd9e8bd.freebsd@edvax.de> In-Reply-To: References: <20170820195252.51ddf82b.freebsd@edvax.de> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay10.qsc.de with 9A358683478 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.1300 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2017 10:20:17 -0000 On Sun, 20 Aug 2017 18:53:47 -0500, Antonio Olivares wrote: > On Sunday, August 20, 2017, Polytropon > 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, ...