Setting default style (DS) on freetext and other PDF annotations.

Q: I need to add freetext annotations (like the typewriter in acrobat) to a pdf.

Basically this works fine, using the highlevel and the low level api of pdfnet 5.

Currently I use the DS field to define the appearance of the text.

The result in acrobat shows, that I achieved what I want to. (see IPad_Demo_Contract_annoted.DS_acrobatX.png)

Unfortunately the PdfDraw does not consider this DS field - and therefore the resulting picture looks different. (see IPad_Demo_Contract_annoted.DS_pdfnet5.png)

(I marked the difference with a red rectangle on both pictures).

I tried the RC field as well, with the same result – the PdfDraw seems not to support this as well.

I figured out already, that if I use the AP dictionary to define the appearance, the PdfDraw draws the page correct.

I just could not figure out how to use to do this with pdfnet. I suppose FreeText.SetAppearance is the method to use.

pdftron.PDF.Annots.FreeText ft = pdftron.PDF.Annots.FreeText.Create(doc, typeWriterConfig.Position);

ft.SetContents(typeWriterConfig.Text);

ft.SetAppearance()

Please tell me the code how to generate these two freetext annotations (the orange and the dark red) as appearance stream – or alternatively when you expect a version of pdfnet to be available that supports the DS / RC fields as well.

A: PDFNet does not support DS, however it does support DA (default appearance) which serves essentially the same purpose.

For a concrete example, please see https://groups.google.com/d/topic/pdfnet-sdk/bNO73SNojEM