While we appreciate comments from our users, please follow our posting guidelines. Have you tried the Cyotek Forums for support from Cyotek and the community?

Styling with Markdown is supported

Original Comment



# Reply

Hi fi getting following error

"Page number is out of bounds Parameter name: pageNumber"

This is my c# code

     protected void Page_Load(object sender, EventArgs e)
        string PDFFilePath = Server.MapPath("Sample.pdf");

    public void LoadImage(string PDFFilePath)
        Pdf2Image objPDF = new Pdf2Image();
        Pdf2ImageSettings objSetting = new Pdf2ImageSettings();
        objSetting.AntiAliasMode = AntiAliasMode.High;
        objSetting.Dpi = 300;
        objSetting.GridFitMode = GridFitMode.Topological;
        objSetting.ImageFormat = ImageFormat.Jpeg;
        objSetting.TrimMode = PdfTrimMode.CropBox;

        objPDF.PdfFileName = PDFFilePath;
        objPDF.Settings = objSetting;
        objPDF.ConvertPdfPageToImage("testimage.Jpeg", 1);

please help me Thanks in advance