HTML to PPTX Conversion Using Aspose.Slides for Python - No Styling

Continuing the discussion from HTML to PDF conversion using Aspose.PDF for Java - no images or styling:

Hello Aspose team,
Thank you as always for your support.

I’m encountering similar issues when converting HTML to PPTX using Aspose.Slides for Python. Specifically, the generated PPTX files do not retain any styling or formatting from the original HTML content. Could you please consider improving this functionality in future releases?

On a side note, I’m confident there’s a strong and growing demand for AI-generated PowerPoint use cases, making this enhancement even more valuable.

Thank you!

The html file:

<html>
	<head>
		<style>
		.gauge_background{
			background-repeat: no-repeat;
			width: 398px;
			height: 290px;
			position:relative;
		}
		.gauge_background.red{
			background-color: red;
		}
		.gauge_background.orange{
			background-color: orange;
		}
		.gauge_background.green{
			background-color: green;
		}
		.gauge_text{
			position: absolute;
			top: 148px;
			left: 125px;
			width: 50px;
			height: 30px;
		}
		.gauge_text span{
			color: #E73C3E;
			font-size: 50px;
		}
		.gauge_title{
			text-align: center;
		}
		.gauge_title span{
			color: black;
			font-size: 32px;
		}
		.gauge_trend_arrow{
			background-repeat: no-repeat;
			width: 37px;
			height: 37px;
			top: 160px;
			left: 200px;
			position: absolute;
		}
		.gauge_trend_arrow.red{
			background-image: url('./trend_red.png');
		}
		.gauge_trend_arrow.green{
			background-image: url('./trend_green.png');
		}
		.gauges_container{
			
		}
		.gauge_container{
			display: inline-block;
			position: relative;
			width: 400px;
			height: 330px;
			overflow: hidden;
		}
		.exec_top_div{
			display: grid;
			grid-template-columns: 500px auto;
			grid-columns-gap: 10px;
		}
		.string_container{
			margin-left: 10px;
		}
		</style>
	</head>
	<body>
		<div class="exec_top_div">
			<div class="string_container">
				<b>DESCRIPTION</b>
				<div class="">
					The description bla bla bla bla
				</div>
			</div>
			<div class="gauges_container">
				<div class="gauge_container">
					<div class="gauge_background orange">
						<div class="gauge_text">
							<span>100</span>
						</div>
						<div class="gauge_trend_arrow green"></div>
					</div>
					<div class="gauge_title">
						<span>This is my title</span>
					</div>
				</div>
				<div class="gauge_container">
					<div class="gauge_background red">
						<div class="gauge_text">
							<span>30</span>
						</div>
						<div class="gauge_trend_arrow red"></div>
					</div>
					<div class="gauge_title">
						<span>This is my title 1</span>
					</div>
				</div>
			</div>
		</div>
		
	</body>
</html>

The Python code:

import aspose.slides as slides

with slides.Presentation() as pres:
    with open("foo.html", "rb") as htmlStream:
        pres.slides.add_from_html(htmlStream)

    pres.save("MyPresentation.pptx", slides.export.SaveFormat.PPTX)

@ryota1123,
Thank you for reporting on the issue. I’ve reproduced the problem with missing styles and formatting when importing the HTML document into a PowerPoint presentation. We are sorry that you encountered this problem.

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): SLIDESPYNET-256

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.

@andrey.potapov
Thank you very much for your prompt response, and for creating the issue ticket.
I look forward to the improvements.

Best regards

@ryota1123,
Thank you for using Aspose.Slides. We will notify you as soon as the problem is resolved.