none
Conversion PPT to PDF show strange graphic RRS feed

  • Question

  •  Hello experts,
    my vb-program has difficulties to convert a ppt-file into pdf. This happens only when I have chosen the graphic format of "EnhancedMetafile".In my program I copy a slide to the Clipboard and then paste it special back as "EnhancedMetafile" format. When these pages are converted to pdf, graphics are strange.

      Correct graphic!

    Wrong graphic!

    Other formats like JPG, PNG or Bitmap show correct results.

    The code snippets for paste and saveas look like following:

    If PicForm = "EnhancedMetafile" Then             
                pptPres.Slides(n).Shapes.PasteSpecial(PpPasteDataType.ppPasteEnhancedMetafile)
            End If
    
    
    
    pptPres.SaveAs(SaveName, PpSaveAsFileType.ppSaveAsPDF)    
    Any idea what causes this effect? I tried several .net-versions up to 4.5.1 - all the same.

    Would be fine if someone could help!

    Regards

    Hans

    Friday, August 14, 2015 5:57 PM

Answers

  • Hello Cindy,

    that's a cool hint! I'll do that!

    So I think I should mark this thread as answered and move with my question over to the place you pointed out!

    Thanks a lot for your help

    Regards

    Hans

    • Marked as answer by HGVS Tuesday, August 18, 2015 5:55 PM
    Tuesday, August 18, 2015 5:54 PM

All replies

  • Hi Hans,

    Based on the another post in VB forum, it seems that the issue was resolved:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/0804e0ed-8e79-4d67-8801-02e1f088321c/conversion-ppt-to-pdf-show-strange-graphic?forum=vbgeneral#f629550e-4ba7-4d81-91c3-177541f34ed5

    If you still have the issue, please let us know.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, August 17, 2015 8:51 AM
    Moderator
  • Hello Fei,

    no, the issue is still open!

    I unfortunately caused the confusion by placing my question at the wrong place (C#). I thought with putting the status "Marked as answered" this post will then disappear. I have then unfortunately put the current thread in the correct forum (I hope). Now I'm stuck with two similar threads everybody seems to believe it it solved already.

    I have written a feedback to MS to give users the possibility to correct such formal errors. Haven't got any reaction yet. Not for my problem nor to the issue itself:

    Hope that some moderators - which I think they should exist - take care of my problems.

    Best Regards

    Hans

    Monday, August 17, 2015 9:45 AM
  • Hi Hans,

    I am trying to reproduce this issue however failed. Here are the test steps:
    1. copy the shape in a slide

    2. past the shape by passing the parameter ppPasteEnhancedMetafile like code below via VBA:

    Application.ActivePresentation.Slides(1).Shapes.PasteSpecial ppPasteEnhancedMetafile

    3. Save the presentation as pdf, the shape looks as the same as in the presentation

    Did the picture looks well when you save it in presentation? Or did it also works correctly when you save the presentation into PDF by manually?

    In addition, a sample to help us reproduce this issue is appreciated.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, August 18, 2015 6:39 AM
    Moderator
  • Hello Fei,

    thanks for your answer!

    When I save the copied slides as ppt or pptx, the graphics show up correctly. Only the step toward pdf shows the strange results.

    Have not tried to convert manually yet.

    To me this seems to be a problem of a .dll that organizes the conversion (in VB). Maybe the build-in PowerPoint ppt-to-pdf converter uses a different kind of program (or dll) to achieve this. No idea.

    Will try to convert it manually as well. Let you know the results.

    Regards

    Hans

    Tuesday, August 18, 2015 9:26 AM
  • Hello Fei,

    had the chance to try a manual conversion from pptx to pdf (without my VB-Program).

    Result: same thing. The graphics show the black background.

    Regards

    Hans

    Tuesday, August 18, 2015 11:07 AM
  • Hi Hans

    <<had the chance to try a manual conversion from pptx to pdf (without my VB-Program).

    Result: same thing. The graphics show the black background>>

    In that case, this is an issue with the application, not with the object model. The best place to get help with what might be going on would be a PowerPoint end-user forum. If you can solve it there, it should work programmatically, too. Most of the application specialists I know (including the programmers) hang out here:

    http://answers.microsoft.com/en-us/office/forum/powerpoint


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, August 18, 2015 4:32 PM
    Moderator
  • Hello Cindy,

    that's a cool hint! I'll do that!

    So I think I should mark this thread as answered and move with my question over to the place you pointed out!

    Thanks a lot for your help

    Regards

    Hans

    • Marked as answer by HGVS Tuesday, August 18, 2015 5:55 PM
    Tuesday, August 18, 2015 5:54 PM