Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

OpenStream returns -3 error code 8 years 10 months ago #9019

  • gtoldosProton
  • gtoldosProton's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
Hello friends.
Today I came across a problem I don't know how to solve, I was hoping someone could give me some light.
This attached document is a regular pdf

File Attachment:

File Name: PDF_00050KB.pdf
File Size:74 KB
, edited externally with some annotations and highlights in other pdf application (with Foxit)
When we try to open it with OpenStream it returns a -3, given the documentation of your method (posted below) it seems it is damaged or it has invalid format so it won't open. We have been able to open it in other viewers, like Polaris and the PDFViewer in Android.
I was wondering if there is something I could do, or it may have something to do or any workaround to end up showing the pdf.
Any idea or sugestion will be muh apreciated.

Thanks in advance. Have a good day.

/**
* open document from stream.
* first time, SDK try password as user password, and then try password as owner password.
* @param stream PDFStream object.
* @param password password or null.
* @return error code:<br/>
* 0:succeeded, and continue<br/>
* -1:need input password<br/>
* -2:unknown encryption<br/>
* -3:damaged or invalid format<br/>
* -10:access denied or invalid file path<br/>
* others:unknown error
*/
public int OpenStream( PDFStream stream, String password )
Attachments:

Please Log in or Create an account to join the conversation.

OpenStream returns -3 error code 8 years 10 months ago #9027

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
can you reproduce this issue with the demo project? What version of the library are you using?
I have tested your pdf with the last version of the library and it works properly.

Please Log in or Create an account to join the conversation.

Last edit: by Davide.

OpenStream returns -3 error code 8 years 10 months ago #9030

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
if you are opening stream using http look at this important knowledge base .

Please Log in or Create an account to join the conversation.

Last edit: by Davide.
  • Page:
  • 1
Powered by Kunena Forum