diff -r cce8365a9d50 -r 8b90d57759c9 tex/ppt_printout_ps.vbs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tex/ppt_printout_ps.vbs Mon Sep 13 03:54:21 2010 +0900 @@ -0,0 +1,41 @@ +Dim filein +Dim fileout +If WScript.Arguments.Count <> 2 then + WScript.quit +End If +filein = WScript.Arguments.item(0) +fileout = WScript.Arguments.item(1) + +Dim pptApp +Dim pptPres +Set pptApp = Wscript.CreateObject("PowerPoint.Application") +pptApp.Visible = True +Set pptPres = pptApp.Presentations.Open(filein) + +With pptPres.PrintOptions + .RangeType = ppPrintAll + .NumberOfCopies = 1 + .PrintHiddenSlides = msoTrue + .PrintColorType = ppPrintColor + .FitToPage = msoFalse + .FrameSlides = msoFalse + .ActivePrinter = "Generic PostScript Writer" + .PrintInBackground = False +End With +pptPres.PrintOut , , fileout + +Dim i +Dim note +For i = 1 To pptPres.Slides.Count + Wscript.StdErr.Write "Processing slide " & i & "... " + note = pptPres.Slides(i).NotesPage.Shapes(2).TextFrame.TextRange + WScript.StdOut.WriteLine note + WScript.StdOut.WriteLine Chr(12) + If InStr(note, "@file=") > 0 Then + pptPres.Slides(i).Export filein & ".tmp_slide" & i & ".png", "PNG" + End If + Wscript.StdErr.WriteLine "done" +Next + +pptPres.Close +