logo
small logo
  • Products
  • Buy
  • Support
  • About
  • Customer panel Support
    • en
    • de
    • JP
    • ZH
  • Home
  • /
  • Articles
  • /
  • Building libgdiplus library from source
  • Application with FastReport .NET in Docker with Linux

    November 17, 2021

    Docker is a software platform for rapid development, testing and launching of applications. Due to

    read more
  • The era of WinForms is over, the era of FastReport.Core.Skia began

    September 6, 2022

    To create high-quality reports and correctly export them to different formats (PDF, Word, Excel, etc.),

    read more
  • Connecting to Elasticsearch

    November 10, 2021

    Now FastReport .NET, Core, Mono, and OpenSource products allow connecting to Elasticsearch. Elasticsearch is a

    read more
  • How to make PDF on Raspberry PI with .NET Core

    May 26, 2020

    Raspberry PI is a miniature single-board computer with ARM processor. This microcomputer is often used

    read more
  • How to use ASP.NET applications in Linux Debian

    November 11, 2013

    The Mono project allows you to run applications that use the .NET Framework in the

    read more

Building libgdiplus library from source

October 2, 2020

When using the FastReport.NET (Core), FastReport Open Source and FastReport Mono libraries on Linux operating system, as well as when saving documents as images or PDF files, there is a possibility to experience the incorrect display of Unicode texts in the report preview.

One of the most common problems is a hyphenation error and, as a result, incorrect spacing between words. For example, when using Thai language on Windows OS, we see the following text:

Example

When running the same report on Linux Ubuntu, the following line is formatted incorrectly:

Example

There may also be problems with the word wrap. Let’s look at another example with Thai on Windows operating system:

Example

The same text is displayed incorrectly in Linux Ubuntu operating system:

Example

Such text display errors can be observed in other languages.

It is also possible that the following error will occur:

1
System.OutOfMemoryException: Not enough memory to complete operation [GDI+ status: OutOfMemory]

Fortunately, there is a solution – lingdiplus library self-assembly from source with Pango.

Before starting, it is highly recommended to make a backup copy of the /usr/lib/libgdiplus*.* files, as they will be overwritten with the new ones in the process of building the library. In this case, you can return the system to its original state if the desired result has not been achieved.

In the first step, we need to install the required dependencies using the command:

$ sudo apt-get install libgif-dev autoconf libtool automake build-essential gettext libglib2.0-dev libcairo2-dev libtiff-dev libexif-dev libpango1.0-dev

Then we need to make a copy of the needed libgdiplus library from the GitHub repository: 

$ git clone https://github.com/mono/libgdiplus.git

After that, go to the libgdiplus folder and execute the build commands:

$ ./autogen.sh --with-pango --prefix=/usr
$ make

If the build was successful and there are no errors, then you can install the built library:

$ sudo make install

The files will replace the old ones in the /usr/lib folder.

Now you can run the program with reports and make sure it works correctly.

For example, you can see how FastReport Mono works under Linux Ubuntu 18.04:

FastReport Mono

All of the above is also true for web applications using the .NET Core and Mono frameworks.

I wish you the best of luck and less problems with cross-platform programs!

about product buy
avatar
Alexander Tsyganenko
CTO
Fast Reports Team: Alexander Tsyganenko - CTO at Fast Reports
.NET Mono FastReport Linux Core Open Source Libgdiplus

Add comment
logo
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314
  • Buy
  • Download
  • Documentation
  • Testimonials
  • How to uninstall
  • FAQ
  • Tutorial Video
  • Forum
  • Articles
  • Our News
  • Press about us
  • Resellers
  • Extended licensing
  • Contact us

© 1998-2023 by Fast Reports Inc.

  • Privacy Policy