Hi!
We have problem with certain Pdf's that fails to be converted to Pdf/a.
It takes up a lot of memory (must run in x64) and then we get an exception with "Index was outside the bounds of the array.". The following log is also written:
1.0
Copyright (c) 2001-2012 Aspose Pty Ltd. All Rights Reserved.
2016-07-11 12:04:20
The catalog entry OCProperties is prohibited
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
ExtGState 'ca' value shall be 1.0
Object is compressed
My code is as follows:
using System;
using System.IO;
using Aspose.Pdf;
namespace Pdf2PdfA
{
static class Program
{
static void Main(string[] args)
{
try
{
new License().SetLicense("Aspose.Total.lic");
using (FileStream fs = new FileStream(args[0], FileMode.Open, FileAccess.Read, FileShare.Read))
using (Document pdfDocument = new Document(fs))
using (FileStream fsLog = new FileStream("PdfConv.log", FileMode.Create, FileAccess.Write, FileShare.None))
{
pdfDocument.Convert(fsLog, PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
}
}
catch (Exception exception)
{
Console.WriteLine(exception.Message);
}
}
}
}
We are using Aspose.pdf version 11.8.0.0