2

I am using HtmlRenderer.PdfSharp version 1.5.0.6 to create a PDF from a HTML string. I am using very basic code which I found from other Stack Overflow posts to do this (the other post didn't have input in the example). The only issue is that no inputs are being displayed on the PDF. Here's the small snippet of code I'm using to produce the document:

 PdfDocument pdf = PdfGenerator.GeneratePdf("<p><h1>Hello World</h1>This is html rendered text</p><input type='radio'> test <input type='text'>", PageSize.A4);
 pdf.Save("C:/Users/myuser/myfolder/document.pdf");

I can't seem to find a solution although on the project discussion board (https://archive.codeplex.com/?p=htmlrenderer) I found someone had said that they couldn't render checkboxes but they had no responses.

Could someone please let me know if I'm missing something or is it impossible to render input's using this library? Thank you in advance.

J. Campbell
  • 354
  • 1
  • 2
  • 15

1 Answers1

2

Unfortunately Html Renderer doesn't display any inputs (radio, checkbox textbox).

A solution could be to use div's styled to look like radio button inputs. You could also use images if you prefer this. If you use images your src has to be the exact path of the image.

Gordon Quinn
  • 122
  • 6