We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Line breaks being ignored in InjectXML from a cdata field

Sorry this is kind of long - but here goes:


For example the following xml (also included in the attachment)

<?xml version="1.0" encoding="utf-8"?>
<sample>
  <simpleText>won't wrk <>             fsdfsdf !@#$%^&*() </simpleText>
  <cdatatext>
    <![CDATA[A bunch of test stuf ---      testing many spaces
testing line feeds 					Testing tabs... !@#$%^&*()_+{}[]   
another line ]]>
  </cdatatext>
</sample>

XML files that are imported via Acrobat - correctly add the line breaks
XML files that are imported via Aspose Form.ImportXML - ignore the the line breaks:

I am attaching 4 files:
the sample XML file
The source: Untitled.PDF
the PDF file as generated by Acrobat and the PDF file as generated by aspose

Console app used to generate the pdf via aspose:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form(“untitled1.pdf”, “importedViaAspose.pdf”);

        <span style="color:green;">//open xml file.</span>
        System.IO.<span style="color:#2b91af;">FileStream</span> xmlInputStream = <span style="color:blue;">new</span> <span style="color:#2b91af;">FileStream</span>(<span style="color:#a31515;">"sample.xml"</span>, <span style="color:#2b91af;">FileMode</span>.Open);

        <span style="color:green;">//import data</span>
        form.ImportXml(xmlInputStream);

        <span style="color:green;">//close file stream</span>
        xmlInputStream.Close();

        <span style="color:green;">//save updated document</span>
        form.Save();
    }
}

}







Hi Abraham,


Thanks
for using our API’s.<o:p></o:p>

I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNEWNET-38190. We will investigate this issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

Is there any update on this issue? I have noticed the same behavior.

Hi Jerrolyn,


Thanks for your inquiry. I am afraid the reported issue is still not resolved, as Product team is busy in resolving other issues in queue, reported earlier. However we have requested our team to share an ETA at their earliest. We will update here as soon as we get a feedback.

Moreover, please note mostly issues vary from case to case. We will appreciate it if you please share your sample documents here so we will test the scenario and will update you accordingly.

We are sorry for the inconvenience caused.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-38190) have been fixed in Aspose.Pdf for .NET 11.1.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.