SaveAs method not working creating empty PDF file - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC: SaveAs method not working creating empty PDF file

SaveAs method not working creating empty PDF file 1 year 3 weeks ago #13142

  • alecrugar
  • alecrugar's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
I want to open a pdf file, add some annotations and save it to a new pdf file.
Everything goes fine until I save it:
isSaved = pdfLayoutView.PDFGetDoc().SaveAs("myPath/filename.pdf", true);
the method returns TRUE (so it is saved) but when I try to open the newly created pdf file its size is 0 KB, it's empty.

It used to work using the deprecated class PDFReader (provided in the example project)
Any ideas?
Thanks.

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

SaveAs method not working creating empty PDF file 1 year 3 weeks ago #13143

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 18
  • Thank you received: 65
Hi,
I have checked it with the last version of the library and it works properly.
Can you reproduce that issue with the last version? With all the pdfs? Can you please send us one of them?

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

SaveAs method not working creating empty PDF file 1 year 3 weeks ago #13144

  • alecrugar
  • alecrugar's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Hey,
which is the latest version? I'm using version 3.14.4
The weird thing is that I almost copied the PDFReader class from the example test, and the SaveAs method used to work.
Now I'm using the PDFLayoutView, with the same pdf files, and the SaveAs method does not work,
This is weird because this method is part of Document, which has nothing to do with PDFReader or PDFLayoutView.
:S

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

SaveAs method not working creating empty PDF file 1 year 3 weeks ago #13145

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
What Android version are you testing on?
On a physical device or an emulated one?
Where are you writing the file? Application space? external storage?
May you confirm that you're naming the file with new filename?

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

SaveAs method not working creating empty PDF file 1 year 3 weeks ago #13149

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 18
  • Thank you received: 65
Hi,
I have checked it with the stable version 3.14.4, with different pdfs and no problem found.
I used this code :
boolean isSaved = m_view.PDFGetDoc().SaveAs("sdcard/filename.pdf", true);
Log.w("---test---", "isSaved " + isSaved);

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

SaveAs method not working creating empty PDF file 1 year 3 weeks ago #13151

  • alecrugar
  • alecrugar's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Hey,
thanks for your support.
I've realised that it works for me on Android 7.0 and Android 8.0, but not on Android 6.0 or Android 6.0.1
Could you maybe check that it works for you on Android 6.x, please?
Thanks a lot..

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum