How to call PDF Editor Toolkit Pro SDK from Classic ASP source code?

Hi,

How do I install the PDF Editor Toolkit Pro SDK on Windows Server 2019/2022? I'm installing the PDF Editor Toolkit Pro SDK for use with ASP classic. From the bin directory I'm running
install_for_asp.bat.

I keep getting this error message:

image
We're migrating to a new version of Windows Server and decommissioning the old one.

Do you have a guide available for installation?

Cheers & Keep Safe,
Customer
-----------------------
It seems "pdfshell.exe" is not registered in your system, you may run a cmd window by administrator privilege, and then run following command line to register pdfshell.exe into your system,

pdfshell.exe /regserver

You can also double click "Install-pdfshell.exe-Com.vbs" to register pdfshell.exe into your system.

image

After you register pdfshell.exe into your system, you will able to call it from VB or ASP code properly,
===================
Set pdfObject = Server.CreateObject("pdfshell.shellexe")
id = pdfObject.com_VeryStampOpen("test_org.pdf", "1.pdf")
if (id>0) then
iRet = pdfObject.com_VeryStampSetFunction(id, 131, 0, 0, 0, 0)
code = pdfObject.com_VeryStampAddText(id, 9, "TEST", RGB(220, 220, 220), 18, -10, 0, 50, 1, 0, 301, "", 30, 0, "", 0)
pdfObject.com_VeryStampClose (id)
end if
set pdfObject = nothing
===================
If you still can't get it work, please feel free to let us know, we will assist you asap.

VeryPDF
-----------------------
Ok, so I did a fresh install of windows server 2022. Installed IIS, made sure it was working and copied the bin directory to the server. I double clicked on install-pdfshell.exe-Com.vbs. I command window opened and closed. Now what? It looked and felt the same way malware gets installed.

No success or error messages. Is that the installation procedure for installing the software on the server? Could you please provide a more formal guide?

I then copied over the asp_interface directory to try and test if the software installed properly or is working. Opening the readme.txt it reads:
================
How to run ASP examples?

1. Please run "../bin/install_for_asp.bat" file to install all files for use,
2. Then please run MS Internet Explorer, and open ASP examples in "asp_examples" folder to try.
================

Looking again in the bin directory there's no install_for_asp.bat found. I found 2 pngs though. One is a panel for default website properties which I could not find an equivalent for in IIS 10. The second is a panel showing IUSR and IWAM accounts and what permissions should be enabled for both. I think IIS 10, once configured for ASP classic already addresses that.

I then navigated to C:\inetpub\wwwroot\asp_interface\asp_examples\stamp and copied those files into the wwwroot directory and tried to run stampExample.asp. This resulted in this message coming up in the browser:

have errs when execute functions!

I would like clear installation instruction in installing your product on windows 2022 server so I can move to the next step of testing if your product works in classic ASP. If you can manage it, I would also like clear instructions on how to test in classic ASP.

I've never had such a frustrating experience trying to get this product to work. I hope you get bac to me in a timely manner,

Customer
-----------------------
After you run "Install-pdfshell.exe-Com.vbs" to install pdfshell.exe into your system, you can try to convert a JPG file to PDF file by following VBScript code,

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

strTIFFileName = FilePath & "logo.jpg"
strPDFFileName = FilePath & "_logo.pdf"

Set oPDF = CreateObject("pdfshell2.shellExe")
oPDF.com_VerySetLicenseKey("XXXXXXXXXXXXXXXXXXXXX")
FileID = oPDF.com_VeryCreate(strPDFFileName)
oPDF.com_VeryAddImage FileID, strTIFFileName
oPDF.com_VeryClose FileID

MsgBox "Create '" + strPDFFileName + "' file successful."
===================

Can you get this VBScript code work fine? if yes, it indicates you have installed pdfshell.exe properly, the problem may caused by permission settings when you call it from ASP code, you may focus on permission settings.

If you can't get this VBScript code run properly, please feel free to let us know, we will assist you continue.

VeryPDF
-----------------------
Hi,

I copied the entire pdf_editor_toolkit_pro directory to drive C on a windows server 2022 setup I have running with IIS 10 running and ASP classic enabled. Then I doubled clicked on the Install-pdfshell.exe-Com.vbs in the bin directory. A cmd window opened the closed.

Next I created a test.asp file in the directory that's configured on IIS to run ASP. I added a logo.jpg file.

Here's the code:

I get this error running the script:

Microsoft VBScript runtime error '800a01a8'
Object required: 'wscript'
/test.asp, line 7

So I updated the script with:
===================
LANGUAGE=VBSCRIPT
Response.CacheControl="Private"
Response.Expires=-10000

Set fso = CreateObject("Scripting.FileSystemObject")
'strFolder = fso.GetParentFolderName(wscript.ScriptFullName)
'FilePath = strFolder & "\"
FilePath = "C:\inetpub\wwwroot\"

strTIFFileName = FilePath & "logo.jpg"
strPDFFileName = FilePath & "_logo.pdf"

Set oPDF = CreateObject("pdfshell2.shellExe")
oPDF.com_VerySetLicenseKey("XXXXXXXXXXXXXXXXXXXX")
FileID = oPDF.com_VeryCreate(strPDFFileName)
oPDF.com_VeryAddImage FileID, strTIFFileName
oPDF.com_VeryClose FileID

MsgBox "Create '" + strPDFFileName + "' file successful."
===================
Then I got this error:

Microsoft VBScript runtime error '800a0046'
Permission denied: 'CreateObject'
/test.asp, line 14

I gave full permissions to IUSR, IIS_IUSR, all the other accounts except for creator owner.

How should I proceed?

Apologies on not getting back to you sooner. A few years ago I suffered a stroke and lost the use of my right side. I've regained some functionality recently and I've started getting back to work but I'm still disabled. Please bear with me.

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

>>Microsoft VBScript runtime error '800a0046'
>>Permission denied: 'CreateObject'
>>/test.asp, line 14
>>I gave full permissions to IUSR, IIS_IUSR, all the other accounts except for creator owner.
>>How should I proceed?

This problem is due to that your ASP code hasn't permissions to access to "pdfshell2.shellExe" COM object, please check the following steps,

1. Please run "Install-pdfshell.exe-Com.vbs" to register pdfshell.exe into your system first,

2. Please give full control permissions to "pdfshell2.shellExe" COM in Component Services, please look at following web page for more information, this article is for "VeryPDFCom.RunCmd", so you need to change from "VeryPDFCom.RunCmd" to "pdfshell2.shellExe" in your system,

https://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

3. Give full control permissions to "pdfshell2.shellExe" in your system by following steps,

3.1. "Start" -> "Run" -> type in "dcomcnfg" on 32bit system or "MMC comexp.msc /32" on 64bit system,

In the Component Services Window, expand the tree item:

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

Right click the "pdfshell2.shellExe" entry and select "Properties".

image

3.2. In the 'COM Properties' dialog, select the the 'Security' tab,

3.3. In the 'Access Permissions' area, select "Customize" and click Edit,

image

3.4. Ensure that "Everyone" is present in the list of names. If not, add it by clicking the Add button, typing "Everyone" and give it all permissions, and clicking OK.

image

3.5. Make sure "Everyone" has the Access Permission 'Allow' check box ticked.

image

Click OK to return to the 'properties' window.

You need give "Full Control Permission" to "Everyone" to "Launch and Activation Permissions", "Access Permissions" and "Configuration Permissions" three items.

3.6. Click "Identity" tab. Check the "This user" checkbox, press "Browse" and specify the Administrator account, enter and re-enter the Administrator password, OR simple choose "The interactive user." option.

image

3.7. Click "OK" to save it,

3.8. Add "Everyone" user account to the folder where the "pdfshell2.shellExe" inside, and assign "Full Control" permission to "Everyone" user account, if you don't give enough permission to this folder, ASP, PHP, C#, VB.NET, ASP.NET etc. web applications will be denied to access to this folder,

image

image

image

3.9. OK, you can call "pdfshell2.shellExe" from ASP, PHP, C#, VB.NET, ASP.NET, VBScript, JavaScript, Delphi, etc. program languages without any restrictions now.

VeryPDF

Relevant links:

More EXEShell Tools can be found at following web page,
https://www.verydoc.com/exeshell.html

VeryPDF has release a new docPrintCOMExe for docPrint SDK product,
http://www.verypdf.com/wordpress/201403/verypdf-release-notes-verypdf-has-release-a-new-docprintcomexe-for-docprint-sdk-product-40311.html

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!