ps2pdf also takes pdf as input, not only ps

Bug #316943 reported by Jakob Unterwurzacher
4
Affects Status Importance Assigned to Milestone
bash-completion (Debian)
Fix Released
Unknown
bash-completion (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

ps2pdf will, despite it's name, happily process pdfs (i use it all the time this way to compress pdfs to reasonable sizes). But the tab completion will only show up .ps files, which is annoying.

The attached patch fixes this.

Revision history for this message
Jakob Unterwurzacher (jakobunt) wrote :
description: updated
Revision history for this message
Dave Walker (davewalker) wrote :

BUG

Hi Jakob,

Thanks for reporting this bug and also finding a patch. I did attempt to use ps2pdf to compress a PDF and found that when used on Ubuntu's shipped example content, i did indeed make the file size smaller. However, when i ran it against a PDF generated from firefox print-to-file (PDF), i found it actually made the resulting PDF larger. The other bug that this introduces, ps2pdf's default behaviour is to save the resulting filename, changing the file extension from *.ps to *.pdf. However, without changes to ps2pdf it will save the resulting output to *.pdf.pdf which is less than optimal IMO.

Using another tool, such as pdftk with the compress option did make the resulting PDF smaller. This makes me wonder if using ps2pdf in the situation you described is generally optimal for all users.

Suggestions welcome!

Changed in bash-completion:
status: New → Incomplete
Revision history for this message
James Westby (james-w) wrote :

Hi Daviey,

It seems like that if it accepts .pdfs we should have the tab completion reflect that,
even if the tool doesn't handle them perfectly.

I'll send this patch to Debian for the maintainer's consideration.

Thanks,

James

James Westby (james-w)
Changed in bash-completion:
importance: Undecided → Low
status: Incomplete → Triaged
Revision history for this message
Jakob Unterwurzacher (jakobunt) wrote :

pdftk only does trivial stuff, it can't resample images for example.
ps2pdf is the only tool i know that will resample pdfs to a desired (it has lots of options) resolution/quality.

Changed in bash-completion:
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.9 KiB)

This bug was fixed in the package bash-completion - 1:1.0-2

---------------
bash-completion (1:1.0-2) unstable; urgency=low

  * Remove mtx completion from bash_completion.d/ (Closes: #522545)

bash-completion (1:1.0-1) unstable; urgency=low

  * New upstream release:
    - also see /usr/share/doc/bash-completion/CHANGES.gz
    - fix man -l completing filenames (Closes: #497074)
    - (Partly) fixed java classes completion (Closes: #496828). Look for
      FIXME in source.
    - dump to /dev/null error message from look(1) with no arguments
      (Closes: #495142)
    - set ssh as default for rsync (was rsh) (Closes: #492328)
    - added .oga, .ogv, .ogx to mplayer completion (Closes: #496162)
    - added .epub to unzip|zipinfo completion (Closes: #492476)
    - added ssh-copy-id completion (Closes: #491856)
    - moved ssh completion to separate file (Closes: #360628)
    - bogus completion when mounting subdirs fixed (Closes: #322238)
    - fix `apt-cache showsrc` completing only on source package names
      (Closes: #361535)
    - fixed bugs with gdb completion:
    - when an empty directory is in $PATH (thanks to Morita Sho)
      (Closes: #497597)
    - when a non-existing directory is in $PATH (Closes: #499780)
    - fix missing completion for "-n" and "-e" (we were using echo, now
      using printf) (thanks to Morita Sho) (Closes: #498105)
    - fixed gpg completion --@(export|@(?(l|nr|nrl)sign|edit)-key))
      (Closes: #500316)
    - fixed .cb[rz] completion for evince (Closes: #502885)
    - added gpg2 completion (Closes: #489927)
    - fixed mplayer -skin completion (Closes: #501473)
    - fixed errors with POSIX enabled (Closes: #502804)
    - fixed dpkg-source wrong exit() with return() (Closes: #503317)
    - added --schedule-only to aptitude's completion (Closes: #502664)
    - added build-dep to aptitude's completion (Closes: #495883)
    - added support for `-F configfile' to _known_hosts(), ssh, scp and
      sftp, thanks to Freddy Vulto (Closes: #504141)
    - fixed sed quoting bug in _known_hosts(), thanks to Freddy Vulto
      (Closes: #504650)
    - allow for comments in known_hosts files (Closes: #511789)
    - fixed perl -I/-x completion, thanks to Freddy Vulto
      (Closes: #504547)
    - README updated: explain how to use bash-completion correctly.
      (Closes: #506560)
    - added qdbus completion, thanks to Terence Simpson (LP: #257903)
    - fixed completion of environment variables, thanks to Morita Sho
      (Closes: #272660)
    - fix dpkg completion bug: it listed only non-Essential packages
      (Closes: #511790)
    - fixed _dpkg_source completion (Closes: #503317)
    - remove unused UNAME local variable in _info() (Closes: #501843)
    - added .zip to jar completions (Closes: #521041)
    - Merge from Ubuntu:
      + consume error messages in configure completion (LP: #223882)
        (Mika Fischer)
      + quote $xspec in _filedir_xspec in case it is empty, which would
        cause errors if there was no match under failglob. (LP: #194419)
        (Mika Fischer)
    - Ville Skyttä:
      + remove duplicate cpio completion, thanks to Freddy Vulto
        (Closes: #512823)
      + fix awk error in "...

Read more...

Changed in bash-completion (Ubuntu):
status: Triaged → Fix Released
Changed in bash-completion (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.