Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri May 16, 2025 9:49 am

With Spire.PDF.Cpp.10.7.3,

Spire::Pdf::ImageFormat and Spire::Pdf::Image are missing in Spire.pdf.o.h .

After including manualy, when we try using them we have "unresolved external symbol" (ex : public: virtual int __cdecl Spire::Pdf::ImageFormat::GetHashCode(void)" (?GetHashCode@ImageFormat@Pdf@Spire@@UEAAHXZ))

Previously we used Spire.PDF.Cpp.9.12.0.

One of our code is :
Code: Select all
for (const auto& pImage : pPage->ExtractImages())
   {
../...
       pImage->Save(pStreamImage, pImageFormat);
}


And ExtractImages() was replace by GetImagesInfo() in 10.7.3

JeromeSIMAX
 
Posts: 3
Joined: Tue Jun 06, 2023 3:04 pm

Fri May 16, 2025 10:53 am

Hi,

Thanks for your inquiry.
In the new version, we have upgraded the interfaces related to images. Please use the following code to extract images from PDF. If there is any question, please feel free to write back.
Code: Select all
std::vector<intrusive_ptr<PdfImageInfo>> imageInfo = page->GetImagesInfo();
intrusive_ptr<Stream> imgStream = imageInfo[0]->GetImage();

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Mon May 19, 2025 7:15 am

I have tried that,

How do I save the Stream after with de right Format ?

If I use Pdf::ImageFormat or Pdf::Image, I have a link error.

JeromeSIMAX
 
Posts: 3
Joined: Tue Jun 06, 2023 3:04 pm

Mon May 19, 2025 10:31 am

Hi,

Thanks for your feedback.
Sorry currently the Save method does not provide an overload that accepts an image type enumeration. I’ve already submitted this request to our dev team, and we plan to add an overload for specifying image types in the future. I’ll notify you as soon as the feature becomes available.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Mon May 19, 2025 12:08 pm

The class Pdf::Image have this method.

Why did you remove this without notice ?
Same with the new method name...

JeromeSIMAX
 
Posts: 3
Joined: Tue Jun 06, 2023 3:04 pm

Tue May 20, 2025 3:08 am

Hi,

This API adjustment takes effect from version 10.7.0. We have already updated the usage in the sample Demos, and the official documentation will be revised shortly. We sincerely apologize for any inconvenience caused by the lack of prior notice.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.PDF

cron