Convert PPT to SVG using Microsoft Office 2010 PIA

I am trying to convert a powerpoint presentation to split svg files (1 for each slide), can this be done using Microsoft Office 2010 PIA?

If so, is there a tutorial on using Microsoft Office 2010 PIA in Java?

+8
ms-office svg powerpoint office-pia
source share
5 answers

There are no built-in automatic converters that I know of, but I managed to save each individual slide in PDF format in Powerpoint, and then open the PDF file in Inkscape and save it as SVG. Exporting Powerpoint PDF and importing Inkscape PDF is pretty complex and yields good results, and SVG is the Inkscape preservation format, but some settings for the imported PDF in Inkscape may be required to play certain elements in the original.

It may have changed that I have Adobe Acrobat installed, but I didn’t use the Save As Adobe PDF plugin, just the usual Save As dialog. Using Save As Adobe PDF has led to fewer results.

+11
source share

I had the best success for exporting as an extended Windows metafile (.emf) that Inkscape can also read.

It was "better" because when I tried to import the exported PDF, Inkscape created files with a lot of images. The imported SVG XML also seemed cleaner.

+5
source share

This is how I do it (without Office PIA).

  • Run a macro to split PPTX into as many PDF files as slides in your presentation.
  • Use inkscape to convert every PDF to SVG

VBA macro

Sub ExportAllSlidesInPDF() Dim SourceView, answer As Integer Dim SourceSlides, NumPres, x As Long Dim ThisSlideFileNamePDF As String NumPres = Presentations.Count If NumPres = 0 Then MsgBox "No Presentation Open", vbCritical, vbOKOnly, "No Presentations Open" End If SourceView = ActiveWindow.ViewType SourceSlides = ActivePresentation.Slides.Count For x = 1 To SourceSlides Presentations.Add With ActivePresentation.PageSetup .SlideHeight = Presentations(1).PageSetup.SlideHeight .SlideWidth = Presentations(1).PageSetup.SlideWidth End With If ActiveWindow.ViewType <> ppViewSlide Then ActiveWindow.ViewType = ppViewSlide End If Presentations(1).Windows(1).Activate If ActiveWindow.ViewType <> ppViewSlideSorter Then ActiveWindow.ViewType = ppViewSlideSorter End If ActivePresentation.Slides.Range(Array(x)).Select ActiveWindow.Selection.Copy Presentations(2).Windows(1).Activate If ActiveWindow.ViewType <> ppViewSlide Then ActiveWindow.ViewType = ppViewSlide End If ActiveWindow.View.Paste ActiveWindow.Selection.Unselect ThisSlideFileNamePDF = "Slide_" & x & ".pdf" ActivePresentation.SaveAs ThisSlideFileNamePDF, ppSaveAsPDF ActivePresentation.Close Presentations(1).Windows(1).Activate Next x ActiveWindow.ViewType = SourceView End Sub 

This can be improved (for example, dialogs, more controls, add as an add-on), but here it is in principle.

step inkscape

Single liner for Linux:

 for file in *.pdf; do inkscape --without-gui "--file=$file" "--export-plain-svg=${file%%.*}.svg"; done 
+1
source share

It will be quite difficult, there is no direct way to do it afaik (please correct me if I am wrong!) - the easiest way would be to print to XPS and then convert XAML (XPS ==) XAML + Zip file) to an SVG file; it's not easy or simple, but the mapping between XAML => SVG is probably much closer.

0
source share

This is not the smoothest translation, but check the pptx4j docx4j component to display most elements in SVG: http://dev.plutext.org/svn/docx4j/trunk/docx4j/src/pptx4j/java/org/pptx4j/samples/RenderAsSvgInHtml .java

0
source share

All Articles