mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
feat(转换能力): 转换沿用源日期,缺失留空
This commit is contained in:
1 parent
6832554ea3
commit
730586b98f
1 file changed
+1
-1
@@ -1155,12 +1155,12 @@ func (p *pdfImporter) documentMetadata(ctx context.Context, strict bool) error {
|
||||
name string
|
||||
text *string
|
||||
}{{"CreationDate", &projected.CreationDate}, {"ModDate", &projected.ModDate}} {
|
||||
*field.text = ""
|
||||
if value, ok := values[field.name]; ok {
|
||||
date, day, _, err := codecpdf.MetadataDate(value.text, value.xmp)
|
||||
if err != nil {
|
||||
return fmt.Errorf("PDF metadata %s: %w", field.name, err)
|
||||
}
|
||||
*field.text = ""
|
||||
if day {
|
||||
*field.text = date.Format("2006-01-02")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user