Last active
February 14, 2020 15:26
-
-
Save aspose-com-gists/5f334c37357a615762e45eec01316707 to your computer and use it in GitHub Desktop.
This Gist contains code snippets of Aspose.PUB for .NET
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
This Gist contains code snippets of Aspose.PUB for .NET |
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
// For complete examples and data files, please go to https://github.com/aspose-pub/Aspose.PUB-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_Data(); | |
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"); |
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
// For complete examples and data files, please go to https://github.com/aspose-pub/Aspose.PUB-for-.NET | |
Console.WriteLine("Assembly Version: {0}", Aspose.Pub.BuildVersionInfo.AssemblyVersion); | |
Console.WriteLine("File Version: {0}", Aspose.Pub.BuildVersionInfo.FileVersion); | |
Console.WriteLine("Product: {0}", Aspose.Pub.BuildVersionInfo.Product); |
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
// For complete examples and data files, please go to https://github.com/aspose-pub/Aspose.PUB-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_Data(); | |
string fileName = dataDir + "Aspose.PUB.Lic"; | |
License pubLicense = new License(); | |
pubLicense.SetLicense(fileName); |
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
// For complete examples and data files, please go to https://github.com/aspose-pub/Aspose.PUB-for-.NET | |
// Initialize license object | |
License pubLicense = new License(); | |
// Load license in FileStream | |
FileStream myStream = new FileStream("Aspose.PUB.lic", FileMode.Open); | |
// Set license | |
pubLicense.SetLicense(myStream); |
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
// For complete examples and data files, please go to https://github.com/aspose-pub/Aspose.PUB-for-.NET | |
string dataDir = RunExamples.GetDataDir_Data(); | |
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"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment