I am creating a free text annotation object and setting its content (string) parameter value. However, the value I have to use has line breaks inside; but whatever I try I cannot make the freetextannotation to display those correctly. I have tried "\r", "\n", "\r\n" and even " " without any luck. Every time I try, the text is always on single line with those line break characters.
Please advise on how to set multiline text to a freetextannotation object.
I have tested the scenario using Aspose.Pdf for .NET 7.7.0 where I have tried using following code snippet and as per my observations, the line break is properly appearing in TextAnnotation contents. For your reference, I have also attached the PDF file which is being generated over my end.
I
have again tested the scenario and I am able to reproduce the same problem that Line break is not working when using FreeTextAnnotation object. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-34958. We
will investigate this issue in details and will keep you updated on the status
of a correction.
As we recently have been
able to notice the problem reported earlier, so the development team requires
sometime to investigate and figure out the actual reasons of this problem.
Furthermore please note that the issues reported under Enterprise and Priority
Support have high precedence in terms of resolution as compare to the issues
reported under normal support model and this issue will be resolved as per its schedule.
As soon as we have made
some significant progress in terms of resolution, we would be more than happy
to update you with the status of correction. Please be patient and spare us
little time. We are sorry for this delay and inconvenience.
Thanks for your inquiry. Your reported issue has been resolved and fix will be included in upcoming Aspose.Pdf for .NET 7.8.0 release, that is due in coming week. However we will notify you via this forum thread as soon as it gets available for download.
Thanks for the fix; however it is in a worse state now. When multiple lines exist, the text is totall broken.
Please check the attached screenshots; where I have two annotations containing extactly same characters (capture_env.jpg file shows the correct annotations from the non-pdf format) but one of them has line breaks. The problem in PDF can be seen in second attachment (capture_pdf.jpg) which is taken from adobe reader.
I do not want to rollback to older version due to some other fix (PDFNEWNET-34994) in this dll.
Sorry for the inconvenience faced. I’m afraid, multiple line text in FreeTextAnnotation is working fine at my side. Could you please share your sample code here? So we will test it at our end and provide you more information accordingly.
Sorry for the inconvenience faced. I've managed to
reproduce the multiline international character text issue at my end and logged it as PDFNEWNET-35084 in our bug tracking system for further
investigation and resolution. You will be notified via this thread as soon as
it is resolved.