verydoc sdk & com

[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 languages

VeryPDF Releases a VeryPDFComRunCmd.exe COM today, this COM is useful when you call an EXE or MS Office from ASP, PHP, C#, .NET etc. program languages.

VeryPDFComRunCmd download URL is:

http://www.verypdf.com/dl2.php/VeryPDFComRunCmd.zip

Please by following steps to use VeryPDFComRunCmd.exe COM component,

Step 1:

Download VeryPDFComRunCmd.zip and unzip it to a folder, launch a CMD window with Administrator privilege, run install.bat or following command line to register VeryPDFComRunCmd.exe COM into your system,

VeryPDFComRunCmd.exe /regserver

If you want unregister VeryPDFComRunCmd.exe COM from your system, you can run uninstall.bat or following command line,

VeryPDFComRunCmd.exe /unregserver

Please notice, you MUST run above command lines with Administrator privilege, the limited user account hasn't enough permission to register and unregister VeryPDFComRunCmd.exe COM.

Step 2:

Please run OLEVIEW.EXE application (OLEVIEW.EXE is included in "Microsoft Visual Studio 6.0" product), go to "Type Libraries" item,

image

Locate "VeryPDFCOM" item,

COM_Viewer1

You will see "RunCmd" and "RunCmd2" two functions,

COM_Viewer2

COM_Viewer3

Please look at the declaration for RunCmd() and RunCmd2() two functions at below,

'*******************************************************************************
'* Parameters:
'*  [in] strCmdLine: the full path to the executable and the arguments to the executable
'*  [in] wShowWindow: The wShowWindow member can be any of the SW_ constants defined in WINUSER.H.
'*       #define SW_HIDE             0
'*       #define SW_SHOWNORMAL       1
'*       #define SW_NORMAL           1
'*       #define SW_SHOWMINIMIZED    2
'*       #define SW_SHOWMAXIMIZED    3
'*       #define SW_MAXIMIZE         3
'*       #define SW_SHOWNOACTIVATE   4
'*       #define SW_SHOW             5
'*       #define SW_MINIMIZE         6
'*       #define SW_SHOWMINNOACTIVE  7
'*       #define SW_SHOWNA           8
'*       #define SW_RESTORE          9
'*       #define SW_SHOWDEFAULT      10
'*       #define SW_FORCEMINIMIZE    11
'*       #define SW_MAX              11

'*  [in] bWait: block on the process finishing
'*
'* Return Values:
'*  [Out] Boolean: TRUE on success and FALSE on failed
'*  [Out]  String: Return text message which outputted from executable application
'*******************************************************************************

Public Function RunCmd(ByVal strCmdLine As String, ByVal wShowWindow As Long, ByVal bWait As Boolean) As Boolean

Public Function RunCmd2(ByVal strCmdLine As String, ByVal wShowWindow As Long) As String

Step 3:

You can use following VB Script code to test VeryPDFComRunCmd functions,

set VeryPDFCom = CreateObject("VeryPDFCom.RunCmd")
dim nRetVal, bRet
bRet = VeryPDFCom.RunCmd("C:\windows\notepad.exe", 5, 0)
strRet = VeryPDFCom.RunCmd2("cmd /c dir C:\", 5)
msgbox strRet

Step 4:

If you want use VeryPDFComRunCmd.exe from ASP code, you need arrange it run inside an interactive user account,

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 "VeryPDFCom.RunCmd" entry and select "Properties":

image

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

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

image

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.

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.

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

7. Click "OK" to save it,

8. Add "Everyone" user account to the folder where the VeryPDFComRunCmd.exe 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

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

Step 5:

You can use following ASP code to call any EXE or MS Office without any permission problem from now, enjoy it,

<%

set VeryPDFCom = Server.CreateObject("VeryPDFCom.RunCmd")
dim nRetVal, bRet
bRet = VeryPDFCom.RunCmd("C:\windows\notepad.exe", 5, 0)
strRet = VeryPDFCom.RunCmd2("cmd /c dir C:\", 5)
Response.Write strRet & vbCrlf

%>

学校 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: 8.9/10 (8 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 2 votes)
html print

HTMLPrint not printing bar codes sometimes

Hello,

We have been using HTMLPrint for a while now and on one of our printers we have been printing a webpage that contains two 3of9 bar coded items. The printer is an HP LaserJet P2050 and we have never had any issues. There has been a recent addition of another printer to also print this same webpage. This printer is an HP LaserJet 400n. The issue we are having with this printer is that sometimes the bar codes print and sometimes they do not. We can print the same webpage over and over and sometimes the bar codes are there and sometimes it is just the characters that make up the bar codes.

Here is how the bar codes get put on the web page. If need be I can send you the fonts as well.

The bar codes are on the web page like:
*123456*

The css for the bar codes fonts is:
@font-face {
font-family: free_3_of_9regular;
src: url('free3of9-webfont.eot');
src: url('free3of9-webfont.eot?#iefix') format('embedded-opentype'),
url('free3of9-webfont.woff') format('woff'),
url('free3of9-webfont.ttf') format('truetype'),
url('free3of9-webfont.svg#free_3_of_9regular') format('svg');
font-weight: normal;
font-style: normal;
}

Have you seen this problem before? Is there possibly an update to HTMLPrint that fixes this kind of issue? Any help is appreciated.

Thanks,
Customer
---------------------------------------------------
Just for checking, you may open this web page in IE, click "File"->"Print Preview" menus, this web page will be shown in a Print Preview window, can you see barcode image in this Print Preview window correctly? if yes, you should no problem to print this barcode image to printer, if not, please try to fix this problem in Print Preview window first, then you will able to print the barcode image to target printer with HTMLPrint Command Line application.

VeryDOC

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

Can I add page number to PDF footer using html2any command line?

Hi,

My company bought your solution for our client in order to create PDF file from HTML file and it works great.

I received a new demand from our client to add page number (and total pages) to each of the PDF files that generated by the product.

Is it possible to add the page number to the page footer as requested? If so, please send me the command that I need to add.

I will appreciate that you send me all possibilities like page number, total pages and page of pages.

Currently I am activating the product by using the following command line:

html2any htmlName.html pdfFolder/myPdfName.PDF

Thank you for your help,
Customer
------------------------------------
You can use following options to add the header and footer,

-hfflag <string> : set HTML header/footer to off or on
-header <string> : set HTML header text
-footer <string> : set HTML footer text

e.g.,

html2any.exe -hfflag on -header "HTML Header" -footer "HTML Footer" https://www.verydoc.com

VeryDOC
------------------------------------
Hi,

This solution will work in static header/footer but the page footer need to have page number that is dynamic content.

I will appreciate if you give me clear answer because I have to answer my client if his demand can be done.

Thank you.
Customer
------------------------------------
You can use &p and &P to control the dynamic page number, for example,

html2any.exe -hfflag on -header "&p of &P" -footer "&p of &P" https://www.verydoc.com

html2any is support all Headers and Footers which supported by Internet Explorer, please refer to following web pages for more information,

http://msdn.microsoft.com/en-us/library/aa969429(v=vs.85).aspx
https://www.verydoc.com/ie-footer-header.html

Desired Text Code
Window title &w
Page address (URL) &u
Date in short format (as specified by Regional Settings in Control Panel) &d
Date in long format (as specified by Regional Settings in Control Panel) &D
Time in the format specified by Regional Settings in Control Panel &t
Time in 24-hour format &T
Current page number &p
Total number of pages &P
Centered text (following &b) &b
Right-aligned text (following &b&b) &b&b
A single ampersand (&) &&

VeryDOC

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

Use htmltools.exe or doc2any.exe to convert RTF files to PDF files

Hi

I want to convert a .rtf-File to a .pdf-Document. I call the program with a "shell-execution" from VB6:

Call Shell("D:\htmltools.exe D:\rtf\Bill_1.rtf D:\pdf\Bill_1.pdf")

On my local Windows XP it works perfectly but if i try it on my Windows Server 2008 the .pdf-File gets printer with all gridlines from the tables.

What can I do?
I can send you the files if you need.

regards,
Customer
-------------------------------
htmltools.exe can't convert RTF file to PDF file very well, because htmltools.exe is depend on the version of Rich Text Edit Control which installed in your Windows System. If you wish convert RTF file to PDF file from command line, we suggest you may use VeryDOC DOC to Any Converter Command Line application, this software has more methods to convert RTF file to PDF file, it can convert RTF file to PDF file with or without MS Office/OpenOffice, it is also support DOC, DOCX, PPT, PPTX, XLS, XLSX, etc. formats to PDF conversion.

VeryDOC DOC to Any Converter Command Line application can be downloaded from following web page,

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

You can use following code lines to convert RTF file to PDF file easily,

Call Shell("D:\doc2any.exe D:\rtf\Bill_1.rtf D:\pdf\Bill_1.pdf")

Call Shell("D:\doc2any.exe -useoffice 1 -useprinter D:\rtf\Bill_1.rtf D:\pdf\Bill_1.pdf")

Call Shell("D:\doc2any.exe -nouseoffice D:\rtf\Bill_1.rtf D:\pdf\Bill_1.pdf")

VeryDOC

VN:F [1.9.20_1166]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
html print

We have htmlprint running on a 2003 server 32bit fine, but failed to run it on Windows 2008 Server 64bit system.

We have htmlprint running on a 2003 server 32 Bit just fine. We have now installed a 2008 Server running 64 bit, and my 64bit Apache/PHP can't run it, I keep getting -11 as a result, but, it is the exact command as running on the 32bit machine. Do you all have a 64Bit version over htmlprint.exe?

Customer
------------------------------------------
Hi all,

I have a server running Windows server 2003, 32bit. At present I have Apache 2.0 on that server with the PHP modules. So I have an web page that creates an HTML page and then using php to execute htmlprint.exe using php passthru function. This has been working for about 2 years. I am running the WAMP Stack for php and apache.

Basically, Apache->php(passthru)->htmlprint.exe

I want to up grade this sever to Windows server 2008, 64Bit. I have taken the latest Bitnami WAMP stack (Apache 2.2) and installed it on the new server and installed HTMLprint.exe for testing.

I can run php(passthru)->htmlprint.exe and it works from a Dos CMD window, with my login being part of Admin group.

But if I use the web page working on the 2003 server moved to the 2008 system, htmlprint.exe returns an -11 when called from php(passthru) via an Apache web page, and it fails to print, and a cmd*32 appears hung in the process list.

I suspect some kind of security issue, but, there doesn't seem to be any method of tracking down the problem. Apache calls htmlprint.exe (via the php passthru function of phpmod) as SYSTEM user that should have authority to run the htmlprint.exe

I am wondering if you have anyone other users that have ran into the same kind of issue when moving from Server 2003 32 bit to Server 2008 64 bit?

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

This file name is printtest.php.

When run from command line: E:> php printtest.php
it prints the html page.

When run from the browser through Apache it doesn't work.

Yet I can put another EXE, that I compiled, in the same verydoc directory and it runs fine from the browser through php/apache.

It just doesn't make sense.

RUN HTMLPRINT VIA WEB PAGE!!

The following is the sample of my PHP code,

<?php

        $passcmd = 'D://verydoc//htmlprint_cmd//htmlprint.exe -color 2 -hfflag on -footer "Fri, November 08, 2013 - 03:13:54 PM" -printbgcolor 1 -marginbottom 25 -margintop 25 -marginleft 20 -marginright 20 -paper "8.5x14in" -hidewindow -timeout1 15 -timeout2 25 -printer "Office Xerox PCL6" E:/WebRoot/www/public_html/OrderDet27163/47642/printpagek01.html';         
        session_write_close();    
        print ("<Br>RESULTS:"  . $passcmd .  "\n");                               
        passthru ($passcmd,$msgResults);      
        exit ("\nRESULTS:" . $msgResults);
        session_write_close(); 

?>

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

This problem is caused by permission issue, we suggest you may run htmlprint.exe inside an interactive user account instead of default Local System user account to try again, this will solve this problem to you.

You can use CmdAsUser.exe to run htmlprint.exe inside an interactive user account, CmdAsUser.exe can be downloaded from following web page, you may download it to try,

https://www.verydoc.com/exeshell.html

You may also run htmlprint.exe by manual in Cmd window to try again, can you work fine from CMD window by manual on 2008 Server 64 bit system?

VeryPDF
------------------------------------------

To solve this problem the WAMP stack was installed on Windows 2008 64Bit as local internal user "SYSTEM". Regardless of what I tried to do to give "SYSTEM" user permissions, the call from PHP (passthru) to HTMLPRINT.EXE failed to complete.

After hours of testing, I found that there was no way to give "SYSTEM" enough permissions to make this work.

What I found is that I went to the System Services where you can start and stop a service process, and changed wampapache to start as Local Administrator, giving the start process local Administrator's login and password. This did the trick.

By the way none of the work arounds sent to me in your response helped what so ever including CmdasUser.exe, etc..

Customer

------------------------------------------

Thanks for your kindly information, your solution will helpful for our other customers in the future, thank you.

VeryPDF

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