How can I call Doc2Any SDK from 64bit EXE application? Can you help us to provide the 64bit DOC to Any Converter SDK?

How can I call Doc2Any SDK from 64bit EXE application? can help us to provide the 64bit DOC to Any Converter SDK?

Customer
------------------------------------

image

https://www.verydoc.com/doc-to-any.html
https://www.verydoc.com/doc2any_sdk.zip

You can call Doc2Any SDK from 64bit application by doc2anyCom.exe COM interface, you may run a cmd window by administrator privilege, and run following command line to register the COM Component,

doc2anyCom.exe /regserver

After you register doc2anyCom.exe successful, you can call it from 64bit application to convert office files to PDF files, please refer to a simple VBScript source code at below,
--------------------------------------------------------
Set fso = CreateObject("Scripting.FileSystemObject")
strInFile = "D:\downloads\verypdf.doc"
strOutFile = "D:\downloads\out.pdf"
strCmd = "-$ XXXX-XXXX-XXXX-XXXX -ownerpwd 123 -keylen 2 -encryption 3900 " & """" & strInFile & """ """ & strOutFile & """"

msgbox strCmd

set VeryPDFCom = CreateObject("VeryPDF.doc2anyCom")
strReturn = VeryPDFCom.doc2any(strCmd)
msgbox "Processing finished."
--------------------------------------------------------
You can also call doc2anyCom.exe COM from 64bit C# application by following source code,

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using VeryPDF;
using System.IO;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string appPath = Path.GetDirectoryName(Application.ExecutablePath);
            string strInFile = "D:\\downloads\\verypdf.doc";
            string strOutFile = "D:\\downloads\\_test_out.pdf";

            string strCmd = "-$ XXXX-XXXX-XXXX-XXXX -ownerpwd 123
                       -keylen 2 -encryption 3900";
            strCmd += " \"" + strInFile + "\" \"" + strOutFile + "\"";
            MessageBox.Show(strCmd);

            System.Type VeryPDFType = System.Type.GetTypeFromProgID
                        ("VeryPDF.doc2anyCom");
            VeryPDF.doc2anyCom VeryPDFCom = (VeryPDF.doc2anyCom)
                        System.Activator.CreateInstance(VeryPDFType);
            string strReturn = VeryPDFCom.doc2any(strCmd);
            MessageBox.Show("Processing finished.");
        }
    }
}

VeryPDF

VN:F [1.9.20_1166]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
How can I call Doc2Any SDK from 64bit EXE application? Can you help us to provide the 64bit DOC to Any Converter SDK?, 10.0 out of 10 based on 1 rating

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!