Call PDF to Vector Converter SDK from 64bit EXE application

Hi I’m having difficulty installing the pdf2swf converter dlls into visual studio 2010 on win7.
VS keeps reporting the files the dlls aren’t valid.

I’ve copied them to the bin folder and am trying to add references to them, but this is where the invalid dll error comes.

Can you advise ?

http://www.verydoc.com/pdf2vector/pdf-to-swf.html
===================================
Please by following steps to try again,

1. Please run "bin/register_x64_com.bat" to register pdf2vector_com.exe first, 2. Then you can run "win64/test_pdf2vec_com_for_x64.vbs" to call PDF2Vector COM method to convert PDF documents to other formats, PDF2Vector COM can be called from visual studio 2010 without any problem,

Please refer to a VBS example at below,

'===================================
'Please run "../bin/register_x64_com.bat" to register pdf2vector_com.exe first, 'then you can run "test_pdf2vec_com_for_x64.vbs" to call PDF2Vector COM method 'to convert PDF documents to other formats.
'===================================

Set fso = CreateObject("Scripting.FileSystemObject")
strFolder = fso.GetParentFolderName(wscript.ScriptFullName)

pos = InstrRev(strFolder, "\")
strFolder2 = Mid(strFolder, 1, pos)
strPDFFile = strFolder2 & "bin\test.pdf"

strOutFile = strFolder & "\com_test_x64.xps"
Set pdf2vec = CreateObject("PDF2VectorCom.pdf2vec")

strCmd = "pdf2vec -$ XXXXXXXXXXXXXXXXXXXX """ & strPDFFile & """ """ & strOutFile & """"

MsgBox (strCmd)
nRet = pdf2vec.com_PDF2Vector(strCmd)
MsgBox ("Return Value is: " & CStr(nRet))

VeryPDF
===================================
Thank you for your response. The batch files you have said I should run, I do not have a copy of them, where they sent as an attachment in your last email ?

I've I downloaded from your site, doesn’t have the x64 bit version batch files.

===================================
Please download latest version of PDF to Vector Converter SDK from following URL,

http://www.verydoc.com/pdf2vec_sdk.zip

after you unzip it to a folder, please refer to following files,

bin\pdf2vector_com.exe
bin\register_x64_com.bat
win64\readme.txt
win64\test_pdf2vec_com_for_x64.vbs

Please run "bin/register_x64_com.bat" to register pdf2vector_com.exe first, then you can run "test_pdf2vec_com_for_x64.vbs" to call PDF2Vector COM method to convert PDF documents to other formats.

VeryPDF
===================================

My goal is to run the application on a shared hosted environment and wouldn’t be able to registered coms with the server.  I only have access to the bin folder to copy the dll to.
Do you have a dll solution ? Is the dll in the downloaded zip corrupt or not compatible with win x64 ?
=====================
pdf2vec.dll is a 32bit DLL Library, you can call it from 32bit EXE without any problem, but you can't call it from 64bit EXE, please notice this matter.

However, you can also use our PDF to Vector Converter Command Line to instead of PDF to Vector Converter SDK product, PDF to Vector Converter Command Line can be run on both 32bit and 64bit systems, you can download trial version from our website to try,

http://www.verydoc.com/pdf-to-vector.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)
Call PDF to Vector Converter SDK from 64bit EXE application, 10.0 out of 10 based on 2 ratings

Related Posts

One Reply to “Call PDF to Vector Converter SDK from 64bit EXE application”

  1. Please refer to following steps carefully,

    1. Please launch a CMD window by “Run as administrator” option,
    2. Run “register_x64_com.bat” in this CMD window to register pdf2vector_com.exe into your system, you can also run following command line to register pdf2vector_com.exe by manual,

    pdf2vector_com.exe /regserver

    3. Please run Microsoft Visual Studio 2010, open your project, add a reference to “PDF2VectorCom”, then you can run following C# code to call pdf2vector SDK without any problem,

    ———————————————–
    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 PDF2VectorCom;
    using System.Reflection;

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

    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));
    }
    }
    }
    }
    ———————————————–

    4. If you still can’t get it work, we sure this problem is caused by permission settings, you need give “Full Control” permission to “Everyone” user account to “PDF2VectorCom” in your system, if you don’t know how to do, please refer to following web page,

    http://www.verydoc.com/doc-to-any-faq.html

    4.1. “Start” -> “Run” -> type in “dcomcnfg” on 32bit system or “MMC comexp.msc /32” on 64bit system,
    4.2. In the Component Services Window, expand the tree item:

    Console Root / Component Services / Computers / My computer / DCOM Config

    Right click the “PDF2VectorCom” entry and select “Properties”.
    In the ‘COM Properties’ dialog, select the the ‘Security’ tab, set “Launch Permissions”, “Access Permissions”, “Configuration Permissions” options to “Customize” and allow “Everyone” user account to use it, click “OK” button to save changes.

    5. okay, you should no problem to call “PDF2VectorCom” from 64bit system now.

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

Leave a Reply to VeryPDF Cancel 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!