public string GetDocumentAnnotation() { IntPtr miniexp = IntPtr.Zero; try { miniexp = NativeMethods.GetDjvuDocumentAnnotation(Document, 1); if (miniexp != IntPtr.Zero) { // TODO - improve data extraction from miniexp - only part is recovered now string result = DjvuPageInfo.ExtractTextFromMiniexp(Document, miniexp); if (result == null) { return(string.Empty); } else { return(result); } } return(null); } finally { if (miniexp != IntPtr.Zero) { NativeMethods.ReleaseDjvuMiniexp(Document, miniexp); } } }
public RenderEngine(DjvuPageInfo page) { if (page == null) { throw new ArgumentNullException(nameof(page)); } if (page.Page == IntPtr.Zero) { throw new ArgumentException("Invalid native Page pointer.", nameof(page)); } _Page = page; _PageNative = page.Page; }