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

Ink annotation using ReaderController

More
IP: 192.168.0.71 11 years 9 months ago #8145 by ChrisDon
Hello,

I've added version3.2 as a library project to my project and using com.example.pdfhttpdemo.MainActivity example I'm able to display a PDF.

Do you have documentation on how I can draw and save ink annotations to the pdf?

I can't find any examples / tutorials.
More
IP: 192.168.0.71 11 years 9 months ago #8150 by radaee
open from http link, shall in readonly mode.
content from server can't be modified.
More
IP: 192.168.0.71 11 years 9 months ago #8156 by ChrisDon
I should have made this clear in the OP, I'm reading the PDFs from file.

See code below
Code:
/** Title of the PDF being displayed - for tracking */ private String mTitle; private ReaderController m_vPDF = null; private Document m_doc = new Document(); private PDFHttpStream m_stream = new PDFHttpStream(); /** Key for retrieving the pdf URL from the intent */ public static final String KEY_PDF_URL = "KEY_PDF_URL"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Global.Init(this); final String url = getIntent().getExtras().getString(KEY_PDF_URL); if (url != null) { String path = ResourceDownloadManager.getFilePathForUrl(url); if (DebugHandler.LOG_ENABLED) { DebugHandler.log(this, "PATH:" + Config.getSDCardPath() + " " + path); } m_vPDF = new ReaderController(this); m_doc.Close(); //m_stream.open(url); //int ret = m_doc.OpenStream(m_stream, null); int ret = m_doc.Open(path, null); switch( ret ) { case -1://need input password finish(); break; case -2://unknown encryption finish(); break; case -3://damaged or invalid format finish(); break; case -10://access denied or invalid file path finish(); break; case 0://succeeded, and continue break; default://unknown error finish(); break; } if( ret == 0 ) { m_vPDF.open(m_doc); setContentView( m_vPDF ); } } else { finish(); } mTitle = getIntent().getStringExtra(DETAIL_TO_SHOW); getSupportActionBar().hide(); }

When I open the PDF, I see no buttons to select ink colour or save any changes. How do I enable these?
More
IP: 192.168.0.158 11 years 9 months ago #8157 by nermeen
You can find all the examples you need in the main demo project (not http demo project), check PDFReaderAct and PDFReader
Time to create page: 0.400 seconds
Powered by Kunena Forum