I am trying to create pdf using Aspose.Pdf.Generator.Text with IsHtmlTagSupported enabled.
SJeong:
1. Assigning name to the html form fieldeg: Text text1 = new Text("");When I examined the generated textfield in Adobe Acrobat, the name was autogenerated guid.Hi Sung,Thanks for contacting support.I have tested this scenario and have observed that no name is being assigned to form field when converting HTML to PDF format. For the sake of correction, I have logged it in
our issue tracking system as PDFNEWNET-36954.
We will investigate this issue in details and will keep you updated on the
status of a correction.SJeong:
2. Although this worked in my WCF webservice, in Window Forms Application this produced a blank PDF.eg: Text text2 = new Text("");Please note that a form field should have name else it won’t be added to PDF document.SJeong:
3. Combinations of the two issues above, I got System.ApplicationException: Non-unique field name when I tried to create two radio buttons with the same name.eg: Text text3 = new Text("");Please note that form fields should have unique names and they should not have identical names. Furthermore, I am unable to notice any exception.
SJeong:
2. I am still experiencing the same issue even after putting in name.Text text2 = new Text("<input type='radio' name='helloworld2'></input>");
Hi Sung,
Thanks for sharing the details.
I have tested the scenario and I am able to reproduce the same problem that when trying to render HTML contents containing RadioButton, the resultant file is not being generated. In fact the resultant file being generated is 0KB. For the sake of correction, I have logged it in our issue tracking system as PDFNEWNET-36965.
SJeong:
3. How would I go about grouping radio buttons without assigning the same name? HTML allows different form fields to share the same name for grouping purposes.
As shared above, if HTML string contains RadioButton, the resultant PDF being generated is 0KB and so is the case in this scenario. I have noticed that resultant PDF of 0KB is being generated when using html string with two radio button objects with similar name. I have associated this information with earlier reported PDFNEWNET-36965 and development team will definitely consider this scenario during the resolution of this problem.
SJeong:
4. I am also trying to put textarea inside a table cell (included in the 2nd attachment). I am still using IsHtmlTagSupported. I’m getting a blank pdf for simple case and stack overflow when I put style on the table.
The problem might be occurring because table tag is not properly defined. For your reference, I have also attached the resultant PDF generated over my end. The problem might be occurring because table tag is not properly defined. However when using following string, the resultant PDF is properly being generated.
String html = String.Format( "<table border=\"1\" style=\"width:300px\"><tr><td><span>{0}</span></td><td><textarea></textarea></td></tr></table>", text);
SJeong:
4. Found a work around using textbox with large heightHi Sung,It is good to know you have managed to get your desired results.SJeong:
Has there been any progress on the fix, ETA? I’d like it resolved as soon as possible. This fix is needed for me to meet the costumer’s requirements.
The issues you have found earlier (filed as PDFNEWNET-36965) have been fixed in Aspose.Pdf for .NET 9.7.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
SJeong:
1. Assigning name to the html form fieldeg: Text text1 = new Text("");
SJeong:
2. Although this worked in my WCF webservice, in Window Forms Application this produced a blank PDF.eg: Text text2 = new Text("");
SJeong:
3. Combinations of the two issues above, I got System.ApplicationException: Non-unique field name when I tried to create two radio buttons with the same name.eg: Text text3 = new Text("");
Hi Sung,
Thanks for your patience. In reference to the fix stated above, please use the new DOM approach to add HTML string in PDF document. It will help you to accomplish the task.
string outFile = "36965.pdf";
Document doc = new Document();
Page page = doc.Pages.Add();
HtmlFragment text2 = new HtmlFragment("<input type='radio' name='helloworld2'></input>");
page.Paragraphs.Add(text2);
doc.Save(outFile);
Please feel free to contact us for any further assistance.
Best Regards,
The issues you have found earlier (filed as PDFNEWNET-36954) have been fixed in Aspose.Pdf for .NET 11.3.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.