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

TOPIC:

SaveAs method always returns False. 7 years 6 months ago #11252

  • sbettal
  • sbettal's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 20
  • Thank you received: 0
I had given Read and write permissions for first app installs so it will not be the problem. And app supports android versions 11 1o current version.

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

SaveAs method always returns False. 7 years 6 months ago #11253

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 692
  • Thank you received: 59
Are permissions within the manifest or on demand?
Is the application running on Android prior to 6.x?
May you provide one of your PDF file?

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

Last edit: by support.

SaveAs method always returns False. 7 years 6 months ago #11263

  • sbettal
  • sbettal's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 20
  • Thank you received: 0
Permissions are in manifest, and handled for marshmallow version also.
App is targeted to Android version 4.4+

Here is the code :-
try {
FileManager.deleteFileWithPath(signatureImagePath);
} catch (Exception e) {
logger.error("Unable to delete signature image");
}
String docPath = getDocumentFilePath(annotatedfileId + DeliverItMacros.EXT_DOC_TYPE_PDF,
DeliverItMacros.RELATIVE_CAPTUREDDOCS_FOLDERPATH);
boolean pdfSaved = pdfReaderView.pdfSaveAs(docPath);

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

SaveAs method always returns False. 7 years 6 months ago #11264

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
first of all make sure that your new docPath exists..
If it doesn't exists create it and then save the pdf.

If you are trying to save it in your external card with devices that run Android 6.0+ you must implement something like that : developer.android.com/training/permissions/requesting.html

If the above tips don't work...can you reproduce the issue with the demo version of the library? If yes please send us your pdf so we can check it..

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum