PUB to PDF C# Overview
Professional PUB to PDF conversion for .NET applications. Our C# library seamlessly integrates into your .NET projects, enabling automated conversion of Microsoft Publisher documents without requiring Publisher installation.
Simple .NET Integration
Install via NuGet and start converting in minutes
Pixel-Perfect Accuracy
Preserves text formatting, images, layouts, and graphics
Multi-Page Support
Handles single and multi-page Publisher documents
Customizable Parameters
Fine-tune your automation with these powerful conversion options
File
File Supported formats: .pubFile to be converted. Value can be URL or file content.
Password
StringSets the password to open protected documents.
ConvertMetadata
Bool Default: TrueConvert document metadata like Title, Author, Keywords to PDF metadata.
PdfVersion
Collection Default: 1.5Set PDF version.
Values: 1.2 1.3 1.4 1.5 1.6 1.7 1.8 2.0PdfResolution
Integer Default: 300Set PDF resolution.
Range: 10 .. 2400PdfTitle
StringProvide a value to customize the PDF title. Otherwise, the default document title will be used. Use single quotes and a space (' ') to remove the title.
PdfSubject
StringProvide a value to customize the PDF subject. Otherwise, the default document subject will be used. Use single quotes and a space (' ') to remove the subject.
PdfAuthor
StringProvide a value to customize the PDF author. Otherwise, the default document author will be used. Use single quotes and a space (' ') to remove the author.
PdfKeywords
StringProvide a value to customize the PDF keywords. Otherwise, the default document keywords will be used. Use single quotes and a space (' ') to remove the keywords.
OpenPage
Integer Default: 1Set the page number at which the PDF document should open.
Range: 1 .. 3000OpenZoom
Collection Default: DefaultSet the default zoom percentage for when you open PDF files .
Values: Default ActualSize FitPage FitWidth FitHeight FitVisible 25 50 75 100 125 150 200 400 800 1600 2400 3200 6400RotatePage
Collection Default: ByPageAutomatically rotate pages based on the orientation of the text. By Page option will rotate each page based on the direction of the text on that page. All option will rotate all pages in the document based on the orientation of the majority of text.
Values: Disabled ByPage AllColorSpace
Collection Default: DefaultSet PDF color space.
Values: Default RGB CMYK GrayEmbedFonts
Bool Default: TrueEmbed fonts in PDF.
SubsetFonts
Bool Default: TrueInclude in the output PDF document only the font characters that are used in the original document.
SubsetFontsThreshold
Integer Default: 100Sets the Subset Fonts threshold. If the percentage of used characters, compared with total characters of the particular font, exceeds this threshold, the entire font is embedded.
Range: 0 .. 100StoreFile
Bool Default: FalseWhen the StoreFile parameter is set to True, your converted file is written to ConvertAPI’s encrypted, temporary storage and made available via a time-limited secure download URL, valid for up to 3 hours. After this period, the file is permanently deleted.
When StoreFile is set to False, conversion happens entirely in-memory. The raw file bytes are streamed back in the API response without touching disk or external storage, ensuring maximum security and zero persistence so that only you can access the content.
Integrate using C#
Ready-to-run code samples for quick conversion and automation.
Install via NuGet:
Install-Package ConvertApi
Convert PUB to PDF in 4 lines:
using ConvertApiDotNet;
var convertApi = new ConvertApi("api-token");
var result = await convertApi.ConvertAsync("pub", "pdf",
new ConvertApiFileParam(@"C:\documents\newsletter.pub"));
await result.SaveFilesAsync(@"C:\output\");
With Advanced Options:
var result = await convertApi.ConvertAsync("pub", "pdf",
new ConvertApiFileParam(@"C:\documents\brochure.pub"),
new ConvertApiParam("Password", "your-password"),
new ConvertApiParam("ConvertMetadata", true),
new ConvertApiParam("EmbedFonts", true)
);Framework Compatibility
- ✅ .NET 6.0+
- ✅ .NET Core 2.0+
- ✅ .NET Framework 4.6.1+
- ✅ .NET Standard 2.0+
Ideal For C# Applications
- Document Management Systems – Automate Publisher file archiving
- Content Publishing Platforms – Convert marketing materials on upload
- Reporting Tools – Generate PDF reports from Publisher templates
- Workflow Automation – Batch process newsletters, brochures, and flyers
- Web Applications – Enable users to convert PUB files online
Why Developers Choose Our C# Library
✓ Clean API Design – Intuitive methods and async/await support
✓ Comprehensive Documentation – Code samples and integration guides
✓ Reliable Performance – 99.9% uptime SLA with global server infrastructure
✓ Responsive Support – Developer-focused technical assistance
✓ Free Tier Available – Test with real files before committing
Integrate within minutes
Easy PUB to PDF automation using our simple C# SDK
Compatible With All .NET Frameworks & Tools
Frequently Asked Questions
What is ConvertAPI C# SDK?
The ConvertAPI C# SDK is a lightweight, easy-to-use library for .NET developers to integrate document and file conversions into their applications with minimal code. It connects directly to the ConvertAPI REST service, allowing you to automate file conversions, merging, splitting, and more.
What types of conversions are supported?
ConvertAPI offers 300+ converters and tools, including DOCX to PDF, XLSX to PDF, PDF to JPG, HTML to PDF, image processing, metadata extraction, compression, and advanced document workflows. You can automate complex document processing scenarios within your .NET applications using the SDK.
Can I build complex conversion workflows using the SDK?
Yes, the ConvertAPI .NET C# SDK allows you to chain conversions, merge documents, extract pages, and apply advanced parameters to automate end-to-end document workflows within your applications.
Is there a file size limit when using ConvertAPI?
The maximum file size you can convert depends on your ConvertAPI plan type. Higher-tier plans allow larger files and increased concurrency for high-volume document processing needs.
Can I convert files entirely in memory without storing them on your servers?
Yes, ConvertAPI supports in-memory conversions, allowing you to send and receive files as streams without saving them to disk on ConvertAPI servers. This enables secure, diskless workflows for sensitive or temporary files.
Which .NET versions does the ConvertAPI SDK support?
The SDK supports .NET Framework 4.5+, .NET Core, .NET 5, 6, 7, and 8, ensuring compatibility across your existing and new projects.
Businesses trust us
Highest rated File Conversion API on major B2B software listing platforms: Capterra, G2, and Trustpilot.
"ConvertAPI has been a game-changer for our document automation workflows. Their conversion accuracy and API reliability are unmatched in the industry for over 7 years."
"ConvertAPI is a reliable, cost-effective solution with a proven track record of stability. It has grown significantly in maturity, adopting enterprise-grade practices over the years."
"We've integrated ConvertAPI across our entire document processing platform. The performance is exceptional and the support team is always responsive. Highly recommended!"
Enterprise-Grade Security
We ensure that all document processing is handled securely in the cloud, adhering to industry-leading standards like ISO 27001, GDPR, and HIPAA. To enhance security even further, we can ensure that no files or data are stored on our servers and never leave your country.
Learn more about security