Skip to content

Commit 6354244

Browse files
committed
updated linux article
1 parent b3a06b5 commit 6354244

1 file changed

Lines changed: 39 additions & 23 deletions

File tree

net/getting-started/installation-linux.md

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,73 +18,89 @@ This article explains how to install and run **GroupDocs.Conversion for .NET** o
1818
Ensure the following tools and packages are installed:
1919

2020
- .NET 6.0 SDK or later: [Install .NET on Linux](https://learn.microsoft.com/en-us/dotnet/core/install/linux)
21-
- A Linux distribution such as Ubuntu, Debian, CentOS, or Alpine
22-
- `libgdiplus`, `fontconfig`, and basic font packages
21+
- A Linux distribution such as Ubuntu, Debian, CentOS/RHEL, or Alpine
22+
- `libgdiplus`, `fontconfig`, and TrueType fonts
2323

24-
To install the required packages:
24+
## Installing Dependencies
2525

26-
### Ubuntu / Debian:
26+
### Ubuntu / Debian
27+
28+
Ensure the multiverse repository is enabled:
2729

2830
```bash
31+
sudo add-apt-repository multiverse
2932
sudo apt update
33+
```
34+
35+
Install the required packages:
36+
37+
```bash
3038
sudo apt install -y libgdiplus fontconfig ttf-mscorefonts-installer
3139
```
3240

33-
### CentOS / RHEL:
41+
> `ttf-mscorefonts-installer` is in the multiverse repository and downloads Microsoft fonts.
42+
43+
### CentOS / RHEL
44+
45+
Enable EPEL repository and install required packages:
3446

3547
```bash
3648
sudo yum install -y epel-release
37-
sudo yum install -y libgdiplus fontconfig msttcore-fonts-installer cabextract
49+
sudo yum install -y libgdiplus fontconfig cabextract
3850
```
3951

40-
### Alpine (Minimal Docker / Linux Distros):
52+
To install Microsoft TrueType fonts:
4153

4254
```bash
43-
apk add --no-cache libgdiplus fontconfig ttf-dejavu
55+
wget https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm
56+
sudo yum install -y msttcore-fonts-installer-2.6-1.noarch.rpm
4457
```
4558

46-
> If using Alpine with Docker, check the [Build in Docker - Alpine Linux](https://docs-qa.groupdocs.com/conversion/net/build-in-docker-alpine-linux/) article.
59+
> Note: This method uses a third-party RPM for Microsoft fonts. You may need `--nogpgcheck` depending on your system configuration.
4760
48-
## Install GroupDocs.Conversion using .NET CLI
61+
### Alpine Linux
4962

50-
In your project directory, run:
63+
Install minimal dependencies using `apk`:
5164

5265
```bash
53-
dotnet add package GroupDocs.Conversion
66+
apk add --no-cache libgdiplus fontconfig ttf-dejavu
5467
```
5568

56-
To restore packages:
69+
> `ttf-dejavu` provides good font compatibility in Alpine.
70+
71+
## Install GroupDocs.Conversion using .NET CLI
72+
73+
In your project directory:
5774

5875
```bash
76+
dotnet add package GroupDocs.Conversion
5977
dotnet restore
6078
```
6179

6280
## Run Your Project
6381

64-
After adding the package and restoring dependencies, build and run your application:
82+
Build and run your project:
6583

6684
```bash
6785
dotnet run
6886
```
6987

70-
## Headless Environments (Optional Fonts Setup)
88+
## Optional Fonts Configuration
7189

72-
In Linux containers or headless setups, fonts may be missing. You can install or configure them as follows:
90+
In container or headless environments, if rendering issues occur, configure custom fonts in code:
7391

74-
```bash
75-
sudo apt install -y fonts-dejavu ttf-mscorefonts-installer
92+
```csharp
93+
FontSettings.SetFontsFolder("/path/to/fonts", true);
7694
```
7795

78-
Or configure custom fonts in code using `FontSettings.SetFontsFolder`.
79-
8096
## Troubleshooting
8197

82-
- If you encounter `System.TypeInitializationException` or `System.DllNotFoundException`, ensure `libgdiplus` is installed.
83-
- If font rendering is broken or content is missing, install system fonts or configure a custom font folder.
98+
- If you encounter `System.DllNotFoundException`, check if `libgdiplus` is installed.
99+
- If fonts are missing or rendered incorrectly, verify fonts are present and accessible.
84100

85101
---
86102

87-
For Docker setups, see:
103+
For Docker-specific environments, see:
88104

89105
- [Build in Docker](https://docs-qa.groupdocs.com/conversion/net/build-in-docker/)
90106
- [Build in Docker - Alpine Linux](https://docs-qa.groupdocs.com/conversion/net/build-in-docker-alpine-linux/)

0 commit comments

Comments
 (0)