You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Robert Rodini <rr...@hotmail.com> on 2024/03/20 15:24:20 UTC

split a password protected file

Can PDFSplit split up a password-protected file.? It seems that it cannot, but there is no error message.
P.S. I am using v. 2.x of PDFBox.  I will upgrade soon.

Bob Rodini

Re: split a password protected file

Posted by Robert Rodini <rr...@hotmail.com>.
Actually, that behavior works fine for me. --Bob
________________________________
From: Tilman Hausherr <TH...@t-online.de>
Sent: Thursday, March 21, 2024 2:10 PM
To: users@pdfbox.apache.org <us...@pdfbox.apache.org>
Subject: Re: split a password protected file

On 21.03.2024 18:59, Robert Rodini wrote:
> Does this mean that splitting a password protected PDF effectively disables password protection?


On the result files, yes. I've never thought about it. To fix this, we'd
need the user and the owner password (only one of the two is needed to
decrypt).

Tilman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: split a password protected file

Posted by Tilman Hausherr <TH...@t-online.de>.
On 21.03.2024 18:59, Robert Rodini wrote:
> Does this mean that splitting a password protected PDF effectively disables password protection?


On the result files, yes. I've never thought about it. To fix this, we'd 
need the user and the owner password (only one of the two is needed to 
decrypt).

Tilman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: split a password protected file

Posted by Robert Rodini <rr...@hotmail.com>.
Does this mean that splitting a password protected PDF effectively disables password protection?
________________________________
From: Tilman Hausherr <TH...@t-online.de>
Sent: Wednesday, March 20, 2024 11:32 AM
To: users@pdfbox.apache.org <us...@pdfbox.apache.org>
Subject: Re: split a password protected file

On 20.03.2024 16:24, Robert Rodini wrote:
> Can PDFSplit split up a password-protected file.? It seems that it cannot, but there is no error message.
> P.S. I am using v. 2.x of PDFBox.  I will upgrade soon.

According to the usage, it should be able to (although it won't encrypt
when saving):

Usage: java -jar pdfbox-app-x.y.z.jar PDFSplit [options] <inputfile>

Options:
   -password  <password>  : Password to decrypt document
   -split     <integer>   : split after this many pages (default 1, if
startPage and endPage are unset)
   -startPage <integer>   : start page
   -endPage   <integer>   : end page
   -outputPrefix <prefix> : Filename prefix for split files
   <inputfile>            : The PDF document to use

In 3.0:

Usage: pdfbox pdfsplit [-hV] [-password[=<password>]] [-endPage=<endPage>]
                        -i=<infile> [-outputPrefix=<outputPrefix>]
                        [-split=<split>] [-startPage=<startPage>]
       -endPage=<endPage>   end page.
   -h, --help               Show this help message and exit.
   -i, --input=<infile>     the PDF file to split
       -outputPrefix=<outputPrefix>
                            the filename prefix for split files.
       -password[=<password>]
                            the password to decrypt the document.
       -split=<split>       split after this many pages (default 1, if
startPage
                              and endPage are unset).
       -startPage=<startPage>
                            start page.
   -V, --version            Print version information and exit.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: split a password protected file

Posted by Tilman Hausherr <TH...@t-online.de>.
On 20.03.2024 16:24, Robert Rodini wrote:
> Can PDFSplit split up a password-protected file.? It seems that it cannot, but there is no error message.
> P.S. I am using v. 2.x of PDFBox.  I will upgrade soon.

According to the usage, it should be able to (although it won't encrypt 
when saving):

Usage: java -jar pdfbox-app-x.y.z.jar PDFSplit [options] <inputfile>

Options:
   -password  <password>  : Password to decrypt document
   -split     <integer>   : split after this many pages (default 1, if 
startPage and endPage are unset)
   -startPage <integer>   : start page
   -endPage   <integer>   : end page
   -outputPrefix <prefix> : Filename prefix for split files
   <inputfile>            : The PDF document to use

In 3.0:

Usage: pdfbox pdfsplit [-hV] [-password[=<password>]] [-endPage=<endPage>]
                        -i=<infile> [-outputPrefix=<outputPrefix>]
                        [-split=<split>] [-startPage=<startPage>]
       -endPage=<endPage>   end page.
   -h, --help               Show this help message and exit.
   -i, --input=<infile>     the PDF file to split
       -outputPrefix=<outputPrefix>
                            the filename prefix for split files.
       -password[=<password>]
                            the password to decrypt the document.
       -split=<split>       split after this many pages (default 1, if 
startPage
                              and endPage are unset).
       -startPage=<startPage>
                            start page.
   -V, --version            Print version information and exit.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org