简体   繁体   English

Power-point 2013 使用 pdfcrop 导出到乳胶

[英]Power-point 2013 export to latex with pdfcrop

I have a powerpoint presentation with ~ 100 slides.我有一个大约 100 张幻灯片的 PowerPoint 演示文稿。

Each slide has a figure.每张幻灯片都有一个数字。 I edit each slide [work on each figure] and then save each slide separately as in pdf format.我编辑每张幻灯片 [在每个图形上工作],然后将每张幻灯片分别保存为 pdf 格式。

I crop every pdf separately in adobe acrobat to remove whitespace and some other slide elements I don't want to go in final figure.我在 adobe acrobat 中分别裁剪每个 pdf 以删除空格和其他一些我不想在最终图中显示的幻灯片元素。 Then I include this pdf in Texmaker as a figure, for my latex document.然后我在 Texmaker 中将此 pdf 作为图形包含在我的乳胶文档中。 This process is highly inefficient.这个过程是非常低效的。

Please suggest some ways I can automate this process partially or completely.请建议我可以部分或完全自动化此过程的一些方法。

I tried recording macro in powerpoint to automate at least saving the current slide as pdf part, but it opens a vba window on clicking define macro through developer's tab and I have no knowledge of vba scripting.我尝试在 powerpoint 中录制宏以自动至少将当前幻灯片另存为 pdf 部分,但它会在通过开发人员选项卡单击定义宏时打开一个 vba 窗口,而我不了解 vba 脚本。

Thanks.谢谢。

Is there a reason for exporting as PDF instead of a raster format such as JPG or PNG?是否有理由导出为 PDF 而不是 JPG 或 PNG 等光栅格式? There are some open source solutions that could be called from VBA to crop those image formats.有一些开源解决方案可以从 VBA 调用来裁剪这些图像格式。 If you need PDF, then this macro will do what you need:如果您需要 PDF,那么此宏将满足您的需求:

Option Explicit

' *********************************************************
' Purpose : PowerPoint VBA macro to export slides as either
'           and image or a PDF.
' Author  : Jamie Garroch from htpp://youpresent.co.uk/
' Date    : 17MAY2016
' *********************************************************
Sub ExportEachSlidesAsPDF()
  Const myPath = "C:\Temp\"
  Dim oSld As Slide
  For Each oSld In ActivePresentation.Slides
    ' The next commented line exports the slide as a JPG
    'oSld.Export myPath & ActivePresentation.Name & " Slide " & oSld.SlideIndex & ".jpg", "JPG"

    ' Export each slide as a PDF
    With ActivePresentation
      .PrintOptions.Ranges.ClearAll
      .PrintOptions.Ranges.Add oSld.SlideIndex, oSld.SlideIndex
      .ExportAsFixedFormat2 Path:=myPath & ActivePresentation.Name & " Slide " & oSld.SlideIndex & ".pdf", _
        FixedFormatType:=ppFixedFormatTypePDF, _
        Intent:=ppFixedFormatIntentPrint, _
        FrameSlides:=msoFalse, _
        HandoutOrder:=ppPrintHandoutHorizontalFirst, _
        OutputType:=ppPrintOutputSlides, _
        PrintHiddenSlides:=msoFalse, _
        PrintRange:=.PrintOptions.Ranges(1), _
        RangeType:=ppPrintSlideRange
    End With
  Next
End Sub

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM