0

I have used the following code to convert from html to pdf using EO

 private void CreatePDFFromHtml(string strFilePath, string strFileExt)
        {
            string strGetFileName = System.IO.Path.GetFileName(strFilePath);
            string strFileLocation = txtTarget.Text + "\\" + strGetFileName.Replace(strFileExt, ".pdf");
            if (System.IO.File.Exists(strFileLocation))
            {
                File.Delete(strFileLocation);
            }
            HtmlToPdf.ConvertHtml(strGetFileName, strFileLocation);

        }

However the output that i get is completely blank in the pdf file. I have installed it using nuget install-package EO.pdf

1
  • I have used .net framework 4. not sure why its not working , can anyone please point out the solution? Commented Sep 11, 2014 at 8:51

1 Answer 1

1

I finally figured out the problem. In the first parameter for HTMLToPDF.ConvertHtml(string html, pdfdocument) I had supplied the html file name, it was expecting the actual html in string format.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.