Excel file saved to pdf does not transfer over the existing Metadata

I am using the following c# code to save an excel spreadsheet out as a pdf:


var cells = new Workbook( path );
cells.Save( outpath, SaveFormat.Pdf );

The save happens correctly, but when I look at the metadata for the pdf file, none of the metadata is populated from the original excel spreadsheet (even though they exist).

I also alternatively tried to use the PdfFileInfo object to update the metadata on the newly created file, but cannot set the ModDate or CreationDate because an exception gets thrown.

var pdfinfo = new PdfFileInfo( OutputFile );
pdfinfo.Author = cells.BuiltInDocumentProperties.Author;
pdfinfo.Keywords = cells.BuiltInDocumentProperties.Keywords;
pdfinfo.ModDate = cells.BuiltInDocumentProperties.LastSavedTime.ToString(); <----- exception thrown here

Any thoughts?

Thanks.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please elaborate your query with screenshots and highlight metadata information which you are talking about. For your information, Aspose.Cells generates the pdf same as MS-Excel print preview shows the output. Your output pdf file looks same as Ms-Excel print preview is showing and we find no difference in both files.

I’ve included all of the source code for a test project that demonstrates how we are using the Aspose libraries. I’ve also included several test office documents that are causing problems. Please read the ReadMe.txt file in the archive for specific information regarding each file. I’ve also included images for the pdf and excel file mentioned in this issue.

The code also applies to the issue submitted here:

http://ciradar.blob.core.windows.net/test/aspose-050913.zip

Let me know if you need anything else.

Thanks.

Any updates on this?


Thanks.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We were able to observe this issue. We have logged your issue in our database. We will look into it and resolve the issue. Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-41686.

Hi,

Thanks for your posting and using Aspose.Cells

We will convert metadata directly through xls->pdf, no need to use Aspose.pdf

If you still want to use Aspose.pdf, it’s an issue of Aspose.pdf, please post your issue on Aspose.Pdf forum.

Hi,

We found it is an issue of Aspose.Pdf product , PdfInfo.ModDate cannot parse the Date string accordingly. As my fellow colleague suggested. Please forward your issue to Aspose.pdf forum, so the Pdf team would help you and figure it out soon there.

Thank you.