PPTX to PDF Conversion with Aspose.Slides for .NET Crashes in Linux

I am trying to convert 1 slide pptx file to pdf using aspose.slides.
On Windows - ok
On Linux - crash

I use
Aspose.Slides.NET 21.5.0
and
Linux 5.4.68-std-def-alt1.1 #1 SMP Sat Oct 3 03:14:56 UTC 2020 x86_64 GNU/Linux
ALT Server 9.1 (Altostratus)

Attached my PPTX-file. edited1.zip (205.7 KB)

@Roger_Wood, thank you for Aspose Slides for .NET library using.

Could you please also specify the version of the installed .NET and the message of the exception? Thank you.

I have tested the presentation you provided in Ubuntu 20.04 + .NET 5 + Aspose.Slides for .NET 21.10.0. If it is possible, please try the latest versions of .NET and Aspose.Slides for .NET.

You should add Libgdiplus package to your linux. It’s a requirement to convert on linux.

i tried to test on another linux

Ubuntu

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION=“Ubuntu 20.04.2 LTS”

Linux ubuntu 5.4.0-66-generic #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

With gdiplus:

apt show libgdiplus

Package: libgdiplus
Version: 6.0.4+dfsg-2
Priority: optional
Section: universe/libs
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Mono Group <pkg-mono-group@lists.alioth.debian.org>
Bugs: OpenID transaction in progress
Installed-Size: 558 kB
Depends: libc6 (>= 2.29), libcairo2 (>= 1.10.0), libexif12 (>= 0.6.21-1~), libfontconfig1 (>= 2.12.6), libfreetype6 (>= 2.2.1), libgif7 (>= 5.1), libglib2.0-0 (>= 2.31.8), libjpeg8 (>= 8c), libpng16-16 (>= 1.6.2-1), libtiff5 (>= 4.0.3), libx11-6
Homepage: Redirecting…
Download-Size: 160 kB
APT-Manual-Installed: yes
APT-Sources: Index of /ubuntu/ focal/universe amd64 Packages
Description: interface library for System.Drawing of Mono
This package contains a GDI+ API compatible implementation needed by the
System.Drawing library of Mono.

With MS-fonts:

apt show ttf-mscorefonts-installer

Package: ttf-mscorefonts-installer
Version: 3.7ubuntu6
Priority: optional
Section: multiverse/x11
Source: msttcorefonts
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Thijs Kinkhorst <thijs@debian.org>
Bugs: OpenID transaction in progress
Installed-Size: 93.2 kB
Provides: msttcorefonts
Pre-Depends: debconf (>= 0.5) | debconf-2.0
Depends: cabextract, xfonts-utils, update-notifier-common (>= 0.119ubuntu2)
Recommends: fonts-liberation
Download-Size: 25.1 kB
APT-Manual-Installed: yes
APT-Sources: Index of /ubuntu/ focal/multiverse amd64 Packages
Description: Installer for Microsoft TrueType core fonts
This package allows for easy installation of the Microsoft True Type
Core Fonts for the Web including: …

with Aspose.Slides 21.10
with Microsoft.NETCore.App 3.1.13 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

i am converting a simple presentation (other file) with ms font text - ok
I am converting my attached file - crash

My console output:

libpng warning: Interlace handling should be turned on when using png_read_image
Segmentation fault (core dumped)

@Roger_Wood
Could you please share the sample .NET solution (demonstrates the problem), zip it, and post us. We will check it soon.

I only delete license file. Aspose.7z (9.1 MB)
run on linux: dotnet ./Aspose.dll

@Roger_Wood
Thank you for the additional information.
I logged the issue with ID SLIDESNET-42855 in our tracking system. Our development team will investigate this case.
You will be notified when this problem is fixed.

Hello again!

A space in the text has a shadow effect, but the text does not have this effect.

Steps:

  1. Create text label with “T est”.
  2. Only for space add shadow effect.
  3. Try convert.

If all text have effect, no crash.

My workaround:

    private static void RemoveShadowEffects(IPresentation presentation)
    {
      foreach (var slide in presentation.Slides)
      {
        foreach (var shape in slide.Shapes)
        {
          var autoShape = shape as IAutoShape;

          if (autoShape?.TextFrame == null)
            continue;

          foreach (var para in autoShape.TextFrame.Paragraphs)
          {
            foreach (var portion in para.Portions)
            {
              var effects = portion.PortionFormat.EffectFormat;
              effects.DisableOuterShadowEffect();
            }
          }
        }
      }
    }

@Roger_Wood,
Thank you for the issue description. Please share the following:

  • input presentation file
  • output PDF file

@Andrey_Potapov, input presentation file in my first post.
I attach another file that indicates the same problem.
There is no output file because the application crashes.
Only my workaround helps.

test1.zip (21.8 KB)

@Roger_Wood,
I thought you described the new issue you faced:

I am sorry for my misunderstanding.

@Roger_Wood,
Our development team investigated the issue. Unfortunately, the error does not reproduce on any of the six Linux configurations, and information on this error could not be found. Similar problems were in the libpng library but in earlier versions of it. Version 22.2 has many fixes for PNG image processing on Linux platforms, and currently, the processing is done without using the libpng library.

Please try using the latest version of Aspose.Slides to see if the error is reproduced. If the bug is reproducible, we will continue to investigate it.

3 posts were split to a new topic: Converting PPTX to PDF Throws PptxReadException