Long String in EMF Image Doesn't Add a Line Break When Printed to PDF

Hi,

Our attached sample EMF image features a table with a column containing an extended string. This string currently adjusts (wraps/breaks) to accommodate the column’s width. However, when we proceed to print this image to PDF with particular settings, we find that it overflows the column width without any breaks.

We use:

auto emfImage = pImpl->presentation->get_Images()->AddImage(System::IO::File::ReadAllBytes(emfPath));
System::SharedPtr<Aspose::Slides::IPictureFrame> picFrame = slide->get_Shapes()->AddPictureFrame(Aspose::Slides::ShapeType::Rectangle, fXPos, fYPos, fWidth, fHeight, emfImage);

with PDF options (We need vector output): auto pdfOptions = System::MakeObject<Aspose::Slides::Export::PdfOptions>(); pdfOptions->set_SaveMetafilesAsPng(false);

Thank You
Long-String-Issue-Samples.zip (41.9 KB)

@ashvek.gaonkar

The problem you are seeing is a known bug in Aspose.Slides for C++ (issue SLIDESCPP‑3975) where text inside an EMF picture is not wrapped when the presentation is exported to PDF with vector output (SaveMetafilesAsPng = false) [2].

The bug was fixed in Aspose.Slides for C++ 25.4. Upgrading the library to version 25.4 (or any later release) resolves the line‑break issue for EMF images during PDF export [2].

What to do

  1. Download/install Aspose.Slides for C++ 25.4 or newer (via NuGet, installer, or the product download page).
  2. Re‑build your project against the new binaries.
  3. Run the same code; the text in the EMF picture will wrap correctly in the generated PDF.

If you continue to see the overflow after upgrading, please provide the exact version you are using and a minimal reproducible sample so we can investigate further.

Sorry I missed. We are currenlty using Aspose.Slides.Cpp version 25.7 and still seeing the issue

@ashvek.gaonkar,
Thank you for contacting free support. I need some time to investigate the issue. I will get back to you as soon as possible.

@ashvek.gaonkar,
I have reproduced the issue where the text is not wrapped correctly when exporting the EMF image from a presentation to PDF. We apologize for any inconvenience caused.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESCPP-4090

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.