- Posts: 19
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
SaveAs method not working creating empty PDF file
IP: 192.168.0.71
8 years 10 months ago #13142
by alecrugar
SaveAs method not working creating empty PDF file was created by alecrugar
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:
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.
Everything goes fine until I save it:
Code:
isSaved = pdfLayoutView.PDFGetDoc().SaveAs("myPath/filename.pdf", true);
It used to work using the deprecated class PDFReader (provided in the example project)
Any ideas?
Thanks.
IP: 192.168.0.71
8 years 10 months ago #13143
by Davide
Replied by Davide on topic SaveAs method not working creating empty PDF file
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?
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?
IP: 192.168.0.71
8 years 10 months ago #13144
by alecrugar
Replied by alecrugar on topic SaveAs method not working creating empty PDF file
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
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
IP: 192.168.0.71
8 years 10 months ago #13145
by support
Replied by support on topic SaveAs method not working creating empty PDF file
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?
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?
IP: 192.168.0.71
8 years 10 months ago #13149
by Davide
Replied by Davide on topic SaveAs method not working creating empty PDF file
Hi,
I have checked it with the stable version 3.14.4, with different pdfs and no problem found.
I used this code :
I have checked it with the stable version 3.14.4, with different pdfs and no problem found.
I used this code :
Code:
boolean isSaved = m_view.PDFGetDoc().SaveAs("sdcard/filename.pdf", true);
Log.w("---test---", "isSaved " + isSaved);
IP: 192.168.0.71
8 years 10 months ago #13151
by alecrugar
Replied by alecrugar on topic SaveAs method not working creating empty PDF file
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..
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..
Time to create page: 0.414 seconds