Re: PDFMerge Exception

2014-12-16 Thread Tilman Hausherr
It is the first file that makes the trouble, when trying to merge it 
with itself. This doesn't happen with the second one.


According to PDFDebugger, there is a resource recursion. Either that or 
a PDFBox bug.


Tilman

Am 16.12.2014 um 20:26 schrieb Marc Davis:

Hello,

I am using pdfbox-app-1.8.8.jar to merge this file 
https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 with this file 
https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.

I am getting the following result:

Exception in thread main java.lang.StackOverflowError
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1043)

and whole series of the last line. Any suggestions?  I think the last file may 
be problematic.

Thanks,
Marc








Re: PDFMerge Exception

2014-12-16 Thread Marc Davis
Yes, of course, I meant the first file.  I should have labelled it file1, 
file2.  Next steps??  File a bug?

Thanks,
Marc



 On Dec 16, 2014, at 2:54 PM, Tilman Hausherr thaush...@t-online.de wrote:
 
 It is the first file that makes the trouble, when trying to merge it with 
 itself. This doesn't happen with the second one.
 
 According to PDFDebugger, there is a resource recursion. Either that or a 
 PDFBox bug.
 
 Tilman
 
 Am 16.12.2014 um 20:26 schrieb Marc Davis:
 Hello,
 
 I am using pdfbox-app-1.8.8.jar to merge this file 
 https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 with this 
 file https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.
 
 I am getting the following result:
 
 Exception in thread main java.lang.StackOverflowError
  at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
  at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
  at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
  at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
  at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
  at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
  at 
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
  at 
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1043)
 
 and whole series of the last line. Any suggestions?  I think the last file 
 may be problematic.
 
 Thanks,
 Marc
 
 
 
 
 



Re: PDFMerge Exception

2014-12-16 Thread Tilman Hausherr

Hi,

Yes, you can file a bug in JIRA, but if there's really this resource 
recursion, the best that can be done is that have PDFMerger output an error.


You mentioned that you thought that the file might be problematic. Did 
you have other trouble already?


Tilman

Am 16.12.2014 um 20:55 schrieb Marc Davis:

Yes, of course, I meant the first file.  I should have labelled it file1, 
file2.  Next steps??  File a bug?

Thanks,
Marc




On Dec 16, 2014, at 2:54 PM, Tilman Hausherr thaush...@t-online.de wrote:

It is the first file that makes the trouble, when trying to merge it with 
itself. This doesn't happen with the second one.

According to PDFDebugger, there is a resource recursion. Either that or a 
PDFBox bug.

Tilman

Am 16.12.2014 um 20:26 schrieb Marc Davis:

Hello,

I am using pdfbox-app-1.8.8.jar to merge this file 
https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 with this file 
https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.

I am getting the following result:

Exception in thread main java.lang.StackOverflowError
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1043)

and whole series of the last line. Any suggestions?  I think the last file may 
be problematic.

Thanks,
Marc








Re: PDFMerge Exception

2014-12-16 Thread Marc Davis
That was the only trouble I had with this file - merging it. 

Thanks,
Marc



 On Dec 16, 2014, at 3:03 PM, Tilman Hausherr thaush...@t-online.de wrote:
 
 Hi,
 
 Yes, you can file a bug in JIRA, but if there's really this resource 
 recursion, the best that can be done is that have PDFMerger output an error.
 
 You mentioned that you thought that the file might be problematic. Did you 
 have other trouble already?
 
 Tilman
 
 Am 16.12.2014 um 20:55 schrieb Marc Davis:
 Yes, of course, I meant the first file.  I should have labelled it file1, 
 file2.  Next steps??  File a bug?
 
 Thanks,
 Marc
 
 
 
 On Dec 16, 2014, at 2:54 PM, Tilman Hausherr thaush...@t-online.de wrote:
 
 It is the first file that makes the trouble, when trying to merge it with 
 itself. This doesn't happen with the second one.
 
 According to PDFDebugger, there is a resource recursion. Either that or a 
 PDFBox bug.
 
 Tilman
 
 Am 16.12.2014 um 20:26 schrieb Marc Davis:
 Hello,
 
 I am using pdfbox-app-1.8.8.jar to merge this file 
 https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 with 
 this file https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.
 
 I am getting the following result:
 
 Exception in thread main java.lang.StackOverflowError
at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
at 
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
at 
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1043)
 
 and whole series of the last line. Any suggestions?  I think the last file 
 may be problematic.
 
 Thanks,
 Marc
 
 
 
 
 



Re: PDFMerge Exception

2014-12-16 Thread John Hewson
Try using the latest 2.0 snapshot, recursive resources are handled differently 
in 2.0, so the problem may not exist there.

-- John

 On 16 Dec 2014, at 12:03, Tilman Hausherr thaush...@t-online.de wrote:
 
 Hi,
 
 Yes, you can file a bug in JIRA, but if there's really this resource 
 recursion, the best that can be done is that have PDFMerger output an error.
 
 You mentioned that you thought that the file might be problematic. Did you 
 have other trouble already?
 
 Tilman
 
 Am 16.12.2014 um 20:55 schrieb Marc Davis:
 Yes, of course, I meant the first file.  I should have labelled it file1, 
 file2.  Next steps??  File a bug?
 
 Thanks,
 Marc
 
 
 
 On Dec 16, 2014, at 2:54 PM, Tilman Hausherr thaush...@t-online.de wrote:
 
 It is the first file that makes the trouble, when trying to merge it with 
 itself. This doesn't happen with the second one.
 
 According to PDFDebugger, there is a resource recursion. Either that or a 
 PDFBox bug.
 
 Tilman
 
 Am 16.12.2014 um 20:26 schrieb Marc Davis:
 Hello,
 
 I am using pdfbox-app-1.8.8.jar to merge this file 
 https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 with 
 this file https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.
 
 I am getting the following result:
 
 Exception in thread main java.lang.StackOverflowError
at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
at 
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
at 
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1043)
 
 and whole series of the last line. Any suggestions?  I think the last file 
 may be problematic.
 
 Thanks,
 Marc
 
 
 
 
 



Re: PDFMerge Exception

2014-12-16 Thread Tilman Hausherr

I tested with 2.0 :-(

Tilman

Am 16.12.2014 um 22:39 schrieb John Hewson:

Try using the latest 2.0 snapshot, recursive resources are handled differently 
in 2.0, so the problem may not exist there.

-- John


On 16 Dec 2014, at 12:03, Tilman Hausherr thaush...@t-online.de wrote:

Hi,

Yes, you can file a bug in JIRA, but if there's really this resource recursion, 
the best that can be done is that have PDFMerger output an error.

You mentioned that you thought that the file might be problematic. Did you have 
other trouble already?

Tilman

Am 16.12.2014 um 20:55 schrieb Marc Davis:

Yes, of course, I meant the first file.  I should have labelled it file1, 
file2.  Next steps??  File a bug?

Thanks,
Marc




On Dec 16, 2014, at 2:54 PM, Tilman Hausherr thaush...@t-online.de wrote:

It is the first file that makes the trouble, when trying to merge it with 
itself. This doesn't happen with the second one.

According to PDFDebugger, there is a resource recursion. Either that or a 
PDFBox bug.

Tilman

Am 16.12.2014 um 20:26 schrieb Marc Davis:

Hello,

I am using pdfbox-app-1.8.8.jar to merge this file 
https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 with this file 
https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.

I am getting the following result:

Exception in thread main java.lang.StackOverflowError
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1043)

and whole series of the last line. Any suggestions?  I think the last file may 
be problematic.

Thanks,
Marc










Re: PDFMerge Exception [SEC=UNOFFICIAL]

2014-12-16 Thread Marc Davis
File is NOT encrypted.

Thanks,
Marc



 On Dec 16, 2014, at 4:48 PM, Cheffers, Paul 
 paul.cheff...@humanservices.gov.au wrote:
 
 You have to make sure the PDF is not encrypted in order to merge.  If it is 
 encrypted you
 Need to decrypt it using PDFBOX calls (and for this you need the bouncycastle 
 jar file as well as PDFBOX).
 
 Paul
 
 -Original Message-
 From: Tilman Hausherr [mailto:thaush...@t-online.de]
 Sent: Wednesday, 17 December 2014 8:47 AM
 To: users@pdfbox.apache.org
 Subject: Re: PDFMerge Exception
 
 I tested with 2.0 :-(
 
 Tilman
 
 Am 16.12.2014 um 22:39 schrieb John Hewson:
 Try using the latest 2.0 snapshot, recursive resources are handled 
 differently in 2.0, so the problem may not exist there.
 
 -- John
 
 On 16 Dec 2014, at 12:03, Tilman Hausherr thaush...@t-online.de wrote:
 
 Hi,
 
 Yes, you can file a bug in JIRA, but if there's really this resource 
 recursion, the best that can be done is that have PDFMerger output an error.
 
 You mentioned that you thought that the file might be problematic. Did you 
 have other trouble already?
 
 Tilman
 
 Am 16.12.2014 um 20:55 schrieb Marc Davis:
 Yes, of course, I meant the first file.  I should have labelled it file1, 
 file2.  Next steps??  File a bug?
 
 Thanks,
 Marc
 
 
 
 On Dec 16, 2014, at 2:54 PM, Tilman Hausherr thaush...@t-online.de 
 wrote:
 
 It is the first file that makes the trouble, when trying to merge it with 
 itself. This doesn't happen with the second one.
 
 According to PDFDebugger, there is a resource recursion. Either that or a 
 PDFBox bug.
 
 Tilman
 
 Am 16.12.2014 um 20:26 schrieb Marc Davis:
 Hello,
 
 I am using pdfbox-app-1.8.8.jar to merge this file 
 https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 with 
 this file https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.
 
 I am getting the following result:
 
 Exception in thread main java.lang.StackOverflowError
  at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
  at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
  at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
  at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
  at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
  at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
  at 
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
  at 
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1043)
 
 and whole series of the last line. Any suggestions?  I think the last 
 file may be problematic.
 
 Thanks,
 Marc
 
 
 
 
 
 
 
 ** 
 IMPORTANT: This e-mail is for the use of the intended recipient only and may 
 contain information that is confidential, commercially valuable and/or 
 subject to legal or parliamentary privilege. If you are not the intended 
 recipient you are notified that any review, re-transmission, disclosure, 
 dissemination or other use of, or taking of any action in reliance upon, this 
 information is prohibited and may result in severe penalties. If you have 
 received this e-mail in error please notify the sender immediately and delete 
 all electronic and hard copies of this transmission together with any 
 attachments. Please consider the environment before printing this e-mail 
 **



Re: PDFMerge Exception [SEC=UNOFFICIAL]

2014-12-16 Thread Tilman Hausherr

The file is not encrypted.
Tilman

Am 16.12.2014 um 22:48 schrieb Cheffers, Paul:

You have to make sure the PDF is not encrypted in order to merge.  If it is 
encrypted you
Need to decrypt it using PDFBOX calls (and for this you need the bouncycastle 
jar file as well as PDFBOX).

Paul

-Original Message-
From: Tilman Hausherr [mailto:thaush...@t-online.de]
Sent: Wednesday, 17 December 2014 8:47 AM
To: users@pdfbox.apache.org
Subject: Re: PDFMerge Exception

I tested with 2.0 :-(

Tilman

Am 16.12.2014 um 22:39 schrieb John Hewson:

Try using the latest 2.0 snapshot, recursive resources are handled differently 
in 2.0, so the problem may not exist there.

-- John


On 16 Dec 2014, at 12:03, Tilman Hausherr thaush...@t-online.de wrote:

Hi,

Yes, you can file a bug in JIRA, but if there's really this resource recursion, 
the best that can be done is that have PDFMerger output an error.

You mentioned that you thought that the file might be problematic. Did you have 
other trouble already?

Tilman

Am 16.12.2014 um 20:55 schrieb Marc Davis:

Yes, of course, I meant the first file.  I should have labelled it file1, 
file2.  Next steps??  File a bug?

Thanks,
Marc




On Dec 16, 2014, at 2:54 PM, Tilman Hausherr thaush...@t-online.de wrote:

It is the first file that makes the trouble, when trying to merge it with 
itself. This doesn't happen with the second one.

According to PDFDebugger, there is a resource recursion. Either that or a 
PDFBox bug.

Tilman

Am 16.12.2014 um 20:26 schrieb Marc Davis:

Hello,

I am using pdfbox-app-1.8.8.jar to merge this file 
https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 with this file 
https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.

I am getting the following result:

Exception in thread main java.lang.StackOverflowError
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1043)

and whole series of the last line. Any suggestions?  I think the last file may 
be problematic.

Thanks,
Marc






** 
IMPORTANT: This e-mail is for the use of the intended recipient only and may 
contain information that is confidential, commercially valuable and/or subject 
to legal or parliamentary privilege. If you are not the intended recipient you 
are notified that any review, re-transmission, disclosure, dissemination or 
other use of, or taking of any action in reliance upon, this information is 
prohibited and may result in severe penalties. If you have received this e-mail 
in error please notify the sender immediately and delete all electronic and 
hard copies of this transmission together with any attachments. Please consider 
the environment before printing this e-mail 
**




RE: PDFMerge Exception [SEC=UNOFFICIAL]

2014-12-16 Thread Cheffers, Paul
Your PDF may not be content encrypted but it may have a permissions password 
attached to it.  The permissions security scheme determines whether it can be 
copied or printed etc.  You should put your PDFs through the actual adobe 
reader and look at preferences to see if there are some permissions 
restrictions.  These will have to be lifted if you are to merge.  Often there 
will be permissions restrictions with a permissions password of 

-Original Message-
From: Tilman Hausherr [mailto:thaush...@t-online.de]
Sent: Wednesday, 17 December 2014 8:54 AM
To: users@pdfbox.apache.org
Subject: Re: PDFMerge Exception [SEC=UNOFFICIAL]

The file is not encrypted.
Tilman

Am 16.12.2014 um 22:48 schrieb Cheffers, Paul:
 You have to make sure the PDF is not encrypted in order to merge.  If
 it is encrypted you Need to decrypt it using PDFBOX calls (and for this you 
 need the bouncycastle jar file as well as PDFBOX).

 Paul

 -Original Message-
 From: Tilman Hausherr [mailto:thaush...@t-online.de]
 Sent: Wednesday, 17 December 2014 8:47 AM
 To: users@pdfbox.apache.org
 Subject: Re: PDFMerge Exception

 I tested with 2.0 :-(

 Tilman

 Am 16.12.2014 um 22:39 schrieb John Hewson:
 Try using the latest 2.0 snapshot, recursive resources are handled 
 differently in 2.0, so the problem may not exist there.

 -- John

 On 16 Dec 2014, at 12:03, Tilman Hausherr thaush...@t-online.de wrote:

 Hi,

 Yes, you can file a bug in JIRA, but if there's really this resource 
 recursion, the best that can be done is that have PDFMerger output an error.

 You mentioned that you thought that the file might be problematic. Did you 
 have other trouble already?

 Tilman

 Am 16.12.2014 um 20:55 schrieb Marc Davis:
 Yes, of course, I meant the first file.  I should have labelled it file1, 
 file2.  Next steps??  File a bug?

 Thanks,
 Marc



 On Dec 16, 2014, at 2:54 PM, Tilman Hausherr thaush...@t-online.de 
 wrote:

 It is the first file that makes the trouble, when trying to merge it with 
 itself. This doesn't happen with the second one.

 According to PDFDebugger, there is a resource recursion. Either that or a 
 PDFBox bug.

 Tilman

 Am 16.12.2014 um 20:26 schrieb Marc Davis:
 Hello,

 I am using pdfbox-app-1.8.8.jar to merge this file 
 https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 with 
 this file https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.

 I am getting the following result:

 Exception in thread main java.lang.StackOverflowError
  at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
  at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
  at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
  at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
  at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
  at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
  at 
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
  at
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWrit
 er.java:1043)

 and whole series of the last line. Any suggestions?  I think the last 
 file may be problematic.

 Thanks,
 Marc





 **
 IMPORTANT: This e-mail is for the use of the intended recipient only
 and may contain information that is confidential, commercially
 valuable and/or subject to legal or parliamentary privilege. If you
 are not the intended recipient you are notified that any review,
 re-transmission, disclosure, dissemination or other use of, or taking
 of any action in reliance upon, this information is prohibited and may
 result in severe penalties. If you have received this e-mail in error
 please notify the sender immediately and delete all electronic and
 hard copies of this transmission together with any attachments. Please
 consider the environment before printing this e-mail
 **


** 
IMPORTANT: This e-mail is for the use of the intended recipient only and may 
contain information that is confidential, commercially valuable and/or subject 
to legal or parliamentary privilege. If you are not the intended recipient you 
are notified that any review, re-transmission, disclosure, dissemination or 
other use of, or taking of any action in reliance upon, this information is 
prohibited and may result in severe penalties. If you have received this e-mail 
in error please notify the sender immediately and delete all electronic and 
hard copies of this transmission together with any attachments. Please consider 
the environment before printing this e-mail 
**


Re: PDFMerge Exception [SEC=UNOFFICIAL]

2014-12-16 Thread Tilman Hausherr
The file isn't encrypted. Not even with an empty password. Encrypted 
files have an Encrypt entry.


Tilman

Am 16.12.2014 um 22:58 schrieb Cheffers, Paul:

Your PDF may not be content encrypted but it may have a permissions password attached to 
it.  The permissions security scheme determines whether it can be copied or printed etc.  
You should put your PDFs through the actual adobe reader and look at preferences to see 
if there are some permissions restrictions.  These will have to be lifted if you are to 
merge.  Often there will be permissions restrictions with a permissions password of 


-Original Message-
From: Tilman Hausherr [mailto:thaush...@t-online.de]
Sent: Wednesday, 17 December 2014 8:54 AM
To: users@pdfbox.apache.org
Subject: Re: PDFMerge Exception [SEC=UNOFFICIAL]

The file is not encrypted.
Tilman

Am 16.12.2014 um 22:48 schrieb Cheffers, Paul:

You have to make sure the PDF is not encrypted in order to merge.  If
it is encrypted you Need to decrypt it using PDFBOX calls (and for this you 
need the bouncycastle jar file as well as PDFBOX).

Paul

-Original Message-
From: Tilman Hausherr [mailto:thaush...@t-online.de]
Sent: Wednesday, 17 December 2014 8:47 AM
To: users@pdfbox.apache.org
Subject: Re: PDFMerge Exception

I tested with 2.0 :-(

Tilman

Am 16.12.2014 um 22:39 schrieb John Hewson:

Try using the latest 2.0 snapshot, recursive resources are handled differently 
in 2.0, so the problem may not exist there.

-- John


On 16 Dec 2014, at 12:03, Tilman Hausherr thaush...@t-online.de wrote:

Hi,

Yes, you can file a bug in JIRA, but if there's really this resource recursion, 
the best that can be done is that have PDFMerger output an error.

You mentioned that you thought that the file might be problematic. Did you have 
other trouble already?

Tilman

Am 16.12.2014 um 20:55 schrieb Marc Davis:

Yes, of course, I meant the first file.  I should have labelled it file1, 
file2.  Next steps??  File a bug?

Thanks,
Marc




On Dec 16, 2014, at 2:54 PM, Tilman Hausherr thaush...@t-online.de wrote:

It is the first file that makes the trouble, when trying to merge it with 
itself. This doesn't happen with the second one.

According to PDFDebugger, there is a resource recursion. Either that or a 
PDFBox bug.

Tilman

Am 16.12.2014 um 20:26 schrieb Marc Davis:

Hello,

I am using pdfbox-app-1.8.8.jar to merge this file 
https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 with this file 
https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.

I am getting the following result:

Exception in thread main java.lang.StackOverflowError
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
at
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWrit
er.java:1043)

and whole series of the last line. Any suggestions?  I think the last file may 
be problematic.

Thanks,
Marc





**
IMPORTANT: This e-mail is for the use of the intended recipient only
and may contain information that is confidential, commercially
valuable and/or subject to legal or parliamentary privilege. If you
are not the intended recipient you are notified that any review,
re-transmission, disclosure, dissemination or other use of, or taking
of any action in reliance upon, this information is prohibited and may
result in severe penalties. If you have received this e-mail in error
please notify the sender immediately and delete all electronic and
hard copies of this transmission together with any attachments. Please
consider the environment before printing this e-mail
**


** 
IMPORTANT: This e-mail is for the use of the intended recipient only and may 
contain information that is confidential, commercially valuable and/or subject 
to legal or parliamentary privilege. If you are not the intended recipient you 
are notified that any review, re-transmission, disclosure, dissemination or 
other use of, or taking of any action in reliance upon, this information is 
prohibited and may result in severe penalties. If you have received this e-mail 
in error please notify the sender immediately and delete all electronic and 
hard copies of this transmission together with any attachments. Please consider 
the environment before printing this e-mail 
**




Re: PDFMerge Exception

2014-12-16 Thread Tilman Hausherr

The problem is in an object stream:

21 0 22 166 23 339 24 1378 25 1548 26 2585 27 2750 28 3782 29 3960 30 
5004 /Count 1/Font/F0 23 0 R/F1 25 0 R/F2 27 0 R/F3 29 0 R/Kids[9 
0 R]/MediaBox[0 0 612.0 792.0]/ProcSet 30 0 R/Resources 21 0 
R/Type/Pages/XObject/Img0 19 0 R


21 0 22 166 23 339 24 1378 25 1548 26 2585 27 2750 28 3782 29 3960 30 
5004 tells where the objects start, i.e. object 21 starts at offset 0 
(after the table), object 22 at offset 166, etc. The problem here is 
that /Resources 21 0 R points to itself. This isn't the only problem 
with this file... that object is a resource, yet it does have /kids.


This PDF was produced with paperlessprinter.com. Did you produce this 
PDF yourself, or did you get it from outside? If you produced it 
youself, then update to the latest version.


Tilman


Am 16.12.2014 um 20:54 schrieb Tilman Hausherr:
It is the first file that makes the trouble, when trying to merge it 
with itself. This doesn't happen with the second one.


According to PDFDebugger, there is a resource recursion. Either that 
or a PDFBox bug.


Tilman

Am 16.12.2014 um 20:26 schrieb Marc Davis:

Hello,

I am using pdfbox-app-1.8.8.jar to merge this file 
https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 
with this file 
https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.


I am getting the following result:

Exception in thread main java.lang.StackOverflowError
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at 
java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at 
java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at 
java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)

at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1043)


and whole series of the last line. Any suggestions?  I think the last 
file may be problematic.


Thanks,
Marc










Re: PDFMerge Exception

2014-12-16 Thread Marc Davis
This file was sent to m.

Thanks,
Marc



 On Dec 16, 2014, at 5:21 PM, Tilman Hausherr thaush...@t-online.de wrote:
 
 The problem is in an object stream:
 
 21 0 22 166 23 339 24 1378 25 1548 26 2585 27 2750 28 3782 29 3960 30 5004 
 /Count 1/Font/F0 23 0 R/F1 25 0 R/F2 27 0 R/F3 29 0 R/Kids[9 0 
 R]/MediaBox[0 0 612.0 792.0]/ProcSet 30 0 R/Resources 21 0 
 R/Type/Pages/XObject/Img0 19 0 R
 
 21 0 22 166 23 339 24 1378 25 1548 26 2585 27 2750 28 3782 29 3960 30 5004 
 tells where the objects start, i.e. object 21 starts at offset 0 (after the 
 table), object 22 at offset 166, etc. The problem here is that /Resources 21 
 0 R points to itself. This isn't the only problem with this file... that 
 object is a resource, yet it does have /kids.
 
 This PDF was produced with paperlessprinter.com. Did you produce this PDF 
 yourself, or did you get it from outside? If you produced it youself, then 
 update to the latest version.
 
 Tilman
 
 
 Am 16.12.2014 um 20:54 schrieb Tilman Hausherr:
 It is the first file that makes the trouble, when trying to merge it with 
 itself. This doesn't happen with the second one.
 
 According to PDFDebugger, there is a resource recursion. Either that or a 
 PDFBox bug.
 
 Tilman
 
 Am 16.12.2014 um 20:26 schrieb Marc Davis:
 Hello,
 
 I am using pdfbox-app-1.8.8.jar to merge this file 
 https://www.dropbox.com/s/tfhpiac1n7evkf1/mark%20dinges.pdf?dl=0 with 
 this file https://www.dropbox.com/s/08xappgyx391q4u/diels%202.pdf?dl=0.
 
 I am getting the following result:
 
 Exception in thread main java.lang.StackOverflowError
at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at 
 java.util.LinkedHashMap$LinkedHashIterator.init(LinkedHashMap.java:366)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap$EntryIterator.init(LinkedHashMap.java:412)
at java.util.LinkedHashMap.newEntryIterator(LinkedHashMap.java:419)
at java.util.HashMap$EntrySet.iterator(HashMap.java:1082)
at 
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1016)
at 
 org.apache.pdfbox.pdfwriter.COSWriter.visitFromDictionary(COSWriter.java:1043)
 
 and whole series of the last line. Any suggestions?  I think the last file 
 may be problematic.
 
 Thanks,
 Marc