Intro
 

Availability. This feature which iis only recently available. It should be viewed as being at Release Candidate status.

The development process is an active one so new features are likely to be added as time progresses..

Because Linux does not offer the exact same capabilities as Windows there are some differences.

  • .NET 6.0 and .NET 7.0 on x64 are the supported platforms.
  • ABCChrome117 is the only HTML conversion engine.
  • FireShield is not available.
  • Some read modules are not available: XpsAny, SwfVector (Flash), MSOffice, OpenOffice, RichTextFormat and EmfVector.
  • Exports which depend on WIC codecs (eg .dds, .heic, .heif, .jxr, .wdp) or will not work.
  • EMF import and export is not supported.
  • Different fonts will be available so font substitution will be different.
  • There may be subtle differences in the positioning of characters on the page.
  • There may be subtle differences in the layout of bi-directional text.
  • The TextOperation.ShowClippedText property is not functional.
  • 3D Annotations are not rendered and appearances are not generated for them.
  • System.Drawing is not available on Linux so APIs involving it do not function.
  • The .so shared libraries are not signed because there are no mechanisms for this.
  • The .NET cryptographic classes on Linux operate differently and with reduced functionality so some signature operations may fail.
  • In case of error, exceptions may be different because Linux provides different error information from Windows.

 

   

Basics
 
You need Ubuntu 23.04, 23.10 or later. ABCpdf will not work on earlier releases such as Ubuntu 22.04.

If you are using WSL you should prefer WSL 2 because it supports range based file locking in a way that WSL 1 does not. Without file locking it is difficult to be sure that files will get syncronized correctly.

By default, compared with Windows, Linux comes with a small number of fonts. You may wish to install new fonts at /usr/local/share/fonts, /usr/share/fonts or ~/.local/share/fonts.

Config is held in the file system. You can select a different config file using XSettings.SetConfigFile. Temp files are held at /tmp/ABCpdf.

 

   

Code
 

There are no trial licenses created on Linux so you need to set a license in your code.

At appliction startup simply call XSettings:InstallLicense with a license key. You can use a trial license key copied from the PDFSettings application on Windows or with a purchased license key.

 

   

Deployment
 

The NuGet package contains appropriate libraries but these will be specific to the platform on which you are running. To deploy to Linux you will need to do a command line publish.

.NET Installation. Linux does not come with the .NET runtime pre-installed.

If you have not installed it then you will get an error when you try and run the executable. Something similar to this.

You must install .NET to run this application.

App: /home/pcuser/helloworld/helloworld
Architecture: x64
App host version: 6.0.22
.NET location: Not found

Details of how to install the runtime may be found here. You only need the runtime not the SDK. The SDK is the first part mentioned but not the part you are looking for.

Open a command line and then navigate to the location of your project.

Here we will assume that you have a project called 'hellowiorld", that you have a WSL Linux installation called "Ubuntu" and a Linux user called "pcuser". Run the following to deploy to your Linux installation.

dotnet publish helloworld.csproj -r linux-x64 --self-contained false --output \\wsl.localhost\Ubuntu\home\pcuser\helloworld

Open up a bash shell by clicking in the Windows task bar search box and typing "bash". Enter the following.

cd ~/helloworld
dir # just a sanity check
sudo chmod +x helloworld
~/helloworld/helloworld

This will make your executable executable and then run it.