示例#1
0
            public void Dispose()
            {
                if (!_disposed)
                {
                    NativePdfiumMethods.FORM_DoPageAAction(Page, _form, NativePdfiumMethods.FPDFPAGE_AACTION.CLOSE);
                    NativePdfiumMethods.FORM_OnBeforeClosePage(Page, _form);
                    NativePdfiumMethods.FPDFText_ClosePage(TextPage);
                    NativePdfiumMethods.FPDF_ClosePage(Page);

                    _disposed = true;
                }
            }
示例#2
0
            public PageData(IntPtr document, IntPtr form, int pageNumber)
            {
                _form = form;

                Page     = NativePdfiumMethods.FPDF_LoadPage(document, pageNumber);
                TextPage = NativePdfiumMethods.FPDFText_LoadPage(Page);
                NativePdfiumMethods.FORM_OnAfterLoadPage(Page, form);
                NativePdfiumMethods.FORM_DoPageAAction(Page, form, NativePdfiumMethods.FPDFPAGE_AACTION.OPEN);

                Width  = NativePdfiumMethods.FPDF_GetPageWidth(Page);
                Height = NativePdfiumMethods.FPDF_GetPageHeight(Page);
            }