You can find detail information at: Convert PUB to PDF Programmatically in C#
Last active
January 18, 2021 18:07
-
-
Save aspose-com-gists/1428bad239c7b6ad30365088a1c26992 to your computer and use it in GitHub Desktop.
Convert PUB to PDF Programmatically using C# in .NET Applications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string pubFile = dataDir + "document.pub"; | |
IPubParser parser = PubFactory.CreateParser(pubFile); | |
Document document = parser.Parse(); | |
document.DocumentSummaryInfo.SetCategory("category"); | |
document.DocumentSummaryInfo.SetCompany("company"); | |
document.DocumentSummaryInfo.SetLanguage("language"); | |
document.SummaryInfo.SetComments("comments"); | |
document.SummaryInfo.SetKeywords("keywords"); | |
document.SummaryInfo.SetLastAuthor("last author"); | |
document.SummaryInfo.SetTitle("title"); | |
document.SummaryInfo.SetSubject("subject"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string fileName = dataDir + "halloween-flyer.pub"; | |
var parser = PubFactory.CreateParser(fileName); | |
var doc = parser.Parse(); | |
Aspose.Pub.PubFactory.CreatePdfConverter().ConvertToPdf(doc, dataDir + "result_out.pdf"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment