public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Bryan Gardiner <bog@khumba.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] combining pdf files, different size
Date: Fri, 20 Nov 2015 08:46:21 -0800	[thread overview]
Message-ID: <20151120084621.3d51a930@khumba.net> (raw)
In-Reply-To: <564F330E.4060701@sys-concept.com>

[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]

On Fri, 20 Nov 2015 07:49:50 -0700
thelma@sys-concept.com wrote:

> On 11/19/2015 09:29 PM, Bryan Gardiner wrote:
> > On Thu, 19 Nov 2015 19:17:47 -0700
> > thelma@sys-concept.com wrote:
> > 
> >> On 11/19/2015 06:39 PM, thelma@sys-concept.com wrote:
> >>> I'm trying to use "pdfjoin" to combine two different page size pdf files
> >>> but it will not let me.  Is it possible.
> >>>
> >>> I don't see any switches to ignore page size.
> >>
> >> "pdfunite" works but I have to add/specify output file name.
> >> With "pdfjoin" it automatically creates the last_name_file + "-join.pdf"
> >> suffix.
> >>
> >> In XFCE in "Configure Custom Action" menu entry I added:
> >> pdfjoin %N
> >>
> >> so highlighting several pdf files it gives me output file name "-join"
> >> if I run it again on same file I get: "-join-join"
> >>
> >> With "pdfunite" it overrides the same file name.
> > 
> > I have this command from no-idea-where to concatenate PDFs using
> > Ghostscript (all credit to wherever it's from :), and a quick test
> > seems to show it working for different page sizes (the pages retain
> > their respective sizes).  If you like the "-join" suffix then use this
> > script:
> > 
> > #!/bin/sh
> > exec gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite \
> >     -sOutputFile="$(basename "$1" .pdf)-join.pdf" "$@"
> > 
> > Cheers,
> > Bryan
> 
> It works from bash script but when I entered that entire command into XFC "Configure Custom Action" menu:
> exec gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile="$(basename "$1" .pdf)-join.pdf" "$@" %N
> 
> I usually get the output file name as "-join.pdf" (no prefix name) and when I highlight the file name "-join.pdf" + another pdf file, it only includes one pdf file and it overrides the file name:  "-join.pdf"

It sounds like XFCE is running a shell command but not setting the
positional arguments.  It should work just to have XFCE call the
script with %N, and it's probably easiest this way.  If you really
don't want to call a script, you could try setting the positional
arguments with the shell command "set --".

Cheers,
Bryan

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2015-11-20 16:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20  1:39 [gentoo-user] combining pdf files, different size thelma
2015-11-20  2:17 ` thelma
2015-11-20  4:29   ` Bryan Gardiner
2015-11-20 14:49     ` thelma
2015-11-20 16:46       ` Bryan Gardiner [this message]
2015-11-20 20:04         ` Nuno Magalhães
2015-11-20 20:57           ` allan gottlieb
2015-11-20 20:59           ` Walter Dnes
2015-11-23  8:28 ` Frederico Moraes Ferreira
2015-11-23 18:00   ` Philip Webb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151120084621.3d51a930@khumba.net \
    --to=bog@khumba.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox