[jira] [Commented] (PDFBOX-5299) org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException: Cannot decrypt PDF, the password is incorrect

2021-10-22 Thread Ling Hock Hin, Daniel (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17433210#comment-17433210
 ] 

Ling Hock Hin, Daniel commented on PDFBOX-5299:
---

have checked original pdf. Pdf was password protected. Issue is with pdf

> org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException: Cannot decrypt 
> PDF, the password is incorrect
> 
>
> Key: PDFBOX-5299
> URL: https://issues.apache.org/jira/browse/PDFBOX-5299
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 2.0.24
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: error.log
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Closed] (PDFBOX-5299) org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException: Cannot decrypt PDF, the password is incorrect

2021-10-22 Thread Ling Hock Hin, Daniel (Jira)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-5299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ling Hock Hin, Daniel closed PDFBOX-5299.
-
Resolution: Not A Bug

> org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException: Cannot decrypt 
> PDF, the password is incorrect
> 
>
> Key: PDFBOX-5299
> URL: https://issues.apache.org/jira/browse/PDFBOX-5299
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 2.0.24
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: error.log
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5295) java.io.IOException: Expected string 'null' but missed at character 'u' at offset 1090371

2021-10-22 Thread Ling Hock Hin, Daniel (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17433207#comment-17433207
 ] 

Ling Hock Hin, Daniel commented on PDFBOX-5295:
---

Yes. I realised that yesterday. Thanks for your assistance.

> java.io.IOException: Expected string 'null' but missed at character 'u' at 
> offset 1090371
> -
>
> Key: PDFBOX-5295
> URL: https://issues.apache.org/jira/browse/PDFBOX-5295
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.24
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: error_logs.txt, screenshot_of_error.jpeg
>
>
> Would like to understand more on this error.
>  
> refer to screenshot for error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Closed] (PDFBOX-5295) java.io.IOException: Expected string 'null' but missed at character 'u' at offset 1090371

2021-10-22 Thread Ling Hock Hin, Daniel (Jira)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-5295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ling Hock Hin, Daniel closed PDFBOX-5295.
-
Resolution: Not A Bug

Issue is with the pdf

> java.io.IOException: Expected string 'null' but missed at character 'u' at 
> offset 1090371
> -
>
> Key: PDFBOX-5295
> URL: https://issues.apache.org/jira/browse/PDFBOX-5295
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.24
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: error_logs.txt, screenshot_of_error.jpeg
>
>
> Would like to understand more on this error.
>  
> refer to screenshot for error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5295) java.io.IOException: Expected string 'null' but missed at character 'u' at offset 1090371

2021-10-22 Thread Ling Hock Hin, Daniel (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17432840#comment-17432840
 ] 

Ling Hock Hin, Daniel commented on PDFBOX-5295:
---

What I know is that the pdf can be opened by Adobe Acrobat Reader but when I 
attempt to save, it shows "The document could not be saved. There was a problem 
reading this document (110)."

> java.io.IOException: Expected string 'null' but missed at character 'u' at 
> offset 1090371
> -
>
> Key: PDFBOX-5295
> URL: https://issues.apache.org/jira/browse/PDFBOX-5295
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.24
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: error_logs.txt, screenshot_of_error.jpeg
>
>
> Would like to understand more on this error.
>  
> refer to screenshot for error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5295) java.io.IOException: Expected string 'null' but missed at character 'u' at offset 1090371

2021-10-21 Thread Ling Hock Hin, Daniel (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17432819#comment-17432819
 ] 

Ling Hock Hin, Daniel commented on PDFBOX-5295:
---

Is it possible to share the pdf through other means (e.g. email) ? The pdf 
contains sensitive personal information.

> java.io.IOException: Expected string 'null' but missed at character 'u' at 
> offset 1090371
> -
>
> Key: PDFBOX-5295
> URL: https://issues.apache.org/jira/browse/PDFBOX-5295
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.24
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: error_logs.txt, screenshot_of_error.jpeg
>
>
> Would like to understand more on this error.
>  
> refer to screenshot for error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5295) java.io.IOException: Expected string 'null' but missed at character 'u' at offset 1090371

2021-10-20 Thread Ling Hock Hin, Daniel (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17432184#comment-17432184
 ] 

Ling Hock Hin, Daniel commented on PDFBOX-5295:
---

Apologies. Still in the process of getting pdf from the user.

> java.io.IOException: Expected string 'null' but missed at character 'u' at 
> offset 1090371
> -
>
> Key: PDFBOX-5295
> URL: https://issues.apache.org/jira/browse/PDFBOX-5295
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.24
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: error_logs.txt, screenshot_of_error.jpeg
>
>
> Would like to understand more on this error.
>  
> refer to screenshot for error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Created] (PDFBOX-5299) org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException: Cannot decrypt PDF, the password is incorrect

2021-10-20 Thread Ling Hock Hin, Daniel (Jira)
Ling Hock Hin, Daniel created PDFBOX-5299:
-

 Summary: 
org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException: Cannot decrypt 
PDF, the password is incorrect
 Key: PDFBOX-5299
 URL: https://issues.apache.org/jira/browse/PDFBOX-5299
 Project: PDFBox
  Issue Type: Bug
Affects Versions: 2.0.24
Reporter: Ling Hock Hin, Daniel
 Attachments: error.log





--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-5295) java.io.IOException: Expected string 'null' but missed at character 'u' at offset 1090371

2021-10-20 Thread Ling Hock Hin, Daniel (Jira)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-5295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ling Hock Hin, Daniel updated PDFBOX-5295:
--
Attachment: error_logs.txt

> java.io.IOException: Expected string 'null' but missed at character 'u' at 
> offset 1090371
> -
>
> Key: PDFBOX-5295
> URL: https://issues.apache.org/jira/browse/PDFBOX-5295
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.24
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: error_logs.txt, screenshot_of_error.jpeg
>
>
> Would like to understand more on this error.
>  
> refer to screenshot for error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-5295) java.io.IOException: Expected string 'null' but missed at character 'u' at offset 1090371

2021-10-18 Thread Ling Hock Hin, Daniel (Jira)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-5295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ling Hock Hin, Daniel updated PDFBOX-5295:
--
Summary: java.io.IOException: Expected string 'null' but missed at 
character 'u' at offset 1090371  (was: java.io.IOException: Expected string 
'null' but missed at charater 'u' at offset 1090371)

> java.io.IOException: Expected string 'null' but missed at character 'u' at 
> offset 1090371
> -
>
> Key: PDFBOX-5295
> URL: https://issues.apache.org/jira/browse/PDFBOX-5295
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 2.0.24
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: screenshot_of_error.jpeg
>
>
> Would like to understand more on this error.
>  
> refer to screenshot for error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-5295) java.io.IOException: Expected string 'null' but missed at charater 'u' at offset 1090371

2021-10-18 Thread Ling Hock Hin, Daniel (Jira)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-5295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ling Hock Hin, Daniel updated PDFBOX-5295:
--
Description: 
Would like to understand more on this error.

 

refer to screenshot for error.

  was:refer to screenshot for error.


> java.io.IOException: Expected string 'null' but missed at charater 'u' at 
> offset 1090371
> 
>
> Key: PDFBOX-5295
> URL: https://issues.apache.org/jira/browse/PDFBOX-5295
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 2.0.24
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: screenshot_of_error.jpeg
>
>
> Would like to understand more on this error.
>  
> refer to screenshot for error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Created] (PDFBOX-5295) java.io.IOException: Expected string 'null' but missed at charater 'u' at offset 1090371

2021-10-18 Thread Ling Hock Hin, Daniel (Jira)
Ling Hock Hin, Daniel created PDFBOX-5295:
-

 Summary: java.io.IOException: Expected string 'null' but missed at 
charater 'u' at offset 1090371
 Key: PDFBOX-5295
 URL: https://issues.apache.org/jira/browse/PDFBOX-5295
 Project: PDFBox
  Issue Type: Bug
Affects Versions: 2.0.24
Reporter: Ling Hock Hin, Daniel
 Attachments: screenshot_of_error.jpeg

refer to screenshot for error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5096) Is there a way for PDFBox to decrypt encrypted pdf files without providing the password?

2021-02-07 Thread Ling Hock Hin, Daniel (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17280711#comment-17280711
 ] 

Ling Hock Hin, Daniel commented on PDFBOX-5096:
---

May I draw your attention back to the main question 'Is there a way for PDFBox 
to decrypt encrypted pdf files *without providing the password*?'

So the answer to this question is NO?

> Is there a way for PDFBox to decrypt encrypted pdf files without providing 
> the password?
> 
>
> Key: PDFBOX-5096
> URL: https://issues.apache.org/jira/browse/PDFBOX-5096
> Project: PDFBox
>  Issue Type: Wish
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: function.txt, test_e_file.pdf
>
>
> My application needs to remove metadata of pdf files when uploaded. When 
> attempting to  load and remove metadata of encrypted pdf files, I get the 
> logs below.
>  
>  at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275] at 
> java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]Caused by: 
> java.lang.IllegalStateException: PDF contains an encryption dictionary, 
> please remove it with setAllSecurityToBeRemoved() or set a protection policy 
> with protect() at 
> org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1367) 
> ~[pdfbox-2.0.22.jar:2.0.22] at 
> org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1319) 
> ~[pdfbox-2.0.22.jar:2.0.22] at 
> org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1357) 
> ~[pdfbox-2.0.22.jar:2.0.22]
>  
> Tried to use the code below but it does not seem to work.
> PDDocument document = PDDocument.load(documentBytes);
>  if (document.isEncrypted()) {
>  document.setAllSecurityToBeRemoved(true);
>  }
>  
> Appreciate your advice.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5096) Is there a way for PDFBox to decrypt encrypted pdf files without providing the password?

2021-02-04 Thread Ling Hock Hin, Daniel (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17279394#comment-17279394
 ] 

Ling Hock Hin, Daniel commented on PDFBOX-5096:
---

[^test_e_file.pdf]

^I uploaded this file.^

^[^function.txt]^

^used this function^

Encountered the error below:

 

 at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275] at 
java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]Caused by: 
java.lang.IllegalStateException: PDF contains an encryption dictionary, please 
remove it with setAllSecurityToBeRemoved() or set a protection policy with 
protect() at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1367) 
~[pdfbox-2.0.22.jar:2.0.22] at 
org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1319) 
~[pdfbox-2.0.22.jar:2.0.22] at 
org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1357) 
~[pdfbox-2.0.22.jar:2.0.22]

 

> Is there a way for PDFBox to decrypt encrypted pdf files without providing 
> the password?
> 
>
> Key: PDFBOX-5096
> URL: https://issues.apache.org/jira/browse/PDFBOX-5096
> Project: PDFBox
>  Issue Type: Wish
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: function.txt, test_e_file.pdf
>
>
> My application needs to remove metadata of pdf files when uploaded. When 
> attempting to  load and remove metadata of encrypted pdf files, I get the 
> logs below.
>  
>  at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275] at 
> java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]Caused by: 
> java.lang.IllegalStateException: PDF contains an encryption dictionary, 
> please remove it with setAllSecurityToBeRemoved() or set a protection policy 
> with protect() at 
> org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1367) 
> ~[pdfbox-2.0.22.jar:2.0.22] at 
> org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1319) 
> ~[pdfbox-2.0.22.jar:2.0.22] at 
> org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1357) 
> ~[pdfbox-2.0.22.jar:2.0.22]
>  
> Tried to use the code below but it does not seem to work.
> PDDocument document = PDDocument.load(documentBytes);
>  if (document.isEncrypted()) {
>  document.setAllSecurityToBeRemoved(true);
>  }
>  
> Appreciate your advice.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-5096) Is there a way for PDFBox to decrypt encrypted pdf files without providing the password?

2021-02-04 Thread Ling Hock Hin, Daniel (Jira)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ling Hock Hin, Daniel updated PDFBOX-5096:
--
Attachment: function.txt

> Is there a way for PDFBox to decrypt encrypted pdf files without providing 
> the password?
> 
>
> Key: PDFBOX-5096
> URL: https://issues.apache.org/jira/browse/PDFBOX-5096
> Project: PDFBox
>  Issue Type: Wish
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: function.txt, test_e_file.pdf
>
>
> My application needs to remove metadata of pdf files when uploaded. When 
> attempting to  load and remove metadata of encrypted pdf files, I get the 
> logs below.
>  
>  at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275] at 
> java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]Caused by: 
> java.lang.IllegalStateException: PDF contains an encryption dictionary, 
> please remove it with setAllSecurityToBeRemoved() or set a protection policy 
> with protect() at 
> org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1367) 
> ~[pdfbox-2.0.22.jar:2.0.22] at 
> org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1319) 
> ~[pdfbox-2.0.22.jar:2.0.22] at 
> org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1357) 
> ~[pdfbox-2.0.22.jar:2.0.22]
>  
> Tried to use the code below but it does not seem to work.
> PDDocument document = PDDocument.load(documentBytes);
>  if (document.isEncrypted()) {
>  document.setAllSecurityToBeRemoved(true);
>  }
>  
> Appreciate your advice.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-5096) Is there a way for PDFBox to decrypt encrypted pdf files without providing the password?

2021-02-04 Thread Ling Hock Hin, Daniel (Jira)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ling Hock Hin, Daniel updated PDFBOX-5096:
--
Attachment: test_e_file.pdf

> Is there a way for PDFBox to decrypt encrypted pdf files without providing 
> the password?
> 
>
> Key: PDFBOX-5096
> URL: https://issues.apache.org/jira/browse/PDFBOX-5096
> Project: PDFBox
>  Issue Type: Wish
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
> Attachments: test_e_file.pdf
>
>
> My application needs to remove metadata of pdf files when uploaded. When 
> attempting to  load and remove metadata of encrypted pdf files, I get the 
> logs below.
>  
>  at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275] at 
> java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]Caused by: 
> java.lang.IllegalStateException: PDF contains an encryption dictionary, 
> please remove it with setAllSecurityToBeRemoved() or set a protection policy 
> with protect() at 
> org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1367) 
> ~[pdfbox-2.0.22.jar:2.0.22] at 
> org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1319) 
> ~[pdfbox-2.0.22.jar:2.0.22] at 
> org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1357) 
> ~[pdfbox-2.0.22.jar:2.0.22]
>  
> Tried to use the code below but it does not seem to work.
> PDDocument document = PDDocument.load(documentBytes);
>  if (document.isEncrypted()) {
>  document.setAllSecurityToBeRemoved(true);
>  }
>  
> Appreciate your advice.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5096) Is there a way for PDFBox to decrypt encrypted pdf files without providing the password?

2021-02-04 Thread Ling Hock Hin, Daniel (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17279261#comment-17279261
 ] 

Ling Hock Hin, Daniel commented on PDFBOX-5096:
---

The saved PDF need not be encrypted. You mentioned 
{{document.setAllSecurityToBeRemoved(true)}} should work but it didn't. How do 
I get it to work?

> Is there a way for PDFBox to decrypt encrypted pdf files without providing 
> the password?
> 
>
> Key: PDFBOX-5096
> URL: https://issues.apache.org/jira/browse/PDFBOX-5096
> Project: PDFBox
>  Issue Type: Wish
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
>
> My application needs to remove metadata of pdf files when uploaded. When 
> attempting to  load and remove metadata of encrypted pdf files, I get the 
> logs below.
>  
>  at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275] at 
> java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]Caused by: 
> java.lang.IllegalStateException: PDF contains an encryption dictionary, 
> please remove it with setAllSecurityToBeRemoved() or set a protection policy 
> with protect() at 
> org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1367) 
> ~[pdfbox-2.0.22.jar:2.0.22] at 
> org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1319) 
> ~[pdfbox-2.0.22.jar:2.0.22] at 
> org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1357) 
> ~[pdfbox-2.0.22.jar:2.0.22]
>  
> Tried to use the code below but it does not seem to work.
> PDDocument document = PDDocument.load(documentBytes);
>  if (document.isEncrypted()) {
>  document.setAllSecurityToBeRemoved(true);
>  }
>  
> Appreciate your advice.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Created] (PDFBOX-5096) Is there a way for PDFBox to decrypt encrypted pdf files without providing the password?

2021-02-04 Thread Ling Hock Hin, Daniel (Jira)
Ling Hock Hin, Daniel created PDFBOX-5096:
-

 Summary: Is there a way for PDFBox to decrypt encrypted pdf files 
without providing the password?
 Key: PDFBOX-5096
 URL: https://issues.apache.org/jira/browse/PDFBOX-5096
 Project: PDFBox
  Issue Type: Wish
Reporter: Ling Hock Hin, Daniel


My application needs to remove metadata of pdf files when uploaded. When 
attempting to  load and remove metadata of encrypted pdf files, I get the logs 
below.

 

 at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275] at 
java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]Caused by: 
java.lang.IllegalStateException: PDF contains an encryption dictionary, please 
remove it with setAllSecurityToBeRemoved() or set a protection policy with 
protect() at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1367) 
~[pdfbox-2.0.22.jar:2.0.22] at 
org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1319) 
~[pdfbox-2.0.22.jar:2.0.22] at 
org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1357) 
~[pdfbox-2.0.22.jar:2.0.22]

 

Tried to use the code below but it does not seem to work.

PDDocument document = PDDocument.load(documentBytes);
 if (document.isEncrypted()) {
 document.setAllSecurityToBeRemoved(true);
 }

 

Appreciate your advice.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Created] (PDFBOX-5089) Unable to download file (java.io.IOException: Error: End-of-File, expected line)

2021-01-26 Thread Ling Hock Hin, Daniel (Jira)
Ling Hock Hin, Daniel created PDFBOX-5089:
-

 Summary: Unable to download file (java.io.IOException: Error: 
End-of-File, expected line)
 Key: PDFBOX-5089
 URL: https://issues.apache.org/jira/browse/PDFBOX-5089
 Project: PDFBox
  Issue Type: Bug
Affects Versions: 2.0.22
Reporter: Ling Hock Hin, Daniel


When attempting to download a certain pdf file, encountered this error.

 

10:46:38.495 [http-nio-8080-exec-7] DEBUG WEB - << ResponseUtil >> 
outputFileStream():[Start] outputFileStream
10:46:38.495 [http-nio-8080-exec-7] ERROR WEB - << DownloadAction >> IO 
Exception occurred
java.io.IOException: Error: End-of-File, expected line
 at org.apache.pdfbox.pdfparser.BaseParser.readLine(BaseParser.java:1103) 
~[pdfbox-2.0.22.jar:2.0.22]
 at org.apache.pdfbox.pdfparser.COSParser.parseHeader(COSParser.java:2589) 
~[pdfbox-2.0.22.jar:2.0.22]
 at org.apache.pdfbox.pdfparser.COSParser.parsePDFHeader(COSParser.java:2560) 
~[pdfbox-2.0.22.jar:2.0.22]
 at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:219) 
~[pdfbox-2.0.22.jar:2.0.22]
 at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1222) 
~[pdfbox-2.0.22.jar:2.0.22]
 at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1122) 
~[pdfbox-2.0.22.jar:2.0.22]
 at 
com.ufinity.framework.util.ResponseUtil.outputFileStream(ResponseUtil.java:81) 
~[tgis-admin.jar:?]
 at 
com.tgis.student.web.action.DownloadAction.closingLetter(DownloadAction.java:327)
 [tgis-admin.jar:?]
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_272]
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[?:1.8.0_272]
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_272]
 at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_272]
 at ognl.OgnlRuntime.invokeMethodInsideSandbox(OgnlRuntime.java:1226) 
[ognl-3.1.26.jar:?]
 at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:1211) [ognl-3.1.26.jar:?]
 at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1920) 
[ognl-3.1.26.jar:?]
 at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68) 
[ognl-3.1.26.jar:?]
 at 
com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:98)
 [struts2-core-2.5.22.jar:2.5.22]
 at 
com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:90)
 [struts2-core-2.5.22.jar:2.5.22]
 at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1996) [ognl-3.1.26.jar:?]
 at ognl.ASTMethod.getValueBody(ASTMethod.java:91) [ognl-3.1.26.jar:?]
 at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) 
[ognl-3.1.26.jar:?]
 at ognl.SimpleNode.getValue(SimpleNode.java:258) [ognl-3.1.26.jar:?]
 at ognl.Ognl.getValue(Ognl.java:537) [ognl-3.1.26.jar:?]
 at ognl.Ognl.getValue(Ognl.java:501) [ognl-3.1.26.jar:?]
 at com.opensymphony.xwork2.ognl.OgnlUtil$3.execute(OgnlUtil.java:492) 
[struts2-core-2.5.22.jar:2.5.22]
 at 
com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecuteMethod(OgnlUtil.java:544)
 [struts2-core-2.5.22.jar:2.5.22]
 at com.opensymphony.xwork2.ognl.OgnlUtil.callMethod(OgnlUtil.java:490) 
[struts2-core-2.5.22.jar:2.5.22]
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:438)
 [struts2-core-2.5.22.jar:2.5.22]
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:293)
 [struts2-core-2.5.22.jar:2.5.22]
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
 [struts2-core-2.5.22.jar:2.5.22]
 at 
com.tgis.interceptors.CachingHeadersInterceptor.intercept(CachingHeadersInterceptor.java:27)
 [tgis-admin.jar:?]
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 [struts2-core-2.5.22.jar:2.5.22]
 at 
com.ufinity.framework.web.interceptor.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:113)
 [tgis-admin.jar:?]
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 [struts2-core-2.5.22.jar:2.5.22]
 at 
com.ufinity.framework.web.interceptor.EmailOTPCheckInterceptor.intercept(EmailOTPCheckInterceptor.java:78)
 [tgis-admin.jar:?]
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 [struts2-core-2.5.22.jar:2.5.22]
 at 
com.ufinity.framework.web.interceptor.PasswordExpiryCheckInterceptor.intercept(PasswordExpiryCheckInterceptor.java:83)
 [tgis-admin.jar:?]
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 [struts2-core-2.5.22.jar:2.5.22]
 at 
com.ufinity.framework.web.interceptor.SessionMaintainerInterceptor.intercept(SessionMaintainerInterceptor.java:197)
 [tgis-admin.jar:?]
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 [struts2-

[jira] [Commented] (PDFBOX-5059) java.io.IOException: expected number, actual=COSFloat{18446744073521659909} at offset 4932600

2021-01-05 Thread Ling Hock Hin, Daniel (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17258771#comment-17258771
 ] 

Ling Hock Hin, Daniel commented on PDFBOX-5059:
---

2.0.22 works. You may close this issue. Thanks. 

> java.io.IOException: expected number, actual=COSFloat{18446744073521659909} 
> at offset 4932600
> -
>
> Key: PDFBOX-5059
> URL: https://issues.apache.org/jira/browse/PDFBOX-5059
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 2.0.3
> Environment: linux
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
>
> Encountered this error while trying to upload pdf. Seems to apply only for 
> certain pdfs. Can't share more due to confidentiality.
>  
> java.io.IOException: expected number, actual=COSFloat\{18446744073521659909} 
> at offset 4932600java.io.IOException: expected number, 
> actual=COSFloat\{18446744073521659909} at offset 4932600 at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryValue(BaseParser.java:162)
>  at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryNameValuePair(BaseParser.java:274)
>  at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionary(BaseParser.java:207)
>  at 
> org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:854) at 
> org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:757) at 
> org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:726)
>  at 
> org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:657)
>  at 
> org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:617) at 
> org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:215) at 
> org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:249) at 
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1093) at 
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1071) at 
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1053) at 
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1038)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5059) java.io.IOException: expected number, actual=COSFloat{18446744073521659909} at offset 4932600

2021-01-03 Thread Ling Hock Hin, Daniel (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17257883#comment-17257883
 ] 

Ling Hock Hin, Daniel commented on PDFBOX-5059:
---

May I have an brief description of what this error is/means so that I can 
explain to people I am working with?

> java.io.IOException: expected number, actual=COSFloat{18446744073521659909} 
> at offset 4932600
> -
>
> Key: PDFBOX-5059
> URL: https://issues.apache.org/jira/browse/PDFBOX-5059
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 2.0.3
> Environment: linux
>Reporter: Ling Hock Hin, Daniel
>Priority: Major
>
> Encountered this error while trying to upload pdf. Seems to apply only for 
> certain pdfs. Can't share more due to confidentiality.
>  
> java.io.IOException: expected number, actual=COSFloat\{18446744073521659909} 
> at offset 4932600java.io.IOException: expected number, 
> actual=COSFloat\{18446744073521659909} at offset 4932600 at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryValue(BaseParser.java:162)
>  at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryNameValuePair(BaseParser.java:274)
>  at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionary(BaseParser.java:207)
>  at 
> org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:854) at 
> org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:757) at 
> org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:726)
>  at 
> org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:657)
>  at 
> org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:617) at 
> org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:215) at 
> org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:249) at 
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1093) at 
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1071) at 
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1053) at 
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1038)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Created] (PDFBOX-5059) java.io.IOException: expected number, actual=COSFloat{18446744073521659909} at offset 4932600

2020-12-27 Thread Ling Hock Hin, Daniel (Jira)
Ling Hock Hin, Daniel created PDFBOX-5059:
-

 Summary: java.io.IOException: expected number, 
actual=COSFloat{18446744073521659909} at offset 4932600
 Key: PDFBOX-5059
 URL: https://issues.apache.org/jira/browse/PDFBOX-5059
 Project: PDFBox
  Issue Type: Bug
Affects Versions: 2.0.3
 Environment: linux
Reporter: Ling Hock Hin, Daniel


Encountered this error while trying to upload pdf. Seems to apply only for 
certain pdfs. Can't share more due to confidentiality.

 

java.io.IOException: expected number, actual=COSFloat\{18446744073521659909} at 
offset 4932600java.io.IOException: expected number, 
actual=COSFloat\{18446744073521659909} at offset 4932600 at 
org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryValue(BaseParser.java:162)
 at 
org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryNameValuePair(BaseParser.java:274)
 at 
org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionary(BaseParser.java:207) 
at org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:854) 
at org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:757) at 
org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:726)
 at 
org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:657)
 at org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:617) 
at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:215) at 
org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:249) at 
org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1093) at 
org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1071) at 
org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1053) at 
org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1038)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org