Bug 52117 - Invalid "last printed" summary field value
Summary: Invalid "last printed" summary field value
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HPSF (show other bugs)
Version: 3.8-dev
Hardware: All All
: P2 minor (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-01 09:56 UTC by Stas Shaposhnikov
Modified: 2017-05-14 22:35 UTC (History)
0 users



Attachments
Sample doc (7.00 KB, application/msword)
2011-11-01 09:56 UTC, Stas Shaposhnikov
Details
Screenshot of Office 2016 properties dialog (36.58 KB, image/png)
2017-05-10 23:27 UTC, Andreas Beeker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stas Shaposhnikov 2011-11-01 09:56:02 UTC
Created attachment 27881 [details]
Sample doc

HPSFPropertiesExtractor reports the following summary information property for the Word file that has never been printed:

PID_LASTPRINTED = Mon Jan 01 03:00:00 MSK 1601

This file was created by MS Word 6.0/95.
Comment 1 Nick Burch 2011-11-01 16:36:33 UTC
The issue is that a last printed date has been set in your file, just with what I guess to be a default date

Can you try fetching the value yourself from HPSF, and see what gets stored? (I'd guess at something like 0 or -1)
Comment 2 Stas Shaposhnikov 2011-11-03 05:54:44 UTC
All properties from the file returned by HPSFPropertiesExtractor:

1 = 65001
PID_TITLE = Document 6.1
PID_SUBJECT = Test 6.1
PID_AUTHOR = Author 6.1
PID_KEYWORDS = Word 6.1
PID_COMMENTS = Note 6.1
PID_TEMPLATE = D:\PROGRA~1\MICROS~3\OFFICE11\TEMPLATE\NORMAL.DOT
PID_LASTAUTHOR = Гвоздицин Александр свет Геннадьевич
PID_REVNUMBER = 3
PID_EDITTIME = Mon Jan 01 03:03:00 MSK 1601
PID_LASTPRINTED = Mon Jan 01 03:00:00 MSK 1601
PID_CREATE_DTM = Tue Mar 23 20:07:00 MSK 2010
PID_LASTSAVE_DTM = Tue Mar 23 20:19:00 MSK 2010
PID_CODEPAGE = 65001

What the default date do you mean? The file contains valid creation date. The file never been printed so printed date should be absent or null/empty, I think.

MS Word reported the following values on Properties-Statistics tab:

Created: Tuesday, March 23, 2010 9:07:00 PM
Modified: Tuesday, November 01, 2011 11:01:04 AM 
Accessed: Tuesday, November 01, 2011 11:01:04 AM
Printed: <empty>
Comment 3 Andreas Beeker 2017-05-02 23:47:21 UTC
added test file to corpus - r1793599
Comment 4 Andreas Beeker 2017-05-10 23:27:40 UTC
Created attachment 34991 [details]
Screenshot of Office 2016 properties dialog
Comment 5 Andreas Beeker 2017-05-14 22:35:16 UTC
Added a helper method in org.apache.poi.hpsf.Filetime.isUndefined() via r1795123
Furthermore adapted handling in Property.toString() to handle those cases