PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Jul 02, 2024 11:15 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Aug 04, 2015 11:22 pm 
Offline

Joined: Wed Nov 19, 2014 1:09 am
Posts: 6
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


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 06, 2015 7:09 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 951
Location: CCAA
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.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 06, 2015 8:22 pm 
Offline

Joined: Wed Nov 19, 2014 1:09 am
Posts: 6
Hi Thomas,

Thanks for the reply. Can I have code sample.

Thanks
Lax


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 10, 2015 6:00 pm 
Offline

Joined: Wed Nov 19, 2014 1:09 am
Posts: 6
Can anyone help me here plz.

Thanks
Lax


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 11, 2015 7:01 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 951
Location: CCAA
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).

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 05, 2015 4:40 pm 
Offline

Joined: Thu Nov 05, 2015 4:38 pm
Posts: 1
Paragraph checkbox = section.AddParagraph();
checkbox.AddFormattedText(true ? "\u00fe" : "\u00A8", new Font("Wingdings"));

I hope the above helps, I am using MigraDoc.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 67 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group