Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Tue May 04, 2021 10:21 am

I am appending a slide form one presentation to another (same presentations actually).

2 issues:
1. scale of the slide and shapes is lost
2. table shapes have lost some of their formatting (border lines were disabled but are enabled in the appended slide)

Image below shows what the slide looks like originally on the left and what the slide looks like after its appended to the same presentation.

I've also attached the input presentation and output presentation.

I have a feeling that this problem is somehow linked to google slides. I believe the input presentation was generated from google slides.

majeed_s
 
Posts: 70
Joined: Thu Mar 25, 2021 4:13 pm

Wed May 05, 2021 4:19 am

Hi,

Thanks for your inquiry.
I tested your PowerPoint file and found the table formatting issue (border lines were enabled). This issue has been logged into our bug tracking system with the ticket number SPIREPPT-1555. once it is resolved, I will inform you immediately. Sorry for the inconvenience caused.
To avoid the scale issue, please set the slide size as the original's. See the code below.
Code: Select all
Presentation presentation = new Presentation();
presentation.Slides.RemoveAt(0);
Presentation presentationSource = new Presentation();
presentationSource.LoadFromFile(@"Example Slides.pptx");
//Set the slide size as original's
presentation.SlideSize.Size = presentationSource.SlideSize.Size;
foreach (ISlide slide in presentationSource.Slides)
{
    //Copy the slide
    presentation.Slides.Append(slide);
}
presentation.SaveToFile("result.pptx", FileFormat.Pptx2013);

Sincerely,
Nina
E-iceblue support team
User avatar

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

Wed May 12, 2021 6:18 pm

Hello,
Unfortunately it doesn't work for me.

I added also these lines below but new presentation width is set correctly but height is wrong.

Is there any other options to set ? Or what can i do to fix this issue.
Thanks,

presentation.SlideSize.Size = presentationSource.SlideSize.Size;
presentation.SlideSize.Type = presentationSource.SlideSize.Type;
presentation.SlideSize.Size = presentationSource.SlideSize.Size;
presentation.SlideSize.SizeOfPx = presentationSource.SlideSize.SizeOfPx;
presentation.SlideSize.Orientation = presentationSource.SlideSize.Orientation;

omurertanis
 
Posts: 22
Joined: Tue Mar 30, 2021 7:56 pm

Thu May 13, 2021 3:36 am

Hello,

Thanks for your inquiry.
I simulated a ppt file and did an initial test with the latest Spire.Presentation Pack Hotfix Version:6.4.5, but I did not reproduce your issue. If you are using an older version, please download the latest version and try it again.
If there are still any issues, to help us investigate further, please provide your input file. You can upload your file here or send it to us (support@e-iceblue.com) via email. Thanks in advance.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Thu May 13, 2021 6:38 am

Hello,
Thank you for your respone. I'm using FreeSpire.Presentation - 4.11.0. It is the latest version at the NuGet repository.
I handled to set width and height with that line.
Code: Select all
presentation.SlideSize.Size = new SizeF(templatePresentation.SlideSize.Size.Width, templatePresentation.SlideSize.Size.Height);



But cloned presentation height doesn't set correctly. And maybe for that reason i have scale issues. Also if i changed the height at cloned presentation scale problem doesn't fix.
When i debug the code i saw that cloned presentation SlideSize.Size set correctly.
I added screenshots below. I also uploaded master-source presentation pptx file.

My Code:
Code: Select all
Spire.Presentation.Presentation presentation = new Spire.Presentation.Presentation();
presentation.Slides.RemoveAt(0);

presentation.SlideSize.Type = templatePresentation.SlideSize.Type;
presentation.SlideSize.Size = new SizeF(templatePresentation.SlideSize.Size.Width, templatePresentation.SlideSize.Size.Height);
presentation.SlideSize.SizeOfPx = new SizeF(templatePresentation.SlideSize.SizeOfPx.Width, templatePresentation.SlideSize.SizeOfPx.Height);
presentation.SlideSize.Orientation = templatePresentation.SlideSize.Orientation;

omurertanis
 
Posts: 22
Joined: Tue Mar 30, 2021 7:56 pm

Thu May 13, 2021 9:11 am

Hello,

Thanks for your sharing.
I tested your case with the FreeSpire.Presentation v4.11.0, but I still did not reproduce your issue. Here I uploaded my test project, please run it directly on your side to see if the issue still occurs.
If this issue only occurs in your project, please provide it to help us reproduce your issue. Thanks in advance.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Fri May 14, 2021 6:08 pm

Thank you very much for your support Brian.
I don't know what changed but i closed my solution and everything re try it and it worked for me too.

omurertanis
 
Posts: 22
Joined: Tue Mar 30, 2021 7:56 pm

Mon May 17, 2021 1:22 am

You are welcome.
I am glad to hear that your problem has been solved.
If you encounter any issues related to our products in the future, please feel free to contact us.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Wed Jun 09, 2021 11:15 am

Dear Majeed,

Thanks for your patient waiting.
The reported issue SPIREPPT-1555 has been resolved, welcome to download the release version (Spire.Presentation Pack Version:6.6) from the following link.
Website download link: https://www.e-iceblue.com/Download/download-presentation-for-net-now.html
Nuget download link: https://www.nuget.org/packages/Spire.Presentation/6.6.0

Sincerely,
Nina
E-iceblue support team
User avatar

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

Wed Jun 09, 2021 12:30 pm

Hi Nina,

What was resolved exactly? The borders around the tables?

majeed_s
 
Posts: 70
Joined: Thu Mar 25, 2021 4:13 pm

Thu Jun 10, 2021 10:59 am

Hi Majeed,

Yes, it fixes the table formatting issue (border lines were enabled), please hava a try. Any feedback after testing will be greatly appreciated.

Sincerely,
Nina
E-iceblue support team
User avatar

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

Return to Spire.Presentation

cron