Free Support Forum - aspose.com

While using PDF throwing an error Timezone value has incorrect format

PDFdateIssue.zip (59.0 KB)

Hi Team,

we are facing issue while using PDF files to A-2A format.
we are getting an error like time zone value has incorrect format.
is there any way to add time zone before it is throwing the exception?.

please find the references as attachments.

@ITCUser

Thank you for contacting support.

Would you please share the source PDF file along with a narrowed down code snippet reproducing this issue so that we may investigate to help you out. Before sharing requested data, please ensure using Aspose.PDF for .NET 18.5 in your environment.

Thank you for your response,
Due to security reason we are unable to share the PDF file. we will share the metada of the file.
we are using latest Aspose PDF V 18.5.

please find the screenshot for metadata.

code we are using
if (pdfDocument.Info.Contains(“CreationDate”) && pdfDocument.Info.CreationDate != null && pdfDocument.Info.CreationTimeZone != null)
{
pdfDocument.Info.ModDate = pdfDocument.Info.CreationDate;
}
else
{
pdfDocument.Info.CreationDate = Convert.ToDateTime(document.CreationDate);
pdfDocument.Info.ModDate = Convert.ToDateTime(document.CreationDate);
}
metadata.zip (28.5 KB)

@ITCUser

We would like to share with you that we need the source files to reproduce and investigate this issue in our environment. Please note that attachments are accessible to thread owner and our staff only. Moreover, the code snippet does not include the code to convert the file to PDF/A-2A format. Kindly share requested data with us so that we may proceed to help you out.