RadaeePDF.com :: Topic: SaveAs method not working creating empty PDF file (1/2)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

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 3 weeks 1 day ago #13142

  • alecrugar
  • alecrugar's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 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.
The administrator has disabled public write access.

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

  • Davide
  • Davide's Avatar
  • OFFLINE
  • Moderator
  • Posts: 717
  • Thank you received: 56
  • Karma: 16
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?
The administrator has disabled public write access.

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

  • alecrugar
  • alecrugar's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 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
The administrator has disabled public write access.

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

  • support
  • support's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 503
  • Thank you received: 42
  • Karma: 6
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?
The administrator has disabled public write access.

SaveAs method not working creating empty PDF file 3 weeks 21 hours ago #13149

  • Davide
  • Davide's Avatar
  • OFFLINE
  • Moderator
  • Posts: 717
  • Thank you received: 56
  • Karma: 16
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);
The administrator has disabled public write access.

SaveAs method not working creating empty PDF file 3 weeks 21 hours ago #13151

  • alecrugar
  • alecrugar's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 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..
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Powered by Kunena Forum