Extracts the time zone information from the PDF date string returned by the CreatedOriginal or ModifiedOriginal properties.
public String TimeZoneOffset(String originalTime)
public String TimeZoneOffset(
java.lang.String originalTime
);
public:
String^ TimeZoneOffset(String^ originalTime);
def TimeZoneOffset(self,originalTime):
originalTime
The string containing the time in PDF time format
The time offset formatted as a string in one of the following forms:
" (empty string) if the time did not contain time zone information
UTC if the time was UTC
+HH:mm if the time zone is UTC+HH:mm
-HH:mm if the time zone is UTC-HH:mm
The originalFormat parameter should be a valid PDF string as returned by the CreatedOriginal or ModifiedOriginal properties. See the CreatedOriginal property for a description of the format expected for the originalFormat parameter. If the string is invalid, this method will throw an exception.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Controls;
using Leadtools.Pdf;
using Leadtools.Svg;
using Leadtools.WinForms;
public void TestPDFTime()
{
string pdfFileName = Path.Combine(LEAD_VARS.ImagesDir, @"Leadtools.pdf");
PDFFile pdfFile = new PDFFile(pdfFileName);
pdfFile.Load();
PDFDocumentProperties properties = pdfFile.DocumentProperties;
Console.WriteLine("Created = {0}", properties.Created.ToString());
Console.WriteLine("Modified = {0}", properties.Modified.ToString());
Console.WriteLine("CreatedOriginal = {0}", properties.CreatedOriginal);
Console.WriteLine("ModifiedOriginal = {0}", properties.ModifiedOriginal);
Console.WriteLine("CreatedTimeZoneOffset = {0}", PDFDocumentProperties.TimeZoneOffset(properties.CreatedOriginal));
Console.WriteLine("ModifiedTimeZoneOffset = {0}", PDFDocumentProperties.TimeZoneOffset(properties.ModifiedOriginal));
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}
PDFDocumentProperties.CreatedOriginal property
PDFDocumentProperties.ModifiedOriginal property
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.