On Fri, 20 Nov 2015 07:49:50 -0700
[email protected] wrote:

> On 11/19/2015 09:29 PM, Bryan Gardiner wrote:
> > On Thu, 19 Nov 2015 19:17:47 -0700
> > [email protected] wrote:
> > 
> >> On 11/19/2015 06:39 PM, [email protected] 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: pgpXT_glgEKaE.pgp
Description: OpenPGP digital signature

Reply via email to