📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

WordGlue

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

WordGlue

WordGlue is a generic layout engine which supports DOC and DOCX conversion and rendering for converting Microsoft Office formats. 100% managed, 100% thread safe and 100% independent of applications like MS Word and OpenOffice.org. Compatible with .NET 4.X, .NET 5.0, .NET 6.0, .NET 7.0 and .NET 8.0. Designed to convert semantic formats like DOC and DOCX documents to PDF, XPS, SVG and also to raster formats like PNG and JPEG. The DOC and DOCX rendering engine is general purpose so it can be easily extended to support other formats like HTML and RTF. WordGlue comes with a viewer application for opening, viewing and converting documents. So it's easy for you to test. Just open your test documents, see what they look like, save them in an appropriate format. The code for the viewing application comes included with WordGlue and is extremely compact. So once you're happy with the basic functionality it's simple to create your own conversions. In fact so simple it's trivial. Your code can be as simple as this, using (var doc = new WebSupergoo.WordGlue3.Doc(@"c:\test.docx")) doc.SaveAs(@"c:\output.pdf"); See the documentation for more details.

4.0.1
NuGet
Version published
Maintainers
1
Created
Source

Test Code

Quite often when creating a new project you want some simple test code to ensure your installation is correct.

First you need to ensure you are using the correct namespace. Insert the following at the top of your C# module.

using WebSupergoo.WordGlue4;

If you are in a forms or console application, the following conversion code may be useful.

using(var doc = new Doc(@"c:\test.docx"))
        doc.SaveAs(@"c:\output.pdf");

Deployment

WordGlue is an Xcopy deployment. All that is needed is that the WordGlue DLL file be copied to your bin directory. This will happen automatically because it is what is specified in the NuGet installer.

However if you deploy in this way to another machine, the license is not copied. So if you push your bin directory up to a machine in the cloud, you need to ensure that it gets a copy of your license.

To do this you can use the Settings.InstallLicense call in your code. This should be called before any WordGlue objects are created, passing your purchased license key or, if you have not yet purchased, your trial license key.

To get your trial license key you will need to copy it out of WGSettings.exe which is in the NuGet installation directory - typically at a location like "C:\Users\JohnSmith.nuget\packages\wordglue\3.0.0\WGSettings\WGSettings.exe".

However if you are reading this text file in Visual Studio, just right click on the 'ReadMe.txt' tab at the top of the window and select 'Open Containing Folder'. This will get you to roughly the right place - you'll just need to step up a few directories.

Keywords

docx

FAQs

Package last updated on 04 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts