Images got merged

while converting pdf to HTML two images got merged

@Mrunal07

Please share your sample PDF document along with the sample code snippet with us. We will test the scenario in our environment and address it accordingly.

Hi Asad,
Please find the attached PDF and below is the code which i am using to convert pdf to html,
Expected output should be we need 4 images but it is extracting only 3 images(2 images got merged in single image)

Document pdfDocument = new Document(pdfStream);
Random random = new Random();
DocumentInfo documentInfo = pdfDocument.Info;

// Create an instance of HtmlImageSavingOptions and configure it
// HtmlImageSavingOptions imageSavingOptions = new HtmlImageSavingOptions();
// imageSavingOptions.ImageSavingCallback = new ImageSavingCallback();

var htmlOptions = new HtmlSaveOptions
{
    ConvertMarkedContentToLayers = true,
    FixedLayout = true,
    
    // ImageSavingOptions = imageSavingOptions,
    SpecialFolderForAllImages = ImagesFolderPath,
    // SpecialFolderForSvgImages = SVGImagesFolderPath,
    SaveShadowedTextsAsTransparentTexts = true,
    // RasterImagesSavingMode = RasterImagesSavingModes.AsExternalPngFilesReferencedViaSvg,
    RasterImagesSavingMode = RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground,
    FontSavingMode = FontSavingModes.SaveInAllFormats,
    // AntialiasingProcessing = AntialiasingProcessingType.TryCorrectResultHtml,
};

string Output = Path.Combine(OutputFolderPath, htmlFileName);

pdfDocument.Save(Output, htmlOptions);

Regards,
Mrunal

gsk-Shingrix-boximg.pdf (79 KB)

@Mrunal07

We are checking it and will get back to you shortly.

Any update on this?

@Mrunal07

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): PDFNET-55393

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.

Is there any updates on above issue?

@Mrunal07

The ticket has recently been logged in our issue tracking system and it is pending for investigation. We will analyze and resolve it on first come first serve basis. We will keep you updated on the progress and resolution of your issue through this forum thread. We kindly request your patience and cooperation. Please accept our sincere apologies for any inconvenience caused.

@Mrunal07

The cause of the error has been found. Both pictures are on the backing layer.

In Adobe Acrobat, you can move the central image forward through the context menu. In this case, the conversion results in 4 images as per your expectations.

Can this option satisfy your needs?

Currently, there are no convenient tools for setting up image processing in such a situation.