Aspose.pdf.dll

I use Aspose.pdf.dll 11.0.0 (evalution) and this code.

Please tell me why adds a space and moves the text(see screen in attachment). Thank you!



private void button1_Click(object sender, EventArgs e)

{

// The path to the documents directory.

string dataDir = “c:\”;





//open document

Document pdfDocument = new Document(dataDir + “1.pdf”);



//create TextAbsorber object to find all instances of the input search phrase

TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber(“м3”);



//accept the absorber for all the pages

pdfDocument.Pages.Accept(textFragmentAbsorber);



//get the extracted text fragments

TextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;



//loop through the fragments

foreach (TextFragment textFragment in textFragmentCollection)

{

//update text and other properties

textFragment.Text = “м2”;





}



// Save resulting PDF document.

pdfDocument.Save(dataDir + “ReplaceTextAll_out.pdf”);





MessageBox.Show(“All GOOD!”, “END”);



}

Hi Voronikhin,


Thanks for using our API’s.

Can you please share the resource (1.pdf), so that we can test the scenario in our environment. We are sorry for your inconvenience.

See attachement

Hi Voronikhin,


Thanks for sharing sample PDF document. I have tested the scenario using Aspose.Pdf for .NET 11.0.0 and unable to notice any issue, please find attached sample output.

Please download and try latest version of Aspose.Pdf for .NET, it will resolve the issue. However the issue persists then please share some more details to replicate the issue at our end e.g. environment details and sample console project.

Please feel free to contact us for any further assistance.

Best Regards,

This not work (see attach)

Hi Voronikhin,

Thanks for sharing the source document. I have again tested the text replacement scenario and managed to observe the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-39993 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

We are sorry for the inconvenience caused.

Best Regards,

Thank you, I will wait for the problem to be solved

Hello!

Do you have an update on my problem?

Thank you!

Hi Voronikhin,


Thanks for your inquiry. I am afraid we have recently noticed the issue and it is pending for investigation in the queue with other issues, reported earlier. We will notify you as soon as we made some significant progress towards issue resolution.

We are sorry for the inconvenience.

Best Regards,