PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Jun 22, 2024 3:44 pm

All times are UTC

Forum rules

Please read this before posting on this forum: Forum Rules

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Setting Check Box Value
PostPosted: Wed Aug 18, 2021 1:31 pm 

Joined: Wed Aug 18, 2021 1:07 pm
Posts: 1
I believe that there is an issue with setting the checkbox value vs setting the checkbox checked property.

I was setting the value of a checkbox like this:
pChk.Value = New PdfSharp.Pdf.PdfName(pChk.CheckedName)

This action appeared to work correctly and also changed the checked property of the checkbox correctly to true or false as expected.
The resulting saved pdf file displays correctly in Adobe or Acrobat reader.
However, there is something not correct in the pdf file, because Adobe changes something and wants to save it after viewing it.

We then noticed that the checkbox does not display as checked when the saved pdf is viewed in Chrome and some other viewers.
The saved pdf displays property in all viewers if the checkbox is set by using the checked property instead like this:
pChk.Checked = True

It seems that there is some extra internal value that is set when using the checked property verses the value property.
I would expect both actions to produce exactly the same result.

Thank you. I appreciate the PDFSharp library.

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 42 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