[Wylug-help] Set PDF background to transparent without quality loss

Andrew 'Leny' Lindley andrew at andrewlindley.co.uk
Mon Sep 21 17:56:38 UTC 2015


FWIW ISTR early FLOSS PDF implementations had problems cos the native
image format was some flavour/revision of TIFF which is Adobe owned[1].
Also PDF is based on a subset of Postscript[2].  You might, therefore,
try things like converting your background to TIFF or EPS before merging
it.  But note, transparency - which seems to be what you're after, is a
PDF property not in PS[ibid].  So you might try producing your
background as a PDF with image transparency in something like Scribus
(FLOSS DTP). 

Just ideas,

Leny


[1] https://en.wikipedia.org/wiki/Tagged_Image_File_Format
[2] https://en.wikipedia.org/wiki/Portable_Document_Format#PostScript

On Mon, 2015-09-21 at 10:36 +0100, Gary Stainburn wrote:
> Thanks Dan,
> 
> I'm installing inkscape as I'm typing this, and will have a look.
> 
> I'm also trying to get hold of the original art work.
> 
> This list has been quiet for a long time, but it's good to see that the 
> meetings are starting up again.
> 
> Pity it's not convenient for me any more, or I'd bob down.
> 
> Gary
> 
> On Monday 21 September 2015 10:15:26 Dan Walker wrote:
> > Hmm.
> >
> > Editing scanned bitmaps might well reduce quality - you won't get
> > decent-looking lines if the scan goes through a .JPG stage.
> >
> > Ideally, you'd get / recreate the invoice paper in a vector package -
> > You could try asking whoever created it in the first place, or maybe try
> > converting your scan to vector with Inkscape, then output it as a PDF
> > after clean-up?
> >
> > Failing that—and cleaning up vectors traced from a bitmap can be
> > tiresome—you could try setting your scanner to produce non-compressed
> > (or lossless) images such and PNG or GIF, and then convert the white to
> > transparent with Imagemagick (e.g. see
> > http://www.imagemagick.org/discourse-server/viewtopic.php?t=12619 - I
> > haven't tried it though )
> >
> > There's no ideal solution from a scanned image, scanned bitmaps are hard
> > to make look "clean" when they're actually artwork rather than photographs.
> >
> > Yrs,
> >
> > Dan
> >
> > (Gosh, it's been a while since I posted here ;)
> >
> > On 18/09/15 12:47, Gary Stainburn wrote:
> > > Hi all,
> > >
> > > As part of my virtual Printer -> invoice paper -> PDF project I'm
> > > struggling.
> > >
> > > I've got everything working except merging the invoice paper and the
> > > invoice.
> > >
> > > I have a single page PDF with the invoice stationery from a scanned
> > > original. I have the invoice as produced by our business management
> > > software
> > >
> > > I then ran
> > >
> > > pdftk invoice.pdf background  invoice_paper.pdf output output.pdf.
> > >
> > > Unfortunately this didn't work because our business software splatted all
> > > over the company logo.
> > >
> > > I then tried
> > >
> > > pdftk invoice.pdf background  invoice_paper.pdf output output.pdf.
> > >
> > > which priority to the invoice paper, effectively putting it over the
> > > invoice instead of behind it.  This of course means that the blank
> > > background of the paper splats over the invoice.
> > >
> > > The answer is to make the white background of the invoice_paper.pdf
> > > transparent.  I've tried doing this using PDFedit, convert, and gimp but
> > > the end result is a significant reduction of the quality of the
> > > invoice_paper.pdf.
> > >
> > > Can anyone suggest al alternative method, preferrably also removing the
> > > blemishes on the scanned paper.

-- 
Andrew M. 'Leny' Lindley aka leny2010
  GPG Key Fingerprint
  9D4E 367F 668B E7D3 5AD0  FD6C FD29 758B 592E BC27




More information about the Wylug-help mailing list