Need help on Image2PDF COM

Hi, I just purchased a server edition of your Image2PDF COM Component.

I don't know how I can use it with my .Net application?

I don't see any examples for the same.

Image2PDF COM Component does contain ASP and VBS examples, please refer
to ASP example in test.asp and testAppend.asp files, you can also refer
to VBS example at below,
      Dim oTest
      dim very_ID
      dim ret
      Set fso = CreateObject("Scripting.FileSystemObject")
      strFolder = fso.GetParentFolderName(wscript.ScriptFullName)
      Set oTest = CreateObject("Image2PDFOCX.CImage2PDF")
      very_ID=oTest.VeryCreateEx(strFolder & "\testpdf.pdf")
      ret = oTest.VeryAddImageEx(very_ID, strFolder & "\01.tif")
      ret = oTest.VeryAddImageEx(very_ID, strFolder & "\02.tif")
      oTest.VeryCloseEx very_ID
You can port from ASP and VBS examples to C# code easily, if you don't
know how to do, please feel free to let us know, we will create a C#
example project to you asap.

It does contain examples, but I cannot find the dll that I can reference
I ran the bat file for making it work for asp, and all I see is pdfshell.dll.
Do I have to add reference to that in my project??
Image2PDFOCX is included in Image2PDFOCX.dll, you can run following
command line to register it in your system,

regsvr32 Image2PDFOCX.dll

after you registered Image2PDFOCX.dll, you can add a reference to it in
your project easily.

We have purchased the PDF Toolkit (Professional version) Server License.

I don't see the dll you are mentioning "Image2PDFOCX.dll"

After I unzipped the product, all I see are the following dlls in the
bin directory:

Verywrite.dll, pdfx64,dll, pdfutil.dll, pdfshell.dll, pdfsdk.dll,
pdfpg.dll, encryptpdf.dll, cimage.dll

Where is "Image2PDFOCX.dll". Your home page says it's included in the
Toolkit, but I don't see it anywhere.

How to I register it with the License key you have provided with.

Am I missing something?

I really appreciate your help.
Sorry for confusion, "Image2PDFOCX.dll" is included in Image2PDF SDK
Server License, PDF Toolkit Pro SDK version doesn't contain

In the PDF Toolkit Pro SDK product, you need register pdfshell.dll first
(with administrator privilege), then you can add a reference to
"pdfshell.shellexe" into your code, please refer to VB, VC, C#, ASP,
etc. examples in the PDF Toolkit Pro SDK package, if you encounter any
problem, please feel free to let us know, we will assist you asap.

Thanks for your prompt reply.

There's one last thing. I am able to successfully create PDF files using

However, in the PDFs created, I see that it's superimposed with the
following text in red.

"Demo(> )"

Since we purchased the full License, this should not happen.
I was given a License key, but how do I use it?? There is no function in
pdfshell that allows me to set the License Key.

How do I set the Licnse key.

Below is the code snippet that I am using to create the PDF:

Please use following License Key to register PDF Editor Toolkit Pro SDK
product from your application,


Please refer to RED code line at below,

Public Sub CreatePDF()

reader = SqlHelper.ExecuteReader(ConfigurationManager.AppSettings("SQLServer"), CommandType.Text, strSQL)

Dim myPDF As New pdfshell.shellExe


    fileName = "d:\temp\" & reader("ResultScanID") & "_" & ExamID & "_" & Right(NullToString(patientreader("NationalID")), 4) & ".pdf"

    pdfID = myPDF.com_VeryCreate(fileName)

    myPDF.com_VeryAddInfo(pdfID, "Medical Record", "", "Anderson KellyAssociates", "Employment Screening Physical", "Anderson Kelly

    pdfRET = myPDF.com_VerySetFunction(pdfID, 105, 128, 1 + 2 + 4, "237tdgeig42dakdg", "password")

    Dim filePath As String = "\\gatekeeper\Data\Akis\Images\" & patientreader("MarinerID")
     & "\" & reader("ExamID") & "_Distribution.tif"

    If File.Exists(filePath) Then
            pdfRET = myPDF.com_VeryAddImage(pdfID, filePath)
    End If

    Do While reader.Read
            filePath = "\\gatekeeper\Data\Akis\Images\" &
      patientreader("MarinerID") & "\" & reader("ExamID") &

            If File.Exists(filePath) Then
                  pdfRET = myPDF.com_VeryAddImage(pdfID, filePath)
            End If

    myPDF = Nothing
End Sub
When I use the following command I get an error message:

Error 46    'com_VerySetLicenseKey' is not a member of 'pdfshell.shellExe'.  

We have sent the latest version of pdfshell.dll to you just now, the latest version of pdfshell.dll does contain 'com_VerySetLicenseKey' function, you need re-register pdfshell.dll in your system, then you can call 'com_VerySetLicenseKey' function from your code.



Hi, I had another question. How do I merge PDFs? I am using the pdfshell
Com_VeryAddImage works for Tiffs, jpegs and gifs, but not for PDF files.
I want to be able to merge PDF files. How do I do that?

In the Examples (pdf-appending, Appendpdf) I see the following lines of

'Set Temporary Directory

pdfObject.com_VerySetFunction 0,160,0,0,pdfFilePath,0

For j=0 to 10
      pdfObject.com_VerySetFunction 0, 200, 0, 0, FileName,

What are the codes 160 and 200?? I can't find it in the Reference Manual.

I used the above, but I am not able to merge the pdfs. Can you please
tell me how to merge 2 or more PDF Files.

#define Very_Set_Temporary_Folder 160
#define Very_AppendPDFFile         200

"160" is used to set the Temporary Directory to store Temporary files,
"200" is used to append lots of PDF files into one PDF file.

If you wish merge two PDF files to one PDF file, please run following

      pdfObject.com_VerySetFunction 0, 200, 0, 0, "C:\\out.pdf", "C:\\1.pdf"
      pdfObject.com_VerySetFunction 0, 200, 0, 0, "C:\\out.pdf", "C:\\2.pdf"


When I use the following command, it always returns 0? No file is
created? I have the PDF Editor Toolkit Pro SDK. Can you please suggest
the correct/alternate way to merge PDFs?

  pdfID = myPDF.com_VerySetFunction(0, 200, 0, 0, fileName, filePath)


Please by following steps to merge your PDF files into one PDF file,

1. please register pdfshell.exe COM into your system first,

pdfshell.exe /regserver

2. you can run following code to merge your PDF files into one PDF file,

Dim oPDF
Dim outPDF
Dim outID
Dim bresult

Set oPDF = CreateObject("pdfshell2.shellexe")
outPDF = "C:\output.pdf"
strMergeCommand = ""
strMergeCommand = strMergeCommand & """" & "D:\temp3\000170.pdf" & """ "
strMergeCommand = strMergeCommand & """" & "D:\temp3\example.pdf" & """ "
strMergeCommand = strMergeCommand & """" & "C:\out.pdf" & """"
bresult = oPDF.com_VerySplitMergePDF(strMergeCommand)
MsgBox "com_VerySplitMergePDF() is return: " & CStr(bresult)

Hi, I am getting the following error when trying to display a PDF file from a web server..
We have the Professional Toolkit version of very PDF? It works fine on our development box, but on our production server it gives problem.
Can you please help me with this..

Error Message: Adobe cannot open the file because either the file type is not supported or has been damaged?

We have sent a test package to you just now, everything is fine in the test package.

Thanks for your new test package, everything is work fine now.

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

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!