I’m converting PPTX to HTML slide by Slide where after rendering the image Id is not the same Image ID that PPTX Image.
In PPTX its coming as Picture 1 as Id whereas in Html its automatically named as page1-pic1
I’m trying to compare both HTML and PPTX and
When trying to compare the two image Ids they are different and the Id which is present in HTML not present in PPTX or changed number
I need to align the PPTX Image Id with HTML Id so that Image manipulation can be done as business logic
I’m using .Net Core Web Api 8.0 and C#
Any code/link to documentation would be helpful
@Uddipto,
Thank you for describing the issue. I need some time to check the issue. I will get back to you as soon as possible.
I’m using Aspose.Total.lic 24.6 and tried to use ImageIdPreservationController : IHtmlFormattingController
but unfortunately nothing seems to be working
For each image The output of individual image in html is coming
@Uddipto,
Thank you for your patience. I’ve reproduced the problem with image IDs when converting presentations with images to HTML documents.
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): SLIDESNET-44956
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 update for me?
@Uddipto,
The issue is still open. Unfortunately, I don’t have any additional information yet. Thank you for your patience.
my Question
- Is there any method exposed to override Aspose uses internal picture indexing?
- To map picture ID in HTML content to shape in code i.e. shape is IPictureFrame pictureFrame where shape.UniqueId is coming 0 but Shape.Name has value and in browser there is a value in xlink:href under use tag.
- Example I have 5 pictures in one slide
if a loop pictures are identified
but in browser the xlink:href gets changed and the #pageX-picY gets changed.
Any estimated time for response?
@Uddipto,
I’m afraid I don’t yet have an estimated timeframe from the developers. As soon as I have any information, I’ll share it here. Thank you for your understanding.
@Uddipto,
Our developers have investigated the issue. Please try using ISvgShapeFormattingController. The following code example shows how to do this:
var htmlOptions = new HtmlOptions()
{
HtmlFormatter = HtmlFormatter.CreateCustomFormatter(new CustomHtmlController())
};
using var presentation = new Presentation("sample.pptx");
presentation.Save("output.html", SaveFormat.Html, htmlOptions);
public class CustomHtmlController : ISvgShapeFormattingController, IHtmlFormattingController
{
public void FormatShape(ISvgShape svgShape, IShape shape)
{
svgShape.Id = string.Format("shape-{0}", shape.Name);
}
public void WriteDocumentEnd(IHtmlGenerator generator, IPresentation presentation) { }
public void WriteDocumentStart(IHtmlGenerator generator, IPresentation presentation) { }
public void WriteShapeEnd(IHtmlGenerator generator, IShape shape) { }
public void WriteShapeStart(IHtmlGenerator generator, IShape shape) { }
public void WriteSlideEnd(IHtmlGenerator generator, ISlide slide) { }
public void WriteSlideStart(IHtmlGenerator generator, ISlide slide) { }
}
shape_id.png (11.8 KB)