ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder
ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 The time in the metadata of the saved pdf file.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Stalker4

Ukraine
13 Posts

Posted - Feb 17 2021 :  03:38:08  Show Profile  Reply
Hi All,

Delphi 10.4.1, Win32, ImageEn 9.0.0.

There is a code that saves scanned document pages from a stream to a pdf file.
with ListImageEnMView.MIO do
   for nCou := 0 to ListImageEnMView.ImageCount-1 do begin
     Params[nCou].PDF_Compression := ioPDF_JPEG;
     Params[nCou].PDF_Creator := 'Cancelar3';
   end;

 ListImageEnMView.MIO.SaveToStreamPDF(FStream);

While executing this code, I look at the current time in my OS "Windows 7" (eg time 15:30). The Windows clock is showing the correct time.

But when I look at the properties (metadata) of the saved pdf file (in Adobe Reader, in FireFox or any other program that can view the pdf file metadata), then in the "Created" column there is a time of 17:30, that is, for two hours more.
As I understand it, this is somehow related to the time zone on the user's computer.

Is it possible to fix this (creation time) somehow, so that the correct time would be in the metadata of the pdf file?

xequte

5869 Posts

Posted - Feb 17 2021 :  15:14:26  Show Profile  Reply
Hi

Please email me for an update that fixes this.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Stalker4

Ukraine
13 Posts

Posted - Feb 18 2021 :  02:11:29  Show Profile  Reply
I apologize, I did not understand your question ...
Go to Top of Page

xequte

5869 Posts

Posted - Feb 18 2021 :  14:16:54  Show Profile  Reply
Hi

We have a fix for this. If you email me I will send it to you.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Stalker4

Ukraine
13 Posts

Posted - Feb 21 2021 :  04:46:48  Show Profile  Reply
I have a trial version of ImageEn 9.0.0, which I downloaded from your site last year. Now I decided to try it and found this problem. If these errors are fixed in newer versions of ImageEn, please tell me which one ?
Go to Top of Page

xequte

5869 Posts

Posted - Feb 21 2021 :  13:56:36  Show Profile  Reply
Hi

Unfortunately the fix is source only until the release of v9.3.2. It will probably be released in March.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Stalker4

Ukraine
13 Posts

Posted - Feb 21 2021 :  14:21:17  Show Profile  Reply
Then I'll wait until March.
Could you make a small demo (.exe) with this corrected code, which would save its data in pdf ? It's just that there are certain nuances (when formed by time) and I would like to check them.
Go to Top of Page

xequte

5869 Posts

Posted - Feb 23 2021 :  15:51:41  Show Profile  Reply
Hi

Please download it from:

www.imageen.com/temp/PdfBuilderDemo.zip

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Stalker4

Ukraine
13 Posts

Posted - Feb 24 2021 :  01:34:11  Show Profile  Reply
There is not quite the right correction.

Some programs can correctly show time taking into account the time zone (for example Adobe Reader DC, Firefox 85), and some are not (for example Adobe Reader X).

Applying your patch, I created a new Test .pdf file,
Creation time 08:23.
Also, I have a Word.pdf file created in Word (I tried Word 2010, Word 2016), creating time 10:56.

I open Test .pdf in Firefox 85 or Adobe Reader DC - the creation time in the metadata 08:23, i.e. Right.
I open Test .pdf in Adobe Reader X - the creation time in the metadata 06:23, i.e. 2 hours less. And it is expected, because Adobe Reader X does not know how to work with time zones, and the time in the PDF metadata is given by UTC.

And now we take Word.pdf and open it in Firefox 85 or Adobe Reader DC - creation time in metadata 10:56, i.e. Right.
Open Word.pdf in Adobe Reader X - creation time in metadata 10:56, i.e. Also right.

And the following conclusion is obtained: PDF created in Imageen, its creation time is properly shown only in programs that can work with time zones (under the correct I mean, it corresponds to the real time for creating this file). And it is not correctly shown in programs that do not know how to work with time zones.

At the same time, the PDF file created in Word, its creation time is correctly shown in both situations.

Fix it.

In the archive 2 PDF file

Word.pdf is created in Word 2010.
His real time of creation 10:56.
This time is shown correctly in Adobe Reader DC, Firefox 85, Adobe Reader X.

Word.pdf is created in Word 2016.
Its real time creation 08:43.
This time is shown correctly in Adobe Reader DC, Firefox 85, Adobe Reader X.

That is, their time in the "column is created" is shown correctly for both programs that can work with a time zone and for programs that do not know.

At the same time, fill the Count "Changed", and then it is empty.

attach/Stalker4/202122413538_test.zip
253.96 KB
Go to Top of Page

xequte

5869 Posts

Posted - Feb 24 2021 :  19:02:42  Show Profile  Reply
Here's an update that should fix it, but it is difficult to test properly (having to fake my time zone):

www.imageen.com/temp/PdfBuilderDemo2.zip

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Stalker4

Ukraine
13 Posts

Posted - Feb 25 2021 :  01:32:42  Show Profile  Reply
Yes, now the time is displayed correctly in all cases.

Do not forget to fill in the "Modified" (ModDate) tag, otherwise you have it empty.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: