Text structure is altered in Document when using Aspose.PDF

Dear Support,

I have a document created via “Adobe Photoshop for Windows - Image conversion Plug-in” attached CakeAgreement.pdf

If I open the document and search for a text pattern (like shown below), I see that the saved document aligns all text to left side in the document (attached output.pdf)

//open document
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(filename);
//create TextAbsorber object to find all the phrases matching the regular expression
Aspose.Pdf.Text.TextFragmentAbsorber textFragmentAbsorber = new Aspose.Pdf.Text.TextFragmentAbsorber(MY_TEXT_PATTERN);

//set text search option to specify regular expression usage
Aspose.Pdf.Text.TextOptions.TextSearchOptions textSearchOptions =
new Aspose.Pdf.Text.TextOptions.TextSearchOptions(true);
textFragmentAbsorber.TextSearchOptions = textSearchOptions;
//accept the absorber for all the pages
pdfDocument.Pages.Accept(textFragmentAbsorber);
//get the extracted text fragments
Aspose.Pdf.Text.TextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;

pdfDocument.Save(“output.pdf”);

Can you please let me know:
1. Is this a bug on Aspose.pdf library
2. What is a work around for this? Is there another way to deal with this document to preserve the text structure correctly as original document?

Thank you,
Sireesha

Hi Sireesha,


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

I
have tested the scenario and I am able to notice the same problem. For the sake
of correction, I have logged this problem as PDFNEWNET-39638 in
our issue tracking system. We will further look into the details of this
problem and will keep you updated on the status of correction. Please be
patient and spare us little time. We are sorry for this inconvenience.