Generating PPT going beyond the slide Height and Width


#1

We are trying to generate PPT from the generating Content, we thought lets first generate a HTML file and then generate the PPT from that HTML.

I am able to generate the PPT from the HTML , but the content going beyond the Slides , Is there any features there in the Aspose so that during generating the PPT it will automatically fit the content based on the content, means suppose I have a small content which will generate PPT with two slides and if content is large then it will create 3-4 sliding PPT.

Please let me know if any additional information you require or not.


#2

@subratamettle,

Can you please share source file along with generated result and sample code so that we may further investigate to help you out.


#3

Examples.zip (38.9 KB)

PFA


#4

@subratamettle,

I have worked with the sample code shared by you. You are in fact missing setting TextAutofitType. Please try adding following statement on your end.

    ashp.getTextFrame().getParagraphs().addFromHtml(content);
    // Remove any fill formatting in the shape

   ashp.getTextFrame().getTextFrameFormat().setAutofitType((byte)TextAutofitType.Normal);

#5

Great @mudassir.fayyaz !!!

It’s working for me. Thanks !!!

=============== **** =========================================================

I have another query, now in my code I have used only one slide hence it’s trying to fit within that only.

Is there any predefined options there where same content will be adjusted with multiple Slides based on the contents length ? I mean suppose the same example content having few more text on that time it will be not good to fit that text into the same slide , it should be adjusted with the new slide.


#6

Hi @mudassir.fayyaz / @Adnan.Ahmad,

Adding more observation .

I am trying to generate one single PPT with a Paragraph data, one tabular and Text with Image data, I am generating the ppt directly from the HTML file.

I have mentioned below question :

  1. How I can generate multiple Slides within a single PPT, currently the way I am generating the slides which is not the proper way but how I can generate for this.

  2. I am able to generate HTML file content to slide data but for Table tag and Image tag it’s not working, PFA generated PPT where we can see Table data not showing in tabular format and in one slide Image is not appearing .

Please suggest me for this.

Thanks and Regards,
SubrataExamples.zip (137.2 KB)


#7

@subratamettle,

I have observed your following queries.

There is no automatic approach to perform this. You need to develop your own approach in this regard by importing HTML in Autoshape text frame. Then you need to check the height of the shape. If it is exceeding the slide height then you need to add new slide and import HTML to new slide Autoshape.

I regret to share that at present only HTML text import is supported in AutoShape TextFrame. The support for HTML table tags is not available in API. An issue with ID SLIDESNET-37059 has already been added as new feature request to provide this requested support in API. This thread has been linked with the issue so that you may be notified once the support will be available.


#8

Hi @mudassir.fayyaz what’s about the Image within the PPT which I am trying to convert from HTML?


#9

@subratamettle

I like to inform that we can only export text of the presentation for now. We have already created new feature request for you and ticket has been shared with you as well.


#10

Thanks @Adnan.Ahmad / @mudassir.fayyaz for opening the SLIDESNET-37059 ticket , but please ask the technical team to consider Table and Image within the slide during converting from the HTML.

Also please let us know the date by when we will have the solution.

Many Thanks for all your supports and quick response.


#11

@subratamettle,

I like to inform as per our company policy, the first priority for investigation is given to the Paid Support i.e. Enterprise and Priority Support on first come first serve basis. After that the issues from normal support forum are scheduled for investigation on first come first serve basis. I request for your patience. The ETA for this issue is not earlier than Q1’20.