Formats supported for PDF/A conversion and other questions

Hi,

I have recently downloaded trial version of Aspose.Total.

My requirement is to convert word, excel, infopath, pdf and tiff files to PDF/A for archiving. Now user interaction is allowed and will be converted as batch process.

I have played with your product and can see easy conversion of word and Pdf to PDF/A.

I have seen some messages where it is said that direct conversion will be available for excel and infopath. I was wondering if it has already been implemented.

What are the formats supported for PDF/A conversion?

Is it possible to get some sample code for converting Excel, infopath with Data and tiff to PDF/A.

Thanks and Regards

Tushar Patel

Hi Patel,

Thanks for the post. Like Aspose.Words for .NET and Aspose.Slides for .NET, Aspose.Cells for .NET also provides an easy direct Excel to PDF Export through a single method. To get an idea how to achieve this, please visit this topic from Aspose.Cells documentation.

The exported PDF document must comply either PDF-1.5 or PDF/A-1b. We will provide you more information about this soon.

Best Regards

Hi Tushar,


Aspose.Form for .NET can convert Infopath forms (XSN files) to PDF. Please refer to http://www.aspose.com/documentation/.net-components/aspose.form-for-.net/infopath-forms-to-pdf-conversion.html for more details.

Regarding Aspose.Cells, I have converted it to PDF but do you support converting it directly to PDF/A like it’s done for Word document using Aspose.Words.

If not then I assume it is done by first converting to PDF and then from PDF to PDF/A.

Is their a time when cells or any other type of document will not get converted to PDF/A. If yes then do you have any function to validate the document to check if it can be converted to PDF/A or not.

Regarding Infopath form, the example shows XmlFormView1 which I think is a web control on the web page. Correct me if I am wrong.

As per my requirment, their will be no user interaction and I will get collection of files which are in word, excel, infopath (.xml file containing infopath template path and data), pdf and tiff. I need to covert these to PDF/A. So, Is their a property/function to load the infopath file and then convert it to PDF/A.

Regarding Infopath form, the example shows XmlFormView1 which I think is a web control on the web page. Correct me if I am wrong.

As per my requirment, their will be no user interaction and I will get collection of files which are in word, excel, infopath, pdf and tiff. I need to covert these to PDF/A. So, Is their a property/function to load the infopath file and then convert it to PDF/A.

Hi Patel,

Yes, I am afraid, Aspose.Cells for .NET does not support PDF/A at the moment. We have logged it into our issue tracking system with an id: CELLSNET-18026. Once we have any update about it, we will notify you.

Thank you.

That’s fine. Do you have any further information about Infopath conversion as requested by me on 24th June

Dear Patel,

You are right. Aspose.Form for .NET is a web control and you need to load the InfoPath forms into XmlFormView1 before converting them to PDF. At the moment, you cannot convert a collection of files to PDF/A without user's interaction.

I have logged the following issues into our issue tracking system:

  • FORMNET-18090 to provide support for PDF/A

  • FORMNET-18091 to provide an API to convert InfoPath forms to PDF/A without loading them into XmlFormView control

We will keep you updated on these issues in this thread.

Best Regards,

The company for which I am doing this project, they already have license to your Aspose.Words. We are working on Archiving project for which we need other format doucments to be converted to PDF/A and are planning to buy your Aspose.Totals License. We have deadline to finish this project, so can you give me an timelines for these changes.

Hi,

Please try the attached version with the following sample code. We have supported PDF/A for Aspose.Cells now.
Workbook workbook = new Workbook();

workbook.Worksheets[0].Cells[0, 0].PutValue(“test
pdf/a”);

workbook.SaveOptions.Compliance = PdfCompliance.PdfA1b;

workbook.Save(“pdf_a.pdf”);

Thank you.


Hi,

Please ignore Aspose.Cells for .NET v5.0.0.5 attached in my previous post. We have Improved PDF/A-1b in 5.0.0.6 (attached). Please try the attached version.

Thank you.

Thanks for the new cells dll, I have test the previous dll and found few issues with PDF/a validation.

I will try this new dll later today or tomorrow and will let you know.

Thanks and Regards

Tushar Patel

Hi,

I have now tested the new Aspose.cells. It does converts the excel file into pdf/a.

I have few question regarding this.
1. Do you validate a converted PDF/A document or have any API call to validate the PDF/A to see if it is compatiable with PDF/A standards?
2. I have raised the question of validation because, the excel file that I converted was using macro. The spreadsheet has got forms which run on macro. I could see only 2 tabs on excel file but when PDF/A file was generated, It was 14 pages. Have you had any situation like this and was it is the best approach to this problem.
3. Is it possible to convert excel into Image and then to PDF/A?

Thanks and regards

Tushar Patel

Hi,

We will get back to you soon for your queries.

Thank you.

Hi,

1) This feature is not in our plan. Please ask Aspose.Pdf team, they can better help you.



2) Would you please send the excel file here, we will check your issue
soon.



3) Aspose.Cells can convert excel to image, but cannot convert image to
PDF directly, but you can use Aspose.Cells API to insert the generated image into Excel
sheet one image per sheet, and then convert the Excel file to PDF/A as a
workround.



Thanks!

Hi Tushar,

I’m a representative of Aspose.Pdf.Kit and I would like to comment on your requirement to validate a converted PDF file for PDF/A compliance. In fact, this feature is currently not supported by Aspose.Pdf.Kit, however we have already logged a new feature request as PDFKITNET-11313 in our issue tracking system. We’ll update you via this forum thread once it is supported in our future version.

We’re sorry for the inconvenience.
Regards,

Amjad,

As it is a confidential document, I cannot send that to you.

Let me see if I can find any other excel file that looks same but not confidential. Meanwhile just to let you know, the excel spreadsheet had dropdowns and textboxes.

Can you give me some sample code to converting excel file to image and then to add them to excel as per sheet.

Thanks and regards

Tushar Patel

Shahzad,

If you can provide validation that would be great but as part of converting a document to PDF/A, do you internally validate whether the converted document is meets PDF/A standards.

Thanks and Regards

Tushar Patel


Hi Patel,

Please see a sample code for your reference:

Sample code:

Workbook workbook = new Workbook();
workbook.Open(“e:\test\Book1.xls”);
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.ImageFormat = ImageFormat.Jpeg;
imgOptions.PrintingPage = PrintingPageType.IgnoreBlank;
imgOptions.OnePagePerSheet = true;
foreach (Worksheet ws in workbook.Worksheets)
{
SheetRender sr = new SheetRender(ws, imgOptions);
for (int i = 0; i < sr.PageCount; i++)
{
MemoryStream stream = new MemoryStream();
sr.ToImage(i,stream);
ws.Pictures.Add(0, 0, stream);
stream.Close();
}

}

workbook.SaveOptions.Compliance = PdfCompliance.PdfA1b;
workbook.Save(“e:\test\mypdf.pdf”);


For further reference, see some topics.
To take image of Excel sheets:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/converting-worksheet-to-image.html

To insert image into sheet:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/adding-pictures.html

Thank you.