How to call PDF to Vector SDK from 64bit EXE applications? How to use pdf2vector_com.exe COM Component to convert PDF to Vector formats?

Hi,

My company was purchased a PDF to Vector SDK Server license from verydoc in June 2011 for Windows server 32 bit.

We are now upgrading to 64 bit server and were wanting to know if we can use the existing license.

Currently we are passing command line parameters and your License Key to VeryPDF_PDF2Vector() to convert form pdf to Emf.

This is working for 32 bit but not for 64 bit.

Please can you tell us if this same method will work for Windows 2008 R2 64 bit also.

Thanks,
Customer
---------------------------------------------------------

image
Thanks for your message, the latest version of PDF to Vector SDK is contain a pdf2vector_com.exe file, this is a COM interface, pdf2vector_com.exe COM can be called from both 32bit and 64bit applications.

Please download latest version of VeryDOC PDF to Vector Converter SDK from following web page,

https://www.verydoc.com/pdf-to-vector.html
https://www.verydoc.com/pdf2vec_sdk.zip

You can unzip pdf2vec_sdk.zip to a folder, run a CMD window with administrator privilege, and run following command line to register pdf2vector_com.exe into your system,

pdf2vector_com.exe /regserver

Before you remove pdf2vector_com.exe from your system, you can run following command line to uninstall it from your system,

pdf2vector_com.exe /unregserver

after you registered pdf2vector_com.exe with administrator privilege, you can use following C# source code to call PDF to Vector SDK function,

C# example source code to call PDF to Vector SDK/COM,

private void PDF2VectorCOM_Click(object sender, EventArgs e)
{
    string strStartupPath = System.Windows.Forms.Application.StartupPath + "\\";

    System.Type pdf2vecName = Type.GetTypeFromProgID
                   ("PDF2VectorCom.pdf2vec");
    if (pdf2vecName != null)
    {
        object pdf2vec = Activator.CreateInstance(pdf2vecName);
        string strPDFFile = strStartupPath + "test.pdf";
        string strOutFile = strStartupPath + "test.swf";
        string strCmd = "pdf2vec -$ XXXXXXXXXXXXXXXXXXXX \""
                   + strPDFFile + "\" \"" + strOutFile + "\"";

        //MessageBox.Show(strCmd);
        object[] argn = new object[1];
        argn[0] = strCmd;
        int nRet = (int)pdf2vecName.InvokeMember(
              "com_PDF2Vector", BindingFlags.InvokeMethod, null, pdf2vec, argn);
        //int nRet = pdf2vec.com_PDF2Vector(strCmd);
        MessageBox.Show("Return Value is: " + string.Format("{0}", nRet));
    }
}

VBScript example source code to call PDF to Vector SDK/COM,

Set fso = CreateObject("Scripting.FileSystemObject")
strFolderDir = fso.GetParentFolderName(WScript.ScriptFullName)
strParentDir = fso.GetParentFolderName(strFolderDir)
strInFile = strParentDir & "\bin\test.pdf"
strOutFile = strFolderDir & "\_out.emf"
strLicenseKey = "-$ XXXX-XXXX-XXXX-XXXX"
strCmd = "pdf2vec " & strLicenseKey & " """ & strInFile & """ """ & strOutFile & """"

msgbox strCmd

set VeryPDFCom = CreateObject("PDF2VectorCom.pdf2vec")
strReturn = VeryPDFCom.com_PDF2Vector(strCmd)
msgbox "Conversion finished."

Classic ASP example source code to call PDF to Vector SDK/COM,

<%
        strInFile = "D:\test.pdf"
        strOutFile = "D:\_out.emf"
        strLicenseKey = "-$ XXXX-XXXX-XXXX-XXXX"
        strCmd = "pdf2vec " & strLicenseKey & " """ & strInFile & """ """ & strOutFile & """"

      Set VeryPDFCom = Server.CreateObject("PDF2VectorCom.pdf2vec")
        strReturn = VeryPDFCom.com_PDF2Vector(strCmd)
      Response.write "Conversion finished."
%>

VB.NET example source code to call PDF to Vector SDK/COM,

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    Dim strFolderDir As String = Application.StartupPath()
    Dim strInFile As String = strFolderDir & "\test.pdf"
    Dim strOutFile As String = strFolderDir & "\_test_out.emf"
    Dim strLicenseKey As String = "-$ XXXX-XXXX-XXXX-XXXX"
    Dim strCmd As String = "pdf2vec " & strLicenseKey & " """ & strInFile & """ """ & strOutFile & """"

    Dim VeryPDFCom As Object = CreateObject("PDF2VectorCom.pdf2vec")
    Dim strReturn As String = VeryPDFCom.com_PDF2Vector(strCmd)
    MsgBox("Conversion finished.")
End Sub

PHP example source code to call PDF to Vector SDK/COM,

<?php

$strFolderDir = dirname(__FILE__);
$strParentDir = dirname($strFolderDir);
$strInFile = $strParentDir . "\\bin\\test.pdf";
$strOutFile = $strFolderDir . "\\_out.emf";
$strLicenseKey = "-$ XXXX-XXXX-XXXX-XXXX";
$strCmd = "pdf2vec $strLicenseKey \"$strInFile\" \"$strOutFile\"";

echo $strCmd . "\n";
$VeryPDFComObject = new COM("PDF2VectorCom.pdf2vec");
$VeryPDFComObject->com_PDF2Vector($strCmd);
echo "Conversion finished.\n";

?>

Javascript example source code to call PDF to Vector SDK/COM,

<html>
<script type="text/javascript">

function PDFToVectorSDKConverter()
{
        strInPDF = "D:\\downloads\\a.pdf"
        strOutImage = "D:\\downloads\\_test_out.emf"
        strLicenseKey = "-$ XXXX-XXXX-XXXX-XXXX"
        strCmd = "pdf2vec " + strLicenseKey + " \"" + strInPDF + "\" \""
                          + strOutImage + "\""
       
       alert("Start converting,\n\n" + strCmd);
        try {
                var VeryPDFCom = new ActiveXObject("PDF2VectorCom.pdf2vec");
                VeryPDFCom.com_PDF2Vector(strCmd)
        } catch (error) {
            //  error handling code not shown...
            alert(error + '\n\nThis error occurred while\n'
                      'attempting to load VeryPDF.PDFtoImageCom.')
            return;
        }
        alert("Finished the converting.\n\n" + strCmd);
}

</script>

<body>
    <input type="button" value="Test VeryDOC PDF to Vector Converter COM/SDK Function" id="btn" onclick="PDFToVectorSDKConverter()">
</body>
</html>

You may refer to following web pages for more information about pdf2vector_com.exe COM interface,

http://www.verypdf.com/wordpress/201107/call-pdf-to-vector-converter-sdk-from-64bit-exe-application-1488.html

https://www.verydoc.com/blog/how-can-i-use-c-to-call-pdf2vec-com-control.html

https://www.verydoc.com/blog/64-bit-compatibility-for-ps2pdf-converter.html

VeryPDF

VN:F [1.9.20_1166]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
How to call PDF to Vector SDK from 64bit EXE applications? How to use pdf2vector_com.exe COM Component to convert PDF to Vector formats?, 10.0 out of 10 based on 2 ratings

Related Posts

One Reply to “How to call PDF to Vector SDK from 64bit EXE applications? How to use pdf2vector_com.exe COM Component to convert PDF to Vector formats?”

  1. Support,

    is pdf2vec.dll support on Server 2008 64 bit platform? i even exectued register_x64_com and got same result.

    I downloaded http://www.verydoc.com/pdf2vec_sdk.zip and called pdf2vec but i get “Error: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)”

    Environment:
    Server 2008 x64 SP2

    Customer
    —————————————-
    pdf2vec.dll is for 32bit EXE application only.

    If you wish call it from 64bit EXE application, you can use pdf2vector_com.exe to instead of pdf2vec.dll, pdf2vector_com.exe can be called from both 32bit and 64bit EXE applications,

    Please look at following web page for more information,

    http://www.verydoc.com/blog/how-to-call-pdf-to-vector-sdk-from-64bit-exe-applications-how-to-use-pdf2vector_com-exe-com-component-to-convert-pdf-to-vector-formats.html

    VeryDOC

    [Reply]

    VN:F [1.9.20_1166]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.20_1166]
    Rating: 0 (from 0 votes)

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!