We are currently using the latest Aspose License for PDF Report generation. However, we have encountered an issue with our service, which is written in an older legacy WCF format. In production, we are experiencing failures due to the large number of pages in our PDF reports, causing the generation process to take a longer time. This exceeds the maximum time limit (30 seconds) that other services can tolerate, resulting in failure.
Upon investigation, we noticed that despite having purchased the latest license, our system is still pointing to version 18.4.1 of Aspose.PDF. When we attempted to switch to the latest release from NuGet, we discovered that certain built-in classes are no longer available, resulting in compilation errors.
We kindly request your assistance in resolving the compilation error if we choose to use the latest NuGet release for Aspose.PDF.
Thank you for your attention to this matter.
Best regards,
Syed
Syed.Imam@AER.CA
@syedimam
Thank you for contacting support.
Can you provide more details about the problem?
image.jpg (207.9 KB)
Though we have Latest Licence purchsed our legacy WCF application still pointing to 18.4.1 version.
When I updated it to recent release which is 23.6.0 I am getting these many errors
image.png (116.0 KB)
image.jpg (160.3 KB)
FileStream imageStream = new FileStream(Common.Logo(“AER_ABC”), FileMode.Open, FileAccess.Read);
page.Resources.Images.Add(imageStream);
page.Contents.Add(new Operator.GSave());
Aspose.Pdf.Rectangle rectangle = new Aspose.Pdf.Rectangle(lowerLeftX, lowerLeftY, upperRightX, upperRightY);
Aspose.Pdf.Matrix matrix = new Aspose.Pdf.Matrix(new double[] { rectangle.URX - rectangle.LLX, 0, 0, rectangle.URY - rectangle.LLY, rectangle.LLX, rectangle.LLY });
page.Contents.Add(new Operator.ConcatenateMatrix(matrix));
XImage ximage = page.Resources.Images[page.Resources.Images.Count];
page.Contents.Add(new Operator.Do(ximage.Name));
page.Contents.Add(new Operator.GRestore());
image.jpg (108.5 KB)
Can you please help to repleace those calls in new release? It seems Operator Class has been changed totally and no more has these mthods available
page.Contents.Add(new Operator.GSave());
Aspose.Pdf.Rectangle rectangle = new Aspose.Pdf.Rectangle(lowerLeftX, lowerLeftY, upperRightX, upperRightY);
Aspose.Pdf.Matrix matrix = new Aspose.Pdf.Matrix(new double[] { rectangle.URX - rectangle.LLX, 0, 0, rectangle.URY - rectangle.LLY, rectangle.LLX, rectangle.LLY });
page.Contents.Add(new Operator.ConcatenateMatrix(matrix));
XImage ximage = page.Resources.Images[page.Resources.Images.Count];
page.Contents.Add(new Operator.Do(ximage.Name));
page.Contents.Add(new Operator.GRestore());
I try to repelace commented code with the following
Blockquote
/*
FileStream imageStream = new FileStream(Common.Logo(“AER”), FileMode.Open, FileAccess.Read);
page.Resources.Images.Add(imageStream);
page.Contents.Add(new Operator.GSave());
Aspose.Pdf.Rectangle rectangle = new Aspose.Pdf.Rectangle(lowerLeftX, lowerLeftY, upperRightX, upperRightY);
Aspose.Pdf.Matrix matrix = new Aspose.Pdf.Matrix(new double[] { rectangle.URX - rectangle.LLX, 0, 0, rectangle.URY - rectangle.LLY, rectangle.LLX, rectangle.LLY });
page.Contents.Add(new Operator.ConcatenateMatrix(matrix));
XImage ximage = page.Resources.Images[page.Resources.Images.Count];
page.Contents.Add(new Operator.Do(ximage.Name));
page.Contents.Add(new Operator.GRestore());
*/
FileStream imageStream = new FileStream(Common.Logo("AER"), FileMode.Open, FileAccess.Read);
page.Resources.Images.Add(imageStream);
Aspose.Pdf.Rectangle rectangle = new Aspose.Pdf.Rectangle(lowerLeftX, lowerLeftY, upperRightX, upperRightY);
Aspose.Pdf.Matrix matrix = new Aspose.Pdf.Matrix(new double[] { rectangle.URX - rectangle.LLX, 0, 0, rectangle.URY - rectangle.LLY, rectangle.LLX, rectangle.LLY });
XImage ximage = page.Resources.Images[page.Resources.Images.Count];
page.Contents.Add(new Aspose.Pdf.Operators.GSave());
page.Contents.Add(new Aspose.Pdf.Operators.ConcatenateMatrix(matrix));
page.Contents.Add(new Aspose.Pdf.Operators.Do(ximage.Name));
page.Contents.Add(new Aspose.Pdf.Operators.GRestore());
@syedimam
Thanks! We are checking it and will get back to you shortly.
System.InvalidOperationException: ‘The subscription included in this license allows free upgrades until 23 Mar 2023, but this version of the product was released on 29 May 2023. Please renew the subscription or use a previous version of the product.’
when I repealce the code that was failing due to old libraries, I have started getting following error
System.InvalidOperationException: ‘The subscription included in this license allows free upgrades until 23 Mar 2023, but this version of the product was released on 29 May 2023. Please renew the subscription or use a previous version of the product.’
image.png (41.9 KB)
@syedimam
Sorry for the long wait.
Regarding the issue with operators - yes, apparently the namespace has changed during this time, and it is correct to use new Operators now.
To shorten the record, you can add using Aspose.Pdf.Operators at the top;
@syedimam
Apparently your license is limited to this date.
Try using Aspose.PDF version 23.2 or 23.3. It may be suitable for your tasks.