Re: [gentoo-user] pdftk - replacement

2018-03-15 Thread J. Roeleveld
On March 15, 2018 4:41:43 PM UTC, the...@sys-concept.com wrote:
>On 03/15/2018 03:00 AM, Neil Bothwick wrote:
>> On Thu, 15 Mar 2018 07:48:21 +0100, J. Roeleveld wrote:
>> 
 I need to "overlap" two PDF file, one on top of another, it is like
 watermarking.  I only do it once a year when I print a tax
 form/slips.  
>>>
>>> Maybe script your own solution?
>>> Extract images from the PDF
>>> Overlay the images
>>> convert the images back to PDF
>> 
>> Since it's only once a year:
>> 
>> Print one PDF
>> Put the paper back in the printer
>> Print the other page
>> 
>> It doesn't always pay to overcomplicate things :)
>
>Yes, I used to do it this way, when I had HP printer.  Now with Brother
>printers when you print first page "the form" it put some kind of
>static
>onto the page.  So when you run it second time, it jams almost every
>second page.
>
>--
>Thelma

A printer like that is considered broken by design. I would replace it
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: [gentoo-user] pdftk - replacement

2018-03-15 Thread Jack

On 2018.03.15 05:00, Neil Bothwick wrote:

On Thu, 15 Mar 2018 07:48:21 +0100, J. Roeleveld wrote:

> > I need to "overlap" two PDF file, one on top of another, it is  
like

> > watermarking.  I only do it once a year when I print a tax
> > form/slips.
>
> Maybe script your own solution?
> Extract images from the PDF
> Overlay the images
> convert the images back to PDF

Since it's only once a year:

Print one PDF
Put the paper back in the printer
Print the other page

It doesn't always pay to overcomplicate things :)

You forget the last step:
- scan the page to get it back as a PDF.   :-)

I wonder if one of the GhostScript components would do the overlay?   
Also, have you searched for a "watermark" feature in any of the  
potential tools?


Re: [gentoo-user] pdftk - replacement

2018-03-15 Thread thelma
On 03/15/2018 03:36 AM, Jean-Christophe Bach wrote:
> Hello,
> 
>>> I now use pdfjoin from app-text/pdfjam.
>>
>> The packages: pdfjoin and pdfunite
>>
>> They will combine pdf documents (I use them as well) but they will not
>> overlap two pages together.
> 
> Well, with some trick, pdfjam can actually  overlap two pages together :
> https://stackoverflow.com/questions/47973147/overlay-one-pdf-with-another-from-the-command-line-pdftk-alternative/48418698#48418698
> 
> Regards,
> 
> JC

Interesting.  Yes it kind of worked:
pdfjam t4sum_1page.pdf 1.pdf --outfile merged.pdf --nup "1x2" --delta "0 
-200pt" --papersize "{500pt, 200pt}"

But the output is small. When I tried --paper letterpaper
it is out of alignment.

So it needs some work, but it might be the solution. 

--
Thelma



Re: [gentoo-user] pdftk - replacement

2018-03-15 Thread thelma
On 03/15/2018 03:00 AM, Neil Bothwick wrote:
> On Thu, 15 Mar 2018 07:48:21 +0100, J. Roeleveld wrote:
> 
>>> I need to "overlap" two PDF file, one on top of another, it is like
>>> watermarking.  I only do it once a year when I print a tax
>>> form/slips.  
>>
>> Maybe script your own solution?
>> Extract images from the PDF
>> Overlay the images
>> convert the images back to PDF
> 
> Since it's only once a year:
> 
> Print one PDF
> Put the paper back in the printer
> Print the other page
> 
> It doesn't always pay to overcomplicate things :)

Yes, I used to do it this way, when I had HP printer.  Now with Brother
printers when you print first page "the form" it put some kind of static
onto the page.  So when you run it second time, it jams almost every
second page.

--
Thelma




Re: [gentoo-user] pdftk - replacement

2018-03-15 Thread Neil Bothwick
On Thu, 15 Mar 2018 10:11:17 +, Mick wrote:

> > Since it's only once a year:
> > 
> > Print one PDF
> > Put the paper back in the printer
> > Print the other page
> > 
> > It doesn't always pay to overcomplicate things :)  
> 
> Libreoffice Draw may work too, if the OP is happy to edit contents or
> fill in a form manually by typing, rather than merge/overlay two pages
> into one.

Okular can also be used to complete PDF forms.


-- 
Neil Bothwick

Top Oxymorons Number 5: Twelve-ounce pound cake


pgpE2Btg6Z4jM.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] pdftk - replacement

2018-03-15 Thread Mick
On Thursday, 15 March 2018 09:00:46 GMT Neil Bothwick wrote:
> On Thu, 15 Mar 2018 07:48:21 +0100, J. Roeleveld wrote:
> > > I need to "overlap" two PDF file, one on top of another, it is like
> > > watermarking.  I only do it once a year when I print a tax
> > > form/slips.
> > 
> > Maybe script your own solution?
> > Extract images from the PDF
> > Overlay the images
> > convert the images back to PDF
> 
> Since it's only once a year:
> 
> Print one PDF
> Put the paper back in the printer
> Print the other page
> 
> It doesn't always pay to overcomplicate things :)

Libreoffice Draw may work too, if the OP is happy to edit contents or fill in 
a form manually by typing, rather than merge/overlay two pages into one.

The only problem I have found with LO Draw is if the source pdf document 
contains a type face not present in the Linux OS, as is often the case with 
pdf forms dished out by various companies.  The character size is then wrong 
and I haven't found an easy way of adjusting it.
-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] pdftk - replacement

2018-03-15 Thread Jean-Christophe Bach
Hello,

> > I now use pdfjoin from app-text/pdfjam.
> 
> The packages: pdfjoin and pdfunite
> 
> They will combine pdf documents (I use them as well) but they will not
> overlap two pages together.

Well, with some trick, pdfjam can actually  overlap two pages together :
https://stackoverflow.com/questions/47973147/overlay-one-pdf-with-another-from-the-command-line-pdftk-alternative/48418698#48418698

Regards,

JC



signature.asc
Description: PGP signature


Re: [gentoo-user] pdftk - replacement

2018-03-15 Thread Neil Bothwick
On Thu, 15 Mar 2018 07:48:21 +0100, J. Roeleveld wrote:

> > I need to "overlap" two PDF file, one on top of another, it is like
> > watermarking.  I only do it once a year when I print a tax
> > form/slips.  
> 
> Maybe script your own solution?
> Extract images from the PDF
> Overlay the images
> convert the images back to PDF

Since it's only once a year:

Print one PDF
Put the paper back in the printer
Print the other page

It doesn't always pay to overcomplicate things :)


-- 
Neil Bothwick

Quick!! Act as if nothing has happened!


pgpUPcu6lVWYD.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] pdftk - replacement

2018-03-15 Thread Jean-Christophe Bach
Hello,

> That is not what I (we) need.
> pdfunite - will join several PDF file into one (this is not what I want).
> 
> I need to "overlap" two PDF file, one on top of another, it is like
> watermarking.  I only do it once a year when I print a tax form/slips.
 
Maybe a Python script using pyPdf ? It is a bit old, but the library still
exists and you could probably succeed in overlaying your files with the
mergePage operation. (something like that: watermark.mergePage(yourpage))

Regards,

JC


signature.asc
Description: PGP signature


Re: [gentoo-user] pdftk - replacement

2018-03-15 Thread J. Roeleveld
On Thursday, March 15, 2018 5:22:26 AM CET the...@sys-concept.com wrote:
> On 03/14/2018 08:52 PM, Danny YUE wrote:
> > On 2018-03-14 20:08, Poncho  wrote:
> >> On 14.03.2018 20:10, the...@sys-concept.com wrote:
> >>> Is there a suitable replacement package for "pdftk".
> >>> Currently pdftk is masked and might be dropped from portage tree  :-/
> >>> 
> >>> The packages require GCC 5 or earlier and are therefore masked in the
> >>> 17.0 profiles.
> >>> 
> >>> I use pdftk only to merge two pdf file (overlap tax form).
> >>> eg.
> >>> pdftk t4-flat-02b.pdf stamp  1.pdf  output out1.pdf
> >> 
> >> /usr/bin/pdfunite
> >> 
> >> it's a provided by app-text/poppler
> > 
> > Besides, app-text/poppler contains some very useful functions.
> > pdfunite is one of them, which let you concatenate several PDF files
> > into one.
> > 
> > Another piece I found useful is pdfseparate. It can separate a PDF file
> > into pages.
> > 
> > The combination of pdfunite and pdfseparate let you replace a single
> > page in a PDF file.
> > 
> > Command `equery f poppler' shows:
> >   /usr/bin/pdfdetach
> >   /usr/bin/pdffonts
> >   /usr/bin/pdfimages
> >   /usr/bin/pdfinfo
> >   /usr/bin/pdfseparate
> >   /usr/bin/pdftocairo
> >   /usr/bin/pdftohtml
> >   /usr/bin/pdftoppm
> >   /usr/bin/pdftops
> >   /usr/bin/pdftotext
> >   /usr/bin/pdfunite
> 
> That is not what I (we) need.
> pdfunite - will join several PDF file into one (this is not what I want).
> 
> I need to "overlap" two PDF file, one on top of another, it is like
> watermarking.  I only do it once a year when I print a tax form/slips.

Maybe script your own solution?
Extract images from the PDF
Overlay the images
convert the images back to PDF

--
Joost




Re: [gentoo-user] pdftk - replacement

2018-03-14 Thread thelma
On 03/14/2018 08:52 PM, Danny YUE wrote:
> 
> On 2018-03-14 20:08, Poncho  wrote:
>> On 14.03.2018 20:10, the...@sys-concept.com wrote:
>>> Is there a suitable replacement package for "pdftk".
>>> Currently pdftk is masked and might be dropped from portage tree  :-/
>>>
>>> The packages require GCC 5 or earlier and are therefore masked in the
>>> 17.0 profiles.
>>>
>>> I use pdftk only to merge two pdf file (overlap tax form).
>>> eg.
>>> pdftk t4-flat-02b.pdf stamp  1.pdf  output out1.pdf
>>>
>>
>> /usr/bin/pdfunite
>>
>> it's a provided by app-text/poppler
> 
> Besides, app-text/poppler contains some very useful functions.
> pdfunite is one of them, which let you concatenate several PDF files
> into one.
> 
> Another piece I found useful is pdfseparate. It can separate a PDF file
> into pages.
> 
> The combination of pdfunite and pdfseparate let you replace a single
> page in a PDF file.
> 
> Command `equery f poppler' shows:
>   /usr/bin/pdfdetach
>   /usr/bin/pdffonts
>   /usr/bin/pdfimages
>   /usr/bin/pdfinfo
>   /usr/bin/pdfseparate
>   /usr/bin/pdftocairo
>   /usr/bin/pdftohtml
>   /usr/bin/pdftoppm
>   /usr/bin/pdftops
>   /usr/bin/pdftotext
>   /usr/bin/pdfunite

That is not what I (we) need.
pdfunite - will join several PDF file into one (this is not what I want).

I need to "overlap" two PDF file, one on top of another, it is like
watermarking.  I only do it once a year when I print a tax form/slips.





Re: [gentoo-user] pdftk - replacement

2018-03-14 Thread Danny YUE

On 2018-03-14 20:08, Poncho  wrote:
> On 14.03.2018 20:10, the...@sys-concept.com wrote:
>> Is there a suitable replacement package for "pdftk".
>> Currently pdftk is masked and might be dropped from portage tree  :-/
>> 
>> The packages require GCC 5 or earlier and are therefore masked in the
>> 17.0 profiles.
>> 
>> I use pdftk only to merge two pdf file (overlap tax form).
>> eg.
>> pdftk t4-flat-02b.pdf stamp  1.pdf  output out1.pdf
>> 
>
> /usr/bin/pdfunite
>
> it's a provided by app-text/poppler

Besides, app-text/poppler contains some very useful functions.
pdfunite is one of them, which let you concatenate several PDF files
into one.

Another piece I found useful is pdfseparate. It can separate a PDF file
into pages.

The combination of pdfunite and pdfseparate let you replace a single
page in a PDF file.

Command `equery f poppler' shows:
  /usr/bin/pdfdetach
  /usr/bin/pdffonts
  /usr/bin/pdfimages
  /usr/bin/pdfinfo
  /usr/bin/pdfseparate
  /usr/bin/pdftocairo
  /usr/bin/pdftohtml
  /usr/bin/pdftoppm
  /usr/bin/pdftops
  /usr/bin/pdftotext
  /usr/bin/pdfunite




Re: [gentoo-user] pdftk - replacement

2018-03-14 Thread thelma
On 03/14/2018 02:01 PM, Neil Bothwick wrote:
> On Wed, 14 Mar 2018 13:10:21 -0600, the...@sys-concept.com wrote:
> 
>> Is there a suitable replacement package for "pdftk".
>> Currently pdftk is masked and might be dropped from portage tree  :-/
>>
>> The packages require GCC 5 or earlier and are therefore masked in the
>> 17.0 profiles.
>>
>> I use pdftk only to merge two pdf file (overlap tax form).
>> eg.
>> pdftk t4-flat-02b.pdf stamp  1.pdf  output out1.pdf
> 
> I now use pdfjoin from app-text/pdfjam.

The packages: pdfjoin and pdfunite

They will combine pdf documents (I use them as well) but they will not
overlap two pages together.
My t4-flat-02b.pdf - this is a form
1.pdf - contains only numbers spaced correctly.

I want to join these two pages and print it as one page.

I just check out "app-text/cpdf" but it doesn't do the job either.

--
Thelma



Re: [gentoo-user] pdftk - replacement

2018-03-14 Thread Poncho
On 14.03.2018 20:10, the...@sys-concept.com wrote:
> Is there a suitable replacement package for "pdftk".
> Currently pdftk is masked and might be dropped from portage tree  :-/
> 
> The packages require GCC 5 or earlier and are therefore masked in the
> 17.0 profiles.
> 
> I use pdftk only to merge two pdf file (overlap tax form).
> eg.
> pdftk t4-flat-02b.pdf stamp  1.pdf  output out1.pdf
> 

/usr/bin/pdfunite

it's a provided by app-text/poppler



Re: [gentoo-user] pdftk - replacement

2018-03-14 Thread Neil Bothwick
On Wed, 14 Mar 2018 13:10:21 -0600, the...@sys-concept.com wrote:

> Is there a suitable replacement package for "pdftk".
> Currently pdftk is masked and might be dropped from portage tree  :-/
> 
> The packages require GCC 5 or earlier and are therefore masked in the
> 17.0 profiles.
> 
> I use pdftk only to merge two pdf file (overlap tax form).
> eg.
> pdftk t4-flat-02b.pdf stamp  1.pdf  output out1.pdf

I now use pdfjoin from app-text/pdfjam.


-- 
Neil Bothwick

Uhura: Captain, you're being flamed on channel one.


pgpJ6PrVqvkGn.pgp
Description: OpenPGP digital signature