Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / February 2007

Tip: Looking for answers? Try searching our database.

Problem exporting powerpoint slides to jpg

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cubaman - 15 Feb 2007 11:19 GMT
Hello:
I'm currently exporting a powerpoint presentation to jpg. It works
fine till there is a graph object embed in the presentation. In this
case the resulting image apears as a white empty image. The code i'm
using is as follows:

Private Shared Sub ConvertToImageInternal(ByVal params As Object)
       Dim paramList As Object() = CType(params, Object())
       Dim inPath As String = paramList(0)
       Dim outPath As String = paramList(1)
       Dim powerPointApp As Application = New Application()
       Dim presentation As Presentation = Nothing
       Try
           presentation = powerPointApp.Presentations.Open(inPath, _

MsoTriState.msoTrue, _

MsoTriState.msoFalse, _

MsoTriState.msoFalse)
           presentation.SaveAs(outPath, _
                               PpSaveAsFileType.ppSaveAsJPG, _
                               MsoTriState.msoCTrue)
           presentation.Close()
           powerPointApp.Quit()
       Finally
           GC.Collect()
           GC.WaitForPendingFinalizers()
           If Not presentation Is Nothing Then
               Marshal.FinalReleaseComObject(presentation)
               presentation = Nothing
           End If
           If Not powerPointApp Is Nothing Then
               Marshal.FinalReleaseComObject(powerPointApp)
               powerPointApp = Nothing
           End If
       End Try

If i export the same slides using PowerPoint app in normal way, it
just works fine. Any sugestion on how to correctly export the images?
Thanks!
layos - 15 Feb 2007 11:39 GMT
> If i export the same slides using PowerPoint app in normal way, it
> just works fine. Any sugestion on how to correctly export the images?

try to look if the jpg output file contains 3 or 4 channel (if you
have alpha channel, browsers can't display).

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.