You are not logged in.

#1 2012-05-31 12:42:24

examon
Member
Registered: 2011-05-07
Posts: 208

jpdf & spdf - simple programs to join and split pdf files

Hi, I've written simple Python programs which can join and split pdf files. I know there are many of those at the Internet but they are: really big, written in Java (or something "like that") or they are GUI based. I wanted super-simple CLI program, something like joinPDF but not written in Java.

I've made some AUR packeges: jpdf-git and spdf-git

The source is hosted on github: jpdf and spdf

I'll appreciate any comments and suggestions

Offline

#2 2012-05-31 14:59:00

Pres
Member
Registered: 2011-09-12
Posts: 423

Re: jpdf & spdf - simple programs to join and split pdf files

Looks good. I ran into this issue a few weeks ago where someone sent me a pdf I needed to split into each page and finding there were no decent linux tools for doing this (at least nothing simple).

Few things:
spdf should raise an exception if the file is encrypted and print a neater error message. Ran into this the first time I ran it, forgetting that the file I used was an encrypted PDF.
Implement a way to split a PDF out into each page?
With jpdf I get no output and no file created. I'll look at the source later to see what's going wrong here.

Also with both of these so lightweight, IMO it would be better to put them both in the same AUR package or even the same executable with --join and --split arguments.

Offline

#3 2012-05-31 15:34:22

broken pipe
Member
Registered: 2010-12-10
Posts: 243

Re: jpdf & spdf - simple programs to join and split pdf files

really great thank you! i had to join several pdfs for university and jpdf works like a breeze! it's also possible to use ghostscript, but this is imho easier smile

Offline

#4 2012-05-31 15:47:02

examon
Member
Registered: 2011-05-07
Posts: 208

Re: jpdf & spdf - simple programs to join and split pdf files

broken pipe wrote:

really great thank you! i had to join several pdfs for university and jpdf works like a breeze! it's also possible to use ghostscript, but this is imho easier smile

I'm happy that it is useful. BTW I used ghostscript some time ago as well but I ran into output quality loss.

Offline

#5 2012-05-31 18:15:07

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: jpdf & spdf - simple programs to join and split pdf files

Maybe you could get some ideas from stapler.

Scott

Offline

#6 2012-05-31 18:24:59

examon
Member
Registered: 2011-05-07
Posts: 208

Re: jpdf & spdf - simple programs to join and split pdf files

Pres wrote:

spdf should raise an exception if the file is encrypted and print a neater error message. Ran into this the first time I ran it, forgetting that the file I used was an encrypted PDF.

Fixed. Now spdf will ask you for password, decrypt file and continue.


Pres wrote:

Implement a way to split a PDF out into each page?

OK, I've added this feature. You can activate it by using zero digit as a pagenumber

 $ jpdf soure.pdf 0 
Pres wrote:

With jpdf I get no output and no file created. I'll look at the source later to see what's going wrong here.

I've added decryption support for jpdf as well. It works good with encrypted files (at least for me).


Pres wrote:

Also with both of these so lightweight, IMO it would be better to put them both in the same AUR package...

Maybe, but I really wanted them as individual packages. Many ppl only need to join or split files. I want to keep it as simple as it is possible.


Pres wrote:

...or even the same executable with --join and --split arguments.

Sorry, no way... I want them as individual, super-simple programs. I will not add any more features from now (only fix bugs, etc.) cos there are many other programs (eg. pdftk) which are big and offer a lot of features (if you need them).

Offline

#7 2012-06-02 12:12:01

dif
Member
From: Stalowa Wola, Poland
Registered: 2009-12-22
Posts: 137

Re: jpdf & spdf - simple programs to join and split pdf files

Minimalist and great.

Offline

#8 2012-06-02 13:34:24

examon
Member
Registered: 2011-05-07
Posts: 208

Re: jpdf & spdf - simple programs to join and split pdf files

dif wrote:

Minimalist and great.

Thanks dif. As you mentioned in the AUR comments, jpdf final.pdf file* works well, so I've added that into "jpdf --help".

Offline

#9 2012-06-03 04:51:31

Sara
Member
From: USA
Registered: 2009-07-09
Posts: 219
Website

Re: jpdf & spdf - simple programs to join and split pdf files

Targets (1): jpdf-git-20120603-1

Total Installed Size:   0.00 MiB

Now this is a first. Thanks a lot.


Registed Linux User 483618

Offline

#10 2013-08-10 12:16:38

mkind
Member
Registered: 2012-08-11
Posts: 27

Re: jpdf & spdf - simple programs to join and split pdf files

Only made use of spdf, but it was realy helpful and straightforward! Nice that I was able to choose at which page to split!

Offline

Board footer

Powered by FluxBB