Convert word to pdf exception

Hi,
I’m trying to convert a 5M(200pages) word document to a protected pdf file.
The following codes throw a exception:"_CPMPlusException"
jpedDevice.Process(pdf.Pages[pageCount], imageStream);
I need your help.
My OS is Windows Vista Business Service Pack 2 architecture 32-bit;
Thank you!

Hi Chen,

Thanks for your inquiry. In case you're using an older version of Aspose.Words, I would suggest you please upgrade to the latest version from the following link:
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

In case the problem still remains, please attach your input Word document and source code here for testing. We will investigate the issue on our end and provide you more information.

Best regards,

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!

When I testing with the older version of Aspose, I found another problem.


the following code throw a exception:“Encryprion of huge stream is not implemented”;

tempPdf.Encrypt(string.Empty, string.Empty, 0, CryptoAlgorithm.RC4x128);
tempPdf.Save(pafPath);

Whether Aspose limit the stream’s size? My tempPdf’s size is bigger than 200M;

Thanks!
Regards
Hi Chen,

Thanks for your inquiry. We welcome you to evaluate the official release of Aspose.Words 14.1.0. Please read the following article for more details:
http://www.aspose.com/docs/display/wordsnet/Evaluate+Aspose.Words

Could you please attach your Word and PDF documents, you're getting these problems with, here for testing? We will investigate the issue on our end and provide you more information.

Moreover, I feel your query is more related to Aspose.Pdf, I am moving your thread in Aspose.Pdf forum. My colleagues will answer you shortly.

Best regards,

Hi Chen,


Thanks for your inquiry. As stated in your other post, we are unable to replicate the issue with latest version of Aspose.Pdf for .NET. 8.9.1. Please download and try latest version of Aspose.Pdf for .NET. It will resolve the issue.

Please feel free to contact us for any further assistance.

Best Regards,