none
Word to pdf using PDF maker in C# RRS feed

  • Question

  • Hello all

    I have a Adobe acrobat and word 2007 installed on my machine, I have set some preferences for pdf security (protected pdf) in 'Word acrobat addin', now I want to create pdf using 'Adobe Pdf maker office com addin' How can I do it using C# ?

    I have tried with ''ExportAsFixedFormat" method of document class but it only convert a doc to pdf and does not create pdf as per given in preferences. I think it uses PDF/XPS addin and create a simple pdf. 

    How can I  create pdf using 'Adobe Pdf maker office com addin' using C#?

    I have attach snap for help

    Adobe word addin

    Please help

    Thanks in advance

    Friday, July 4, 2014 5:41 AM

Answers

  • Hello,

    I'd recommend asking the add-in developers (adobe) whether they provide any public API for doing this programmatically.

    You can access an instance of the add-in using the COMAddins property of the Application class in Word. The Object property of the COMAddIn class returns an object reference to the add-in class where you can call public properties and methods.  For example:

    Dim objBaseObject As Object 
    Set objBaseObject = _ 
     Application.COMAddIns.Item("msodraa9.ShapeSelect").Object

    Also, as a workaround, you may use any .Net components for converting the document into pdf.  In that case you may treat your add-in as a regular .Net based application where you can use various third-party components.


    Friday, July 4, 2014 8:59 AM
  • Hi koolprasad

    As Eugene says, you need to ask in an ADOBE forum about this. This add-in belongs to ADOBE and not Microsoft, so only ADOBE is going to be able to tell you whether the add-in provides you any kind of public interface your code can access. The only PDF conversion available in Word is that provided by ExportAsFixedFormat and that will use only the options provided by Word, not those you set in a third-party (Acrobat) add-in.

    The only possibility would be SendKeys, but that's definitely NOT reliable. In order to see what key presses are required - for YOUR configuration - press Alt on the keyboard then follow the letters that appear over the Ribbon.


    Cindy Meister, VSTO/Word MVP, my blog

    Monday, July 7, 2014 3:50 PM
    Moderator

All replies

  • Hello,

    I'd recommend asking the add-in developers (adobe) whether they provide any public API for doing this programmatically.

    You can access an instance of the add-in using the COMAddins property of the Application class in Word. The Object property of the COMAddIn class returns an object reference to the add-in class where you can call public properties and methods.  For example:

    Dim objBaseObject As Object 
    Set objBaseObject = _ 
     Application.COMAddIns.Item("msodraa9.ShapeSelect").Object

    Also, as a workaround, you may use any .Net components for converting the document into pdf.  In that case you may treat your add-in as a regular .Net based application where you can use various third-party components.


    Friday, July 4, 2014 8:59 AM
  • Thanks for reply Eugene

        Do you any sample code for it ? if yes then please provide

    Thanks

    koolPrasad

    Friday, July 4, 2014 11:17 AM
  • Hi koolprasad

    As Eugene says, you need to ask in an ADOBE forum about this. This add-in belongs to ADOBE and not Microsoft, so only ADOBE is going to be able to tell you whether the add-in provides you any kind of public interface your code can access. The only PDF conversion available in Word is that provided by ExportAsFixedFormat and that will use only the options provided by Word, not those you set in a third-party (Acrobat) add-in.

    The only possibility would be SendKeys, but that's definitely NOT reliable. In order to see what key presses are required - for YOUR configuration - press Alt on the keyboard then follow the letters that appear over the Ribbon.


    Cindy Meister, VSTO/Word MVP, my blog

    Monday, July 7, 2014 3:50 PM
    Moderator