PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Apr 16, 2024 11:26 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Comb fields in forms
PostPosted: Fri Sep 02, 2016 5:30 pm 
Offline

Joined: Fri Sep 02, 2016 1:46 pm
Posts: 2
I have a pdf form with text fields with the comb flag set.
When filling out such a text field with PDFsharp, the characters are not spaced evenly.
I am aware that PDFsharp currently supports up until PDF 1.4 and the comb flag was first introduced in PDF 1.5, see page 691 in the specification.

So until PDFsharp hopefully gets native support for this, does anyone have a workaround to get the characters evenly spaced?


Top
 Profile  
Reply with quote  
 Post subject: Re: Comb fields in forms
PostPosted: Mon Sep 05, 2016 5:44 pm 
Offline

Joined: Tue Sep 30, 2014 12:29 pm
Posts: 36
Have a look at the patch provided in this thread:
viewtopic.php?f=2&t=3369

It also contains code for rendering Text-Fields with the Comb-Flag set.

HTH
Thomas


Top
 Profile  
Reply with quote  
 Post subject: Re: Comb fields in forms
PostPosted: Wed Sep 07, 2016 7:52 am 
Offline

Joined: Fri Sep 02, 2016 1:46 pm
Posts: 2
That works brilliantly!
Thank you very much Thomas.

As a side note, your patch introduced an unnecessary check, which I removed in my fork.
https://github.com/jnyrup/PDFsharp/commit/98e70e9e90818294badece6c1da0d8edf49aa29a


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 64 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