Hello Aspose Support,
I am currently facing an issue with PPT to PDF conversion using Aspose.Slides.NET version 24.8.0 on Amazon Linux 2. My environment and issue details are as follows:
Environment:
OS: Amazon Linux 2
.NET version: .NET Core 3.1
Aspose packages:
Aspose.Slides.NET 24.8.0
SkiaSharp 2.88.6
SkiaSharp.NativeAssets.Linux.NoDependencies 2.88.6
Custom fonts folder with Arial fonts registered using FontRepository and FontsLoader.LoadExternalFonts.
Native Linux dependencies installed (verified via rpm -qa):
libgdiplus-2.10
fontconfig-2.13
libc6 packages
libX11 and libX11-devel
freetype and freetype-devel
Issue:
PPT to PDF conversion works fine on Windows but does NOT produce any output on Linux.
No explicit exception is thrown in the application.
Fonts are correctly loaded from the custom folder.
All native dependencies required for rendering on Linux are installed.
Using SkiaSharp libraries, but the Aspose.Slides version 24.8.0 internally relies on libgdiplus, not SkiaSharp for rendering.
What I have tried:
Verified installation of all required native libraries.
Registered custom fonts correctly.
Tested on a minimal presentation file.
Verified no exceptions are logged during the conversion process.
Additional context:
I understand that .NET Core 3.1 relies on native libraries like libgdiplus for System.Drawing support on Linux.
The AppContext.SetSwitch(“System.Drawing.EnableUnixSupport”, true); setting is not applicable for .NET Core 3.1.
Aspose.Slides 24.8.0 still depends on System.Drawing and native Linux libraries rather than SkiaSharp for Linux rendering.
Code for converting PPT to PDF:
private async Task<ConversionResult> ConvertToPdf(string inputFilePath, string outputPath, bool blackAndWhite = false)
{
try
{
using (Presentation presentation = new Presentation(inputFilePath))
{
if (blackAndWhite)
{
// Get original slide size
var slideSize = presentation.SlideSize.Size;
// Save slides as B/W TIFF image
var tiffOptions = new Aspose.Slides.Export.TiffOptions
{
CompressionType = Aspose.Slides.Export.TiffCompressionTypes.CCITT4,
PixelFormat = Aspose.Slides.Export.ImagePixelFormat.Format1bppIndexed,
DpiX = 300,
DpiY = 300
};
using (var tiffStream = new MemoryStream())
{
presentation.Save(tiffStream, SaveFormat.Tiff, tiffOptions);
// Create PDF with preserved size
var pdfDoc = new Aspose.Pdf.Document();
var page = pdfDoc.Pages.Add();
page.SetPageSize(slideSize.Width, slideSize.Height);
var image = new Aspose.Pdf.Image
{
ImageStream = new MemoryStream(tiffStream.ToArray()),
FixWidth = slideSize.Width,
FixHeight = slideSize.Height
};
page.Paragraphs.Add(image);
pdfDoc.Save(outputPath);
}
}
else
{
// Unhide all slides first
foreach (ISlide slide in presentation.Slides)
{
slide.Hidden = false;
}
// Add summary slides for notes and comments at the end
AddNotesAndCommentsSummary(presentation);
// Configure PDF options
PdfOptions pdfOptions = new PdfOptions();
// Don't show comments inline - we'll add them as summary pages
pdfOptions.NotesCommentsLayouting.NotesPosition = NotesPositions.None;
pdfOptions.NotesCommentsLayouting.CommentsPosition = CommentsPositions.None;
// Ensure high quality output
pdfOptions.JpegQuality = 100;
pdfOptions.TextCompression = PdfTextCompression.None;
// Save to PDF
Console.WriteLine($"Slide to PDF- Saving the converted files to the output path");
presentation.Save(outputPath, Aspose.Slides.Export.SaveFormat.Pdf, pdfOptions);
Console.WriteLine($"Slide to PDF- File saved in the output path {outputPath}");
}
}
return ConversionResult.Successful(outputPath);
}
catch (Exception ex)
{
return ConversionResult.Failed(ex.Message);
}
}
Request:
Could you please advise what further steps or configuration I need to successfully convert PPT to PDF on Amazon Linux 2 using Aspose.Slides.NET 24.8.0 with .NET Core 3.1? Are there any known issues or workarounds specific to this setup?
Thank you for your assistance.