From owner-freebsd-questions@freebsd.org Sun Aug 20 23:53:49 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 92D4ADD6B0E for ; Sun, 20 Aug 2017 23:53:49 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-ua0-x22e.google.com (mail-ua0-x22e.google.com [IPv6:2607:f8b0:400c:c08::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FE9F7C927 for ; Sun, 20 Aug 2017 23:53:49 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: by mail-ua0-x22e.google.com with SMTP id i3so21306940uad.1 for ; Sun, 20 Aug 2017 16:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=T2l5qLpoC47Uq/pRaIGqTzIO1NfsXvP7U4kgMNfCrMg=; b=bfpM59+SNfnofxa7FdWsbV4VvaASpC9ya2lIN0MG6Q3w+ruOMrEcdLzOKMx2gf0fvk cSyg9ORl/w1li/IbHZ/uOs2dQEHkATpsoPY0yA/XmJNsH3sRX4BRrMXrW4CZea8uexz/ QqRokCsn0m1noyufxM28JJSaVXkpqd31EZN/+FlwU6FkBLLlTFlLgUUvCoeEYV+uPLRo 8xRr2Pcdur/0TUGsfzpm8LTT5iWeEmYx0qkDH16DHuZrZdg+5JdM/KJNZReYOU96xuZS YryvsK+bApZ3Wd+HcMNzjONOfzm4/viXrdqJt2w4mbQ9uwGH6gYRw0o81oC2wuN3PCFS EVrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=T2l5qLpoC47Uq/pRaIGqTzIO1NfsXvP7U4kgMNfCrMg=; b=iHnLoyEcjdwhqEkgjB93wlV1mE2Jiit3QYWVkMmJ26YFtqUxMbAcD5QPJEyIx+3JIb HtITm2DCaw7NFPLInhqDebNN4gxR+mtQuti7LT8Rvutiv9SFs9HsubavrMOK8BouOHEq pfkf4DsXma7UQYwXBgciw4Z5wi4XS/tpw15SgX6m4s6FVxkAfBzkpLGUplq9PGUSIMJ/ 5lfJLmSPtJckvHVbT11lIyXCCGH6bO5YpJPNHiG/sXNfOxahTzQQrWTXGPBD6UEqJdYT RK6TbdadcU7HrnNsvdxIj7zbkmkirvQLGlDv22VAH7+91hevU2TevsbJl+P0nbbVjdNJ IjVw== X-Gm-Message-State: AHYfb5jJldadz3sQUzHyGY8kuXrvgbGfbiDNo4Zym5GY+0QbdQbKKDnU Ug3oNw0Rk/b9+ei9+XG/z66mHsXQEw== X-Received: by 10.176.5.230 with SMTP id e93mr10809729uae.30.1503273228103; Sun, 20 Aug 2017 16:53:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.33.199 with HTTP; Sun, 20 Aug 2017 16:53:47 -0700 (PDT) In-Reply-To: <20170820195252.51ddf82b.freebsd@edvax.de> References: <20170820195252.51ddf82b.freebsd@edvax.de> From: Antonio Olivares Date: Sun, 20 Aug 2017 18:53:47 -0500 Message-ID: Subject: Imposing a pdf/postscript on top of another one To: Polytropon Cc: FreeBSD Questions Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: Sun, 20 Aug 2017 23:53:49 -0000 On Sunday, August 20, 2017, Polytropon > wrote: > On Sun, 20 Aug 2017 11:41:59 -0500, Antonio Olivares wrote: > > Dear FreeBSD users, > > > > Using only commands like psmerge, psnup, from psutils and a customized > > script with awk or sed is it possible to force a picture created using > > gnuplot as the background and impose a ps/pdf document created by > tex/latex > > on top of it. No other packages/programs like background package in > latex, > > or pdftk, are available. It is an old machine that is offline running > > 8.3-RELEASE amd64. > > The command psmerge does not work correctly. The files can be combined > > using ghostscript, but my goal is to use a graph from gnuplot output to > > postscript not eps, then process a tex file and output it to postscript > > with dvips. After this is done have a script that sets the postscript > file > > from gnuplot as the background and puts the one created by dvips on top > of > > that one. The postscript from gnuplot is fixed with fixbb and removes > > unnessary space, the other file postscript file is in letter format. > > Ideas, suggestions, advice are appreciated. > > I think what you're describing is a good task for pdftk. > You just need to provide the components to overlay in > PDF format, which is not a problem with pdflatex and > ps2pdf or convert (from ImageMagick) for the GNUplot > output. > > See "man pdftk" for the "background" keyword. > > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > 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 :( The psmerge utility part of psutils is available but does not work. It is referenced here https://stackoverflow.com/questions/3444931/how-to-merge-two-postscript-files-together 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? Best Regards, Antonio