Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Feb 09, 2021 7:13 am

Hi Team,

I am getting error while doing ppt.Slides[0].Shapes.AppendVideoMedia(myfileBloburl, new RectangleF(505,253,240,140)); And the error is as below:
The filename, directory name, or volume label syntax is incorrect. : 'C:\\<solutionpath>\\<myfileBloburl>'


Thanks in advance for your support.
Here is my code.

string blobFileUrl = bloburl (Eg: http://dummyrul.com//dummyFolder//dummyVideo.mp4)

Presentation ppt = new Presentation();
ppt.LoadFromStream(streamUrl, FileFormat.Pptx2013);
ISlide slide = ppt.Slides[0];
ppt.Slides[0].Shapes.AppendVideoMedia(blobFileUrl, new RectangleF(505,253,240,140));

- Here, when calling .AppendVideoMedia method, i'm getting error as 'The filename, directory name, or volume label syntax is incorrect. : 'C:\\<solutionpath>\\<destinationPath>'

saleembaigmirza
 
Posts: 21
Joined: Fri Nov 13, 2020 4:15 pm

Tue Feb 09, 2021 8:01 am

By mistake, i posted this in Spire.PDF blog.
As it is related to Spire.Presentation, so i posted the same in Spire.Presenstation blog as well. Please help me out if there is any solution for the above query.

saleembaigmirza
 
Posts: 21
Joined: Fri Nov 13, 2020 4:15 pm

Tue Feb 09, 2021 8:39 am

Hello,

Thanks for your inquiry.
Sorry that our Spire.Presentation supports appending local video files, but does not support appending online video files.
Please download your video file first, and then use our Spire.Presentation to append it to the PPT file, like the code below.
Code: Select all
            string blobFileUrl = "http://dummyrul.com//dummyFolder//dummyVideo.mp4";
            string localPath = "video.mp4";
            WebClient webClient = new WebClient();
            webClient.DownloadFile(blobFileUrl, localPath);
            Presentation ppt = new Presentation();
            ppt.LoadFromStream(streamUrl, FileFormat.Pptx2013);
            ISlide slide = ppt.Slides[0];
            ppt.Slides[0].Shapes.AppendVideoMedia(localPath, new RectangleF(505, 253, 240, 140));
            ppt.SaveToFile("result.pptx",FileFormat.Pptx2013);



Sincerely,
Brian
E-iceblue support team
User avatar

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

Tue Feb 09, 2021 8:52 am

Hi Brian,
Thanks for your quick response.

As our application is hosted in Azure App services, So, in Production it doesn't allow me to add/edit files in project folder at run time dynamically.
Hence i cant create a local folder path at run time.

Any other suggestions/help would be appreciated.

saleembaigmirza
 
Posts: 21
Joined: Fri Nov 13, 2020 4:15 pm

Tue Feb 09, 2021 9:50 am

Hello,

Thanks for your response.
Sorry that our Spire.Presentation currently only supports adding local video files. But we will consider adding a method “public IAudio AppendVideoMedia(Stream stream, RectangleF rectangle);” to support appending video via stream. Then you can add the video like the following code. Once it is implemented, we will let you know.

Code: Select all
            WebClient webClient = new WebClient();
            byte[] bytes = webClient.DownloadData(blobFileUrl);
            MemoryStream stream = new MemoryStream(bytes);

            Presentation ppt = new Presentation();
            ppt.LoadFromFile("test.pptx", FileFormat.Pptx2013);
            ISlide slide = ppt.Slides[0];

            //public IAudio AppendVideoMedia(Stream stream, RectangleF rectangle);
            ppt.Slides[0].Shapes.AppendVideoMedia(stream, new RectangleF(505, 253, 240, 140));
            ppt.SaveToFile("result.pptx", FileFormat.Pptx2013);


Sincerely,
Brian
E-iceblue support team
User avatar

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

Tue Feb 09, 2021 10:07 am

Hi Brian,
Thanks for your response.

Will be waiting for your reply.

saleembaigmirza
 
Posts: 21
Joined: Fri Nov 13, 2020 4:15 pm

Fri Apr 30, 2021 9:51 am

Hello,

Greetings from E-iceblue!
Glad to inform you that we just released Spire.Presentation Pack Hotfix Version:6.4.5 which supports adding videos from stream, please refer to the following code to meet your requirements. Looking forward to your test result.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.Presentation/6.4.5
Code: Select all
AppendVideoMedia(Stream stream, RectangleF rectangle);

Sincerely,
Brian
E-iceblue support team
User avatar

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

Fri May 07, 2021 3:50 am

Hello,

Greetings from E-iceblue.
Does this hotfix solve your issue? Could you please give us some feedback at your convenience?

Sincerely,
Brian
E-iceblue support team
User avatar

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

Wed Jun 09, 2021 8:53 am

Hey Brian,

Sorry, until i manually check the status of this ticket, i wont be able to know that there is a new update provided by you.

So, Brian,
I would like to know, does this feature available in Free.Spire.presentation library. As i can see 4.11.0 version.
Happy to hear from you.

saleembaigmirza
 
Posts: 21
Joined: Fri Nov 13, 2020 4:15 pm

Wed Jun 09, 2021 9:51 am

Hello,

Thanks for your feedback.
I am sorry that our Free.Spire.presentation does not support this new feature at the moment. And we only upgrade the free version irregularly. Thus, we recommend you try with our latest commercial version. And we are willing to provide a temporary license (one month free) to help you evaluate our commercial version better and remove the warning message. If interested, please contact our sales team (sales@e-iceblue.com) to get it.

If there are any questions, just 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

Return to Spire.PDF