Aspose.Html for .net 转pdf怎么设置文档属性,如下图自定义aspose标识的属性
image.png (7.2 KB)
已购买正版授权 @asad.ali
我们担心您无法使用 Aspose.HTML 来更改 PDF 文档的属性。此外,我们在 Aspose.PDF for .NET(21.2 及更高版本)中添加了一项新功能,您可以使用该功能更改文档的创建者和制作者。
请检查以下代码:
Document doc = new Document("input.pdf");
doc.Info.Producer = "Custom producer";
doc.Info.Creator = "Custom creator";
保存文档后,Producer 和 Creator 应设置为自定义值。
如果 Producer 和 Creator 未设置,则应将这些值设置为 Aspose.PDF for .NET and Aspose, Ltd。
我们只购买了aspose.html for .net 能否在后续的版本中增加此功能,而不需要再使用apose.pdf才能处理这些属性Title、Author、CreationDate、Keywords、ModDate、Subject、Creator、Producer。
image.png (32.7 KB)
好的,期待问题得以解决。
The issues you have found earlier (filed as HTMLNET-3255) have been fixed in this update. This message was posted using Bugs notification tool by pavel.petrushechkin
文档属性已可修改,但是创建时间、修改时间存在时区问题。
image.png (12.4 KB)
文件创建时间为2021-08-12 15:17
image.png (1.9 KB)
代码如下:
image.png (30.3 KB)
“CreationDate”和“ModificationDate”属性中的时间应指定为协调世界时 (UTC)。
CreationDate = DateTime.UtcNow,
ModificationDate = DateTime.UtcNow