feat(转换能力): 转换沿用源日期,缺失留空

This commit is contained in:
xiaoqidun committed 2026-10-25 23:19:57 +08:00
1 parent 6832554ea3
commit 730586b98f
1 file changed
+1 -1
+1 -1
View File
@@ -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")
}