public void Open(string aFileName) { if (m_bDisposed) { throw new ApplicationException("PDFDoc.OpenFromIStream"); } if (PXCV_Error.IS_DS_FAILED(PXCV_Lib36.PXCV_ReadDocumentW(m_Doc, aFileName, 0))) { throw new ApplicationException("PDFDoc.Open.PXCV_ReadDocumentW"); } }
public void ReleaseCachedData(int flags) { if (m_bDisposed) { throw new ApplicationException("PDFDoc.ReleaseCachedData"); } if (PXCV_Error.IS_DS_FAILED(PXCV_Lib36.PXCV_ReleaseCachedData(m_Doc, flags))) { throw new ApplicationException("PDFDoc.ReleaseCachedData.PXCV_ReleaseCachedData"); } }
public void Init(string aKey, string aDevCode) { if (!m_bDisposed) { throw new ApplicationException("PDFLib.Init"); } if (PXCV_Error.IS_DS_FAILED(PXCV_Lib36.PXCV_Init(out m_Doc, aKey, aDevCode))) { throw new ApplicationException("PDFDoc.Init.PXCV_Init"); } m_bDisposed = false; }
public void Init(string aKey, string aDevCode) { if (!b) { throw new ApplicationException("PDFLib.Init"); } if (PXCV_Error.IS_DS_FAILED(PXCV_Lib36.PXCV_Init(out this.m_a, aKey, aDevCode))) { throw new ApplicationException("PDFDoc.Init.PXCV_Init"); } b = false; }
public int GetPagesCount() { int count = 0; if (b) { throw new ApplicationException("PDFDoc.GetPagesCount"); } if (PXCV_Error.IS_DS_FAILED(PXCV_Lib36.PXCV_GetPagesCount(this.m_a, out count))) { throw new ApplicationException("PDFDoc.OpenFromPXCV_GetPageDimensions"); } return(count); }
public int GetPagesCount() { int cnt = 0; if (m_bDisposed) { throw new ApplicationException("PDFDoc.GetPagesCount"); } if (PXCV_Error.IS_DS_FAILED(PXCV_Lib36.PXCV_GetPagesCount(m_Doc, out cnt))) { throw new ApplicationException("PDFDoc.OpenFromPXCV_GetPageDimensions"); } return(cnt); }
public void DrawPageToDIBSection(IntPtr hBaseDC, int pn, Color aBkgColor, PXCV_Lib36.PXV_CommonRenderParameters aCommonRenderParams, out Bitmap aBitmap) { aBitmap = null; if (m_bDisposed) { throw new ApplicationException("PDFDoc.DrawPageToDIBSection"); } IntPtr hBitmap = IntPtr.Zero; int backcolor = aBkgColor.ToArgb(); if (PXCV_Error.IS_DS_FAILED(PXCV_Lib36.PXCV_DrawPageToDIBSection(m_Doc, pn, ref aCommonRenderParams, hBaseDC, backcolor, ref hBitmap, IntPtr.Zero, 0))) { throw new ApplicationException("PDFDoc.DrawPageToDIBSection.PXCV_DrawPageToDIBSection"); } aBitmap = Image.FromHbitmap(hBitmap); DeleteObject(hBitmap); }