ISlideCollection.AddFromPdf Method Throws System::NullReferenceException

I was trying to convert a PDF to PPTX using this code and it is always throwing Error System::NullReferenceException: Exception of type 'System::NullReferenceException' was thrown. You can see my code in this gist
Regards
Shreos

@shreos.prezentium.com,
Thank you for reporting the issue.
Please check your results using the latest version of Aspose.Slides for C++ if it is possible. If the issue persists, please share and specify the following:

  • input PDF file
  • stack trace of the exception
  • Linux distribution details

I upgraded the Aspose version to latest 22.1 . Result was the same . Incidentally the exporting of PPTX to other formats ( Save) is working fine.
I am using Ubuntu 18.04 , the version of other included is here.
test.pdf (46.6 KB)

 The CXX compiler identification is Clang 6.0.0
 Looking for pthread_create in pthread - found
 Found Threads: TRUE
 Found Boost: /usr/include (found suitable version "1.65.1", minimum required is "1.65.0") found components: coroutine chrono system thread context date_time iostreams filesystem regex atomic
 Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
 Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found suitable version "7.58.0", minimum required is "7.29")
 Found SQLite3: /usr/lib/x86_64-linux-gnu/libsqlite3.so
 Found SQLite3: /usr/lib/x86_64-linux-gnu/libsqlite3.so
 Looking for sqlite3_enable_load_extension in /usr/lib/x86_64-linux-gnu/libsqlite3.so
 Looking for sqlite3_enable_load_extension in /usr/lib/x86_64-linux-gnu/libsqlite3.so - found
 Using libc 2.23 as the platform uses 2.27
 Found ASPOSE: /opt/aspose/CodePorting.Native.Cs2Cpp/include;/opt/aspose/Aspose.Slides.Cpp/include/aspose.slides.cpp

@shreos.prezentium.com,
Thank you for the additional information.
I’ve reproduced the problem with PDF import and added a ticket with ID SLIDESCPP-3361 in our issue tracking system. Our development team will investigate this case. You will be notified when the issue is resolved.

1 Like

The issues you have found earlier (filed as SLIDESCPP-3361) have been fixed in Aspose.Slides for C++ 22.4 (Windows, Linux).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.

Hi:
Thank you .
I tried using this to add a PDF to a PPT.

Case 1: If I use a PDF that is saved from a PPTX mostly it works ok.

Case 2: For standard PDFs generated via Adobe it either gives this error
Error System::NotImplementedException: void System::Drawing::Pen::set_DashCap(Drawing2D::DashCap)

Case 3: OR the generated PPTX dont open directly on MS PPTX , giving this errorScreenshot 2022-04-22 at 12.20.24 AM.jpg (50.2 KB)

@shreos.prezentium.com,
To investigate these cases on our end, please share the following data and information:

  • PDF files
  • PowerPoint version showing the message

arts.pdf (1.1 MB)
Screenshot 2022-04-22 at 10.44.02 AM.png (8.2 KB)
Regards
Shreos

@shreos.prezentium.com,
Thank you for the sample PDF file. I’ve reproduced the NotImplementedException error and added a ticket with ID SLIDESCPP-3452 to our issue tracking system. We apologize for any inconvenience. Our development team will investigate this case. You will be notified when the issue is resolved.

Could you please also share the PDF file and output PPTX file for the Case 3?

The issues you have found earlier (filed as SLIDESCPP-3452) have been fixed in Aspose.Slides for C++ 22.6 (Windows, Linux, macOS).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.