I am evaluating DynamicPDF at this time for use in replacing a different component for a number of our systems. A primary issue we have encountered:
We would like to use a template PDF document with form fields, fill out the form fields, and output the document with 'flattened' fields. Some fields in the document may need to be left intact (aka, not flattened). This might be one step in constructing a merged document from a set of static and template documents.
The PdfFormField.CreateLabel method seems promising, particularly after following the example in the help in the 'Form Flattening' topic. However, per other threads in these forums, the CreateLabel method requires a font object and a size. The examples and other responses to threads in your forums always show constants used for the fonts and size, which is all well and good if I knew the font to use. How can I dynamically determine the font that is already associated with the field?
A PdfFormField does not expose a Font property, nor do any of its derivative classes. At this point, I have looked at the following classes for a mechanism to access the font for a field:
ceTe.DynamicPDF.Forms.FormField
ceTe.DynamicPDF.Forms.TextField
ceTe.DynamicPDF.Merger.Forms.PdfFormField
ceTe.DynamicPDF.Merger.Forms.PdfTextField
I even tried using the GetOriginalPageNumber method to access a specific page (Page/PdfPage) and somehow using PageElements to get to the font, however the PdfDocument that is used for PdfFormField (needed for CreateLabel) doesn't expose PageElements. And, using the example from the help for doing form flattening, the MergeDocument's PageElements doesn't include the form fields that originated from the input document (the PdfDocument).
The logical place for this would seem to be an overload for CreateLabel that takes neither the font nor the size, in which case DynamicPDF would use the font/size already associated with the field being replaced. Reactions?
Thank you in advance for your assistance.
Flattened Form Field Using CreateLabel - Dynamically Determined Font
Re: Flattened Form Field Using CreateLabel - Dynamically Determined Font
Support · Jun 21, 2006Hello,
Currently ability to determine the font associated with the form field is not possible using our product. We have added this feature to our wish list.
Thanks,
ceTe Software Support Team
Re: Flattened Form Field Using CreateLabel - Dynamically Determined Font
Forum member · Aug 24, 2007WISH LIST: In addtion to the overload the original poster mentioned for createlabel, I'd add an overload which took no parameters, taking the value, x and y coordinates, font, and font size from the original form field. It'd be nice to be able to flatten an entire document or page with a single method call rather than having to loop through all the fields individually too.
Re: Flattened Form Field Using CreateLabel - Dynamically Determined Font
Forum member · Jul 16, 2009What's the status on this? Is this information available in later versions?
Re: Flattened Form Field Using CreateLabel - Dynamically Determined Font
Support · Jul 17, 2009Hello,
Currently these features are still not available. We may add it in a future release but we do not have any immediate plans on these features.
Thanks,
ceTe Software support Team.