PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

How to show readonly checkbox on pdf
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3160
Page 1 of 1

Author:  Laxmikanth [ Tue Aug 04, 2015 11:22 pm ]
Post subject:  How to show readonly checkbox on pdf

Hi All,

I have web form with text and checkbox. I have an option to create the pdf for this form. I am not able to display checkbox on pdf. Some checkboxes are checked and some are unchecked. I don't want it to be interactive. Just static checkboxes will work to.

Can anyone help me here plz.



Thanks
Lax

Author:  TH-Soft [ Thu Aug 06, 2015 7:09 pm ]
Post subject:  Re: How to show readonly checkbox on pdf

Hi!

If you just need the look then you can use characters from the Wingdings font (e.g. 0x6f empty square and 0xfe checked square) or other symbol fonts.

Author:  Laxmikanth [ Thu Aug 06, 2015 8:22 pm ]
Post subject:  Re: How to show readonly checkbox on pdf

Hi Thomas,

Thanks for the reply. Can I have code sample.

Thanks
Lax

Author:  Laxmikanth [ Mon Aug 10, 2015 6:00 pm ]
Post subject:  Re: How to show readonly checkbox on pdf

Can anyone help me here plz.

Thanks
Lax

Author:  TH-Soft [ Tue Aug 11, 2015 7:01 am ]
Post subject:  Re: How to show readonly checkbox on pdf

Do you know how to draw "O" and "X" to PDF? If not, see Hello World sample.

Now change the font to Wingdings and draw "\u006f" and "\u00fe" instead.

When asking for sample code, please specify which library you are using (PDFsharp or MigraDoc).

Author:  jozcar [ Thu Nov 05, 2015 4:40 pm ]
Post subject:  Re: How to show readonly checkbox on pdf

Paragraph checkbox = section.AddParagraph();
checkbox.AddFormattedText(true ? "\u00fe" : "\u00A8", new Font("Wingdings"));

I hope the above helps, I am using MigraDoc.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/