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.
With this software, you have the capability to either craft your own personalized document designs or utilize pre-formatted designs for your documents. MS Publisher stores its files with the .pub extension, and not many applications other than Publisher are capable of handling such files.
Unlock the Potential of Aspose.PUB library for C++, a highly adaptable and user-friendly tool. Load, open, modify, and convert popular .pub files to PDF with lightning speed and precision. Transform your publications into PDF, HTML, XLSX, DOC, and popular image formats effortlessly.
Integrate Aspose.PUB into your C++ applications with ease. Develop applications to open, merge, or convert MS Publisher files on multiple platforms. Check out our ready-made examples to see how the functionality seamlessly fits into various applications. Say goodbye to the hassle of installing additional software or subscribing to costly services. Aspose.PUB has everything you need to turn your creative vision into reality. Get started today by getting a free trial and experience the difference!
Advanced C++ PUB Manipulation API Features
Export PUB Files to PDF
This C++ code is used to convert a Microsoft Publisher (.pub) file to a Portable Document Format (.pdf) file.
Convert PUB to PDF - C++
System::String SourcPubFile = dataDir() + u"1.pub"; System::String filePdf = dataDir() + u"result_out.pdf"; System::SharedPtr parser = PubFactory::CreateParser(SourcPubFile); System::SharedPtr document = parser->Parse(); PubFactory::CreatePdfConverter()->ConvertToPdf(document, filePdf);
The code above can be briefly explained the next way:
- Define a variable SourcPubFile of type System::String and initialize it with the path to the source .pub file. The dataDir() function returns the path to the data directory, and "u" is a prefix for a Unicode string literal.
- Define a variable filePdf of type System::String and initializes it with the path to the destination .pdf file.
- Create a parser object for the source .pub file using the CreateParser() Method of the PubFactory Class and passing it the SourcPubFile variable.
- Call the Parse() Method on the parser object to parse the source .pub file.
- Use the ConvertToPdf() Method of the PdfConverter Class. The method takes two arguments: the document object and the path to the destination .pdf file and fulfills the conversion.
Access and Manipulate PUB Layers
Aspose.PUB for C++ API provides access to the layers in a Microsoft Publisher .pub file, allowing you to draw on the layers with either images or text. You can combine layers, modify text, apply effects, or export layers as images. Additionally, this API can detect flattened .pub files and generate thumbnails.
Read or Create PUB Files
The Solution not only supports the loading and manipulation of Photoshop .psd and Large Document Format .psb files, but it also offers the ability to create Microsoft Publisher .pub and .psb files from scratch. C++ developers can utilize this API to automate processes and streamline their workflow.
Various Imaging Filters
Aspose.PUB API Solution for C++ offers essential imaging features through its class libraries, including the ability to adjust color. Developers can easily modify the brightness, contrast, or gamma of a raster image loaded with the API. Additionally, they can dynamically dither or blur images, as well as apply popular filters such as Median, Gauss Wiener, Motion Wiener, and Bradley Threshold.
Latest PUB API Features
The Aspose.PUB for C++ API is constantly being enhanced with new features, making it a reliable solution. Here are some of the latest additions:
- Support for Fill Layers with the ability to handle Pattern, Color, and Gradient fill.
- Support for GdFlResource, VmskResource, PtFlResource, and VsmsResource.
- The capability to load image files, such as JPEG and PNG, into the PsdImage without direct loading.
- Support for Layer Vector Masks and Text Layer Custom FlipRotate.
- The ability to render Stroke effects with Color Fill for export.