// ------------------------------------------------------------------------------------------------------------------------ public byte[] GetPageByHeightAsImage(int page, double height) { lock (cache) { byte[] bitmap = cache.Get(page, height); if (null == bitmap) { bitmap = SoraxPDFRendererDLLWrapper.GetPageByHeightAsImage(pdf_filename, pdf_owner_password, pdf_user_password, page, height); cache.Put(page, height, bitmap); } return(bitmap); } }
private static int CountPDFPages_Sorax(string filename) { try { Logging.Debug("+CountPDFPages_Sorax: {0}", filename); int page_count = SoraxPDFRendererDLLWrapper.GetPageCount(filename, null, null); Logging.Debug("-CountPDFPages_Sorax ({0} pages)", page_count); return(page_count); } catch (Exception ex) { Logging.Warn(ex, "Error while counting pages in CountPDFPages_Sorax"); return(0); } }
// ------------------------------------------------------------------------------------------------------------------------ public byte[] GetPageByHeightAsImage(int page, double height) { Utilities.LockPerfTimer l1_clk = Utilities.LockPerfChecker.Start(); lock (cache) { l1_clk.LockPerfTimerStop(); byte[] bitmap = cache.Get(page, height); if (null == bitmap) { bitmap = SoraxPDFRendererDLLWrapper.GetPageByHeightAsImage(pdf_filename, pdf_owner_password, pdf_user_password, page, height); cache.Put(page, height, bitmap); } return(bitmap); } }
public byte[] GetPageByDPIAsImage(int page, float dpi) { return(SoraxPDFRendererDLLWrapper.GetPageByDPIAsImage(pdf_filename, pdf_owner_password, pdf_user_password, page, dpi)); }