2017-05-03 14 views
-3

PDF 마이너 모듈을 사용하여 pdf에서 이미지를 추출하려고합니다. 단일 이미지로 그래프 이미지를 추출하려고하지만 실제로는 전체 그래프 이미지를 반환하지 않습니다. 나는 pdf를 ppt로 변환했다. 그런 다음 수동으로 그래픽 이미지를 단일 이미지로 그룹화 한 다음 다시 pdf로 변환했다. 이제 pdf miner가 그래프 이미지를 단일 이미지로 추출합니다.파워 포인트 이미지를 프로그래밍 방식으로 그룹화하는 방법

수동으로 우리 그룹이 파워 포인트 images.Is 어떤 방식으로 프로그래밍

+0

MS Powerpoint는 말하고 있습니까? 그렇다면 내장 된 VBA를 사용하십시오. 그렇지 않다면 어쩌면 당신이 묻고있는 것을 확장해야합니다. 또한 당신이 시도한 것을 언급하십시오. –

+0

예 MS Powerpint.i에서 내 문제에 대해 설명했습니다. – mani

답변

1

이를 위해 그렇게 할 수 있습니다, 당신은 당신의 모양을 고유하게 식별 할 어떤 조건을 제공 할 수 있어야합니다; 슬라이드의 유일한 그림 모양, 그렇지 않은 빈 슬라이드의 유일한 모양 또는 처음으로 슬라이드의 모양 수를 계산 한 후에 추가 된 모양 일 수 있습니다. 적용 할 수있는 조건을 적용하면 조건을 만족하는 모양의 배열을 만들 수 있습니다. 그룹을 그룹화하면 그룹화 할 수 있습니다.

Sub GroupCertainShapes() 

    Dim x As Long 
    Dim sTemp As String 
    Dim aShapeList() As String 
    Dim lShapeCount As Long 

    With ActivePresentation.Slides(1) 
     ' iterate through all shapes on the slide 
     ' to get a count of shapes that meet our condition 
     For x = 1 To .Shapes.Count 
      ' Does the shape meet our condition? count it. 
      If .Shapes(x).Type = msoAutoShape Then 
       lShapeCount = lShapeCount + 1 
      End If 
     Next 

     ' now we know how many elements to include in our array, 
     ' so redim it: 
     ReDim aShapeList(1 To lShapeCount) 

     ' Reset the shape counter 
     lShapeCount = 0 

     ' Now add the shapes that meet our condition 
     ' to the array: 
     For x = 1 To .Shapes.Count 
      ' apply some criterion for including the shape or not 
      If .Shapes(x).Type = msoAutoShape Then 
       lShapeCount = lShapeCount + 1 
       aShapeList(lShapeCount) = .Shapes(x).Name 
      End If 
     Next 

     ' and finally form a group from the shapes in the array: 
     If UBound(aShapeList) > 0 Then 
      .Shapes.Range(aShapeList).Group 
     End If 

    End With 
End Sub