PdfFreeTextAnnotation font question

Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.

Moderator: Alex

Post Reply
IntegraMike
Posts: 56
Joined: Mon Dec 02, 2019 11:19 pm

PdfFreeTextAnnotation font question

Post by IntegraMike »

Hello, I'm currently working on implementing font manipulation for PdfFreeTextAnnotations but am having issues setting strikethrough and underlining on the font. I see that there are enums for PdfFontCharacteristics and PdfFontWeight but I can't see where they are used as properties. These also only appear to have bold and italics type properties but those appear to be split out as separate fonts using the Vintasoft.Imaging.Pdf.PdfFontManager.GetSystemTrueTypeFontNames method or looking at the PdfStandardFontType enum. I do however see these options on other kinds of fonts in a non-PDF context.

Is there a way to set these properties that I'm missing or is there a way to use a different font type within the PdfFreeTextAnnotation?

Thanks!
Mike
Alex
Site Admin
Posts: 2315
Joined: Thu Jul 10, 2008 2:21 pm

Re: PdfFreeTextAnnotation font question

Post by Alex »

Hello Mike,

Do you want to use text with different fonts in PdfFreeTextAnnotation? If yes, this is not possible in current version.

Best regards, Alexander
IntegraMike
Posts: 56
Joined: Mon Dec 02, 2019 11:19 pm

Re: PdfFreeTextAnnotation font question

Post by IntegraMike »

Thanks for the information Alex, are there any plans to implement the ability to do this (or possibly something like the ability to display HTML text)? I've seen it done, but I don't know the way the data is stored in the PDF or how complex it would be.

Also is there any plan to update the PdfFont to work similar to the AnnotationFont (https://www.vintasoft.com/docs/vsimagin ... mbers.html) and be able to set the bold/strikethrough/italics/underline/etc as bools rather than selecting new fonts with those properties?

Thanks for all the help!
Alex
Site Admin
Posts: 2315
Joined: Thu Jul 10, 2008 2:21 pm

Re: PdfFreeTextAnnotation font question

Post by Alex »

Hello Mike,
I've seen it done, but I don't know the way the data is stored in the PDF or how complex it would be.
Could you send us a PDF document you have seen? If yes, please send PDF document to support@vintasoft.com or submit a ticket with PDF document in our support center at https://www.vintasoft.com/support/index ... ets/Submit

Also is there any plan to update the PdfFont to work similar to the AnnotationFont (https://www.vintasoft.com/docs/vsimagin ... mbers.html) and be able to set the bold/strikethrough/italics/underline/etc as bools rather than selecting new fonts with those properties?
The PdfFont class represents PDF font object from PDF specification. If you want to create bold and/or italic text, you need to use bold and/or italic font, for example "Times-Italic" or "Times-ItalicBold". If you want to strikeout and/or underline text, you need to do this using PDF annotation or PDF graphics.

Best regards, Alexander
IntegraMike
Posts: 56
Joined: Mon Dec 02, 2019 11:19 pm

Re: PdfFreeTextAnnotation font question

Post by IntegraMike »

Thank you, that makes sense. I will see if I can provide you with a document with the behavior I have seen and we can go from there.

Thanks again!
Mike
Post Reply