Hi,
I downloaded the latest version of Aspose Words. But my license is old. I would make sure that the latest version have no problem. Then I will buy a new license.
Now I have a new problem. When I use the latest version of Aspose Words with my old license, the following codes throw a new exception:"indexOutOfRangeException"
Document wordFile = new Document(stcPath);
wordFile.Save(“xxx.pdf”, potions);
Document tempPdf = new Aspose.Pdf.Document(“xxx.pdf”);
for (int pageCount = 1; pageCount <= tempPdf.Pages.Count; pageCount++)
{
using (FileStream imageStream = FileStream(tempfile, FileMode.Create))
{
Rectangle rect = tempPdf.Pages[pageCount].Rect;
jpegDevice.Process(tempPdf.Pages[pageCount], imageStrem);
tempPdf.Pages.Delete(pageCount);
tempPdf.Pages.Insert(pageCount);
Page page = tempPdf.Pages[pageCount];
page.Rect = rect;
double upperRightX = rect.Width;
double upperRightY = rect.Height;
page.Resources.Images.Add(imageStream);
page.Contents.Add(new Operator.GSave());
Rectangle rectangle = new Rectangle(0.0, 0.0, upperRightX, upperRightY);
Matrix matrix = new 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));
imageStream.Close();
}
}
I want to know whether my old license cause this problem or not.
Thanks!