public void Dispose() { _pDDoc?.Close(); _avDoc?.Close(-1); _pDDoc = null; _pDDoc = null; }
private void CreateFile(int startPageNum, int lenPages, CAcroPDDoc fromDoc, string saveToDirectory, string so) { CAcroAVDoc newAVDoc = _pdfProvider.GetAcroAVDoc(); CAcroPDDoc newPDDoc = (CAcroPDDoc)newAVDoc.GetPDDoc(); try { newPDDoc.Create(); newPDDoc.InsertPages(-1, fromDoc, startPageNum - 1, lenPages, 0); OnFileCreated(saveToDirectory); } catch { } finally { newPDDoc?.Close(); newAVDoc?.Close(-1); } }