MS Publisher is a program to create documents that are focused to work with page layout information. The program opens the next file formats MS Publisher 2.0 or later, files with a .txt extension, RTF files, MS Word files, HTML files, Unicode text, and many more. Pub files may include different types of data like images, texts, or graphics. That is why the format is well-spread in creating flyers, brochures, postcards, and other paper advertisement production.

This software allows creating your own designed documents or using the the-formated designs for your document. MS Publisher saves files with .pub extension and not that many applications apart from Publisher can process such files.

Aspose.PUB for C# .NET is a flexible and easy-to-use library. It is developed to work with electronic publication files. This solution supports the loading, opening, editing, and conversion of the popular electronic publication file format (.pub) to PDF. It offers quick and reliable conversion of PUB to PDF, HTML, XLSX, DOC, and the most popular image formats.

Apart from integrating into your own C# .NET project, the library is perfect for creating your own cross-platform applications to open, merge or convert MS Publisher files. Here you can see and try the examples of implementing the functionality into such applications. They are created by our teams with the use of the solution. With these solutions, you do not have to install any additional software, or subscription to get the result rendered.

Advanced .NET PUB Manipulation API Features

Export PUB Files to PDF

Aspose.PUB for .NET can read and convert publication files (.pub) to PDF file , with just a few lines of code.

Convert PUB to PDF - C#

    string pubFile = dataDir + "flyer.pub";

    var parser = PubFactory.CreateParser(pubFile);

    var pubtopdf = parser.Parse();

    Aspose.Pub.PubFactory.CreatePdfConverter().ConvertToPdf(pubtopdf, dataDir + "publisher_to.pdf");

The code above can be briefly explained the next way:

  • Create the full file path to the Publisher file that you want to be converted. For this create a string Variable pubFile and assign the value of the dataDir variable to it.
  • Create a parser object to parse the contents of the Publisher file calling the CreateParser() Method on the PubFactory Class.
  • Use the Parse() Method on the parser object. The Method reads and parses the contents of the Publisher file and returns the result assigned to the pubtopdf variable.
  • Convert the parsed contents of the Publisher file to a PDF file and save it to the specified location using the ConvertToPdf() Method on the PdfConverter instance.

Access and Manipulate PUB Layers

Aspose.PUB for .NET lets you access layers of a PUB with the ability to draw on it with either image or text. You can merge layers, update text on layers, set effects, or export layers as an image. You may also use PUB .NET API to detect flattened PUB files or create thumbnails.

Read or Create PUB Files

Aspose.PUB for .NET not only supports loading PSD and PSB file formats for manipulation and conversion but it also provides the capability to create PUB and PSB files from scratch. .NET developers can use the API to automate scenarios that may help them on their way.

Various Imaging Filters

Aspose.PUB for .NET provides the core imaging features such as color adjustment via its class libraries. Developers can easily adjust brightness, contrast, or gamma on raster image loaded by the API. Furthermore, developers can dynamically dither or blur images as well as use popular filters including Median, Gauss Wiener, Motion Wiener, and Bradley Threshold.

Latest PUB API Features

Aspose.PUB for .NET API continuously adds more features to make it powerful. Here is a list of a few picks from the latest ones added:

  • Support of Fill layers. Pattern, Color, and Gradient fill.
  • Support of GdFlResource, VmskResource, PtFlResource and VsmsResource.
  • Load JPEG, PNG, etc image files to PsdImage without direct loading.
  • Support of Layer Vector Masks, and Text Layer Custom FlipRotate.
  • Rendering of Stroke effect with Color Fill for export.

FAQ

1. Why would you need Aspose.PUB for .NET?

The rich functionality of Aspose.PUB can be integrated into various software applications, including extracting content, converting to other formats, and rendering for display or printing.

2. What formats are supported by Aspose.PUB for .NET?

This API Solution supports .pub as input and PDF as output formats in conversion functionality.

3. Where can I find the requirements to start working with Aspose.PUB for .NET?

Go to Documentation to learn the fundamentals like system requirements, installation, licensing, and how to run examples. There you can also find Developer Guide and knowledge base about the formats.

4. Where can I get help if there are any issues with the API?

Try to get answer at the Free Support Forum .

5. Where can I find the latest updates of Aspose.PUB for .NET?

Visit Relese Notes to see the progress, all the updates, and the newest features added.



  

Support and Learning Resources

  
  

Aspose.PUB offers individual APIs for popular development environments as listed below: