I am having some good luck using your products to
perform the following actions in C#:
1. Convert Word documents to
PDF 2. Copy form fields from different PDF onto the new PDF, saved
as a different file.
The problem I’ve run into is that when I
open the new PDF with the overlayed form fields and type characters in,
all of the characters bunch up in the first space on top of each other after exiting the fields.
Here is the code I’m using for the conversion:
var asposeFile = new Aspose.Words.Document(path,
Aspose.Words.LoadFormat.Docx, string.Empty);
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. As I can see part of proccesing which is related to Aspose.Words works fine. So, I will move this request to Aspose.Pdf.Kit forum. My colleagues will answer you shortly.
Update: I have not been able to rectify the issue of letters jumbling on top of themselves in the form fields, and I noticed that the gentlemen posting in the topic referenced in my initial post also observed the same behavior.
Also, CopyOuterFields is incapable of copying radio buttons, and the documentation indicates this as so. Is there any way to add a radio button via a workaround? I tried the following with no results:
if (pdfForm.GetFieldType(fieldName) != Aspose.Pdf.Kit.FieldType.Radio) { formEditor.CopyOuterField(pdfBase, fieldName); } else { //get field type Aspose.Pdf.Kit.FieldType myType = pdfForm.GetFieldType(fieldName); //get field value String myValue = pdfForm.GetField(fieldName); //get field appearance Aspose.Pdf.Kit.FormFieldFacade myFacade = pdfForm.GetFieldFacade(fieldName); formEditor.AddField(Aspose.Pdf.Kit.FieldType.Radio, fieldName, myFacade.PageNumber, myFacade.Box.Left, myFacade.Box.Bottom, myFacade.Box.Left + myFacade.Box.Width, myFacade.Box.Bottom + myFacade.Box.Height); }
When a radio button is found, the ‘else’ block is executed. The AddField method then throws the error “An error has occurred: Need at least one option, please call FormEditor.setOptions(String[]).: v4.9.0.0”. I do not see this member within FormEditor, so I don’t know what the error means or how to resolve it.
I have reproduced the issue of character overlapping and logged it as PDFKITNET-21409 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once it is resolved.
As far as copying the radio fields are concerned, I have logged a new feature request as PDFKITNET-21410 in our issue tracking system. We’ll try to provide the support for it in future and notify you via this thread.