Latest Aspose 18.6 giving error


#1

Hi Team,

we have updated aspose PDF 18.5 to 18.6 and we are getting beloe error.
Can you please suggest alternative method for the same.

in below code Operator.ShowText() is not working.

                var os = new OperatorSelector(new Operator.ShowText());
                page.Contents.Accept(os);
                if (os.Selected.Count != 0)
                { countTextLayerPages++; }

#2

@ITCUser,

Please use the following line of code.

CODE:

var os = new Aspose.Pdf.OperatorSelector(new Aspose.Pdf.Operators.ShowText());

In fact all descendants of Aspose.Pdf.Operator have been moved into namespace Aspose.Pdf.Operators. Please visit the release notes page for more details. In case you face any issue, feel free to contact us.


#3

Thank you for quick response.

still we are getting an error as PDF doesn’t exist in the name space, where we have added all the aspose namespaces.

var os = new Aspose.Pdf.OperatorSelector(new Aspose.Pdf.Operators.ShowText());


#4

@ITCUser,

Please add Aspose.PDF library reference into your project and try again. In case the issue persists, forward us a sample project (ZIP it and attach it with reply) demonstrating the issue. We will look into it and update about our findings.

aspose_pdf_18_6_add_ref.png (6.7 KB)