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

TOPIC:

Creation of new document returns error -10 10 years 1 month ago #8750

  • panton
  • panton's Avatar Topic Author
  • Visitor
  • Visitor
I have the Premium license. I'm trying to create a new PDF document on internal storage, but I always get error -10. See my code below:

final String path = getFilesDir() + "/result.pdf";
Document dest = new Document();
int result = dest.Create(path);

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

Creation of new document returns error -10 10 years 1 month ago #8755

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
We have checked your code and it's working with the demo project (activated with a premium license), check the screenshot:



The method returns -10 in 3 cases:
--path is null or invalid
--premium license is not actived.
--can't create/open file for path, if occoured.
The path is aparently valid, so make sure that the premium license is activated correctly, and that there is no write-premission problem.
Attachments:

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

Creation of new document returns error -10 10 years 1 month ago #8756

  • panton
  • panton's Avatar Topic Author
  • Visitor
  • Visitor
I'm doing the following to activate the Premium license:
Global.Init(this, 2, "Gaia Mobile", "This email address is being protected from spambots. You need JavaScript enabled to view it.", "");
Is all right?

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

Creation of new document returns error -10 10 years 1 month ago #8758

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
The method call is correct, but we have realized that the key was calculated based on a wrong package name...
Soon you will recieve the correct key calculated based on the correct package name.

When the license will be activated correctly, the watermark should disappear, and the method Global.Init should return true.

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

  • Page:
  • 1
Powered by Kunena Forum