• <menu id="w2i4a"></menu>
  • logo Aspose.PDF使用教程

    文檔首頁>>Aspose.PDF使用教程>>Aspose.Pdf使用教程:設(shè)置PDF文件信息

    Aspose.Pdf使用教程:設(shè)置PDF文件信息


    Aspose.Pdf允許你設(shè)置PDF文件的特定信息,比如作者、創(chuàng)建日期、主題和標(biāo)題等。進(jìn)行著些信息設(shè)置,您需要?jiǎng)?chuàng)建一個(gè)DocumentInfo對(duì)象并單獨(dú)設(shè)置這些屬性的值。一旦這些屬性值完成設(shè)置,你就僅僅需要使用文檔對(duì)象的save方法保存更新后的文檔。

    》》》免費(fèi)下載Aspose.Pdf試用版

    下面是使用Aspose.Pdf設(shè)置PDF文件信息的示例代碼

    C#

    //open document
    Document pdfDocument = new Document("input.pdf");
    //specify document information
    DocumentInfo docInfo = new DocumentInfo(pdfDocument);
    docInfo.Author ="Aspose";
    docInfo.CreationDate =DateTime.Now;
    docInfo.Keywords ="Aspose.Pdf, DOM, API";
    docInfo.ModDate =DateTime.Now;
    docInfo.Subject ="PDF Information";
    docInfo.Title ="Setting PDF Document Information";
    //save output document
    pdfDocument.Save("output.pdf");
    

    VB.NET

    'open document
    Dim pdfDocument As New Document("input.pdf")
    'specify document information
    Dim docInfo As New DocumentInfo(pdfDocument)
    docInfo.Author = "Aspose"
    docInfo.CreationDate = DateTime.Now
    docInfo.Keywords = "Aspose.Pdf, DOM, API"
    docInfo.ModDate = DateTime.Now
    docInfo.Subject = "PDF Information"
    docInfo.Title = "Setting PDF Document Information"
    'save output document
    pdfDocument.Save("output.pdf")
    
    掃碼咨詢


    添加微信 立即咨詢

    電話咨詢

    客服熱線
    023-68661681

    TOP
    三级成人熟女影院,欧美午夜成人精品视频,亚洲国产成人乱色在线观看,色中色成人论坛 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();