doc to any converter

How do you run a command line application?

Prior to Windows, there was a MSDOS, MSDOS is a basic operating system exactly where you are able to manage programs and information files. In order to access the MSDOS command prompt window on Windows 95/98/ME/2000/XP/2008/Vista/7/etc., please go to "start" -> "Run" and type "command" or "cmd" command, press "Enter" key, you will able to launch a DOC window, then you can run command line applications in this DOS window.

The MSDOS environment is simpler than Windows. There are no icons or menus to click on. In fact, you can't use your mouse at all. You've to enter commands at the command prompt. It is going to look some thing like this:

C:\Documents and Settings\Administrator>

This is indicate that you are on the C drive in the "C:\Documents and Settings\Administrator" folder.

If you wish see all files in this directory, type 'dir' without the quotation marks and press enter. For example:


C:\Documents and Settings\Administrator>dir
Volume in drive C has no label.
Volume Serial Number is XXXXXXXX

Directory of C:\Documents and Settings\Administrator

12/16/2010  05:05 AM    <DIR>          .
12/16/2010  05:05 AM    <DIR>          ..
07/08/2011  10:25 PM    <DIR>          Desktop
12/15/2010  08:38 PM    <DIR>          Favorites
12/20/2010  07:33 PM    <DIR>          My Documents
12/15/2010  08:15 PM    <DIR>          Start Menu
12/15/2010  08:18 PM                 0 Sti_Trace.log
1 File(s)              0 bytes
6 Dir(s)  10,488,033,280 bytes free

C:\Documents and Settings\Administrator>


Now, if you wish use VeryDOC DOC to Any Converter Command Line application, you can download it from following URL,

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

unzip it to C:\doc2any_cmd folder, before you can run the program you have to change the current working directory to C:\doc2any_cmd folder:

C:\Documents and Settings\Administrator>cd C:\doc2any_cmd

you can run following command line with input and output parameters,

C:\doc2any_cmd>doc2any.exe C:\test.doc C:\out.pdf
VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
verypdf blog

Is PDF Parser SDK render the wrong PDF page number?

Hi,

We have encountered a bug in the PDF Parser DLL which was shipped.

Error Description:

VeryPDF_PDFParserSDK_GetHandle functions accepts parameter f and l where you can specify the first and the last page range of the report. VeryPDF returns handle id Which can be used to fetch the pages in subsequent calls.

Problem is everything works fine if the first page is 1. But if you have first page as 3 and last page as 10 it would return last 3 pages as blank (8,9,10). Similarly if you have first page as 4 and last page as 11 it returns the last 4 pages Blank.


Sample Application To Reproduce the Error:

Download The Sample application which I have created to reproduce the error.

XXXXXXXXXXXXXXXXXXXX

Steps To Reproduce the Error:

1. Enter Pages 3 and 10 and click the Load Pages Button As shown in the below Screenshot. It will populate the image box with the 3rd Page. It returns Handle which you can use to Load Pages 3 to 10.

2. Now Enter 7 below the show Page and it would correctly load the 7th Page.
3. Now Again Enter 8 page and Click Show Page. It would return Blank.Same thing would happen for pages 9,10.
4. So When you try to use the Handleid for loading last 3 pages(8,9,10) it would return Blank.

Let me know if you have any Questions.
===================================================

Could you please relate to the error as descried below?

===================================================

I have double checked your source code, it seems there has a misunderstanding in the index parameter of VeryPDF_PDFParserSDK_GetImageLength() and VeryPDF_PDFParserSDK_GetTextInfoLength() functions, you need deliver the index instead of page number to the VeryPDF_PDFParserSDK_GetImageLength() and VeryPDF_PDFParserSDK_GetTextInfoLength() functions, for example, if you render the page range "-f 3 -l 6" and if you wish display the page 3, you need deliver index "0" to VeryPDF_PDFParserSDK_GetImageLength() function, then you will get the image data of page 3, please refer to following modified source code,


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
txtFrm.Text = "3"
txtTo.Text = "6"

Dim strInPDFFile As String
strInPDFFile = Application.StartupPath() & "\tst1.pdf"
Handleid = VeryPDF_PDFParserSDK_GetHandle(strInPDFFile, "-$ XXXXXXXXXXXXX -f " & txtFrm.Text & " -l " & txtTo.Text)

Dim nImageIndex As Integer = 0
//If you wish display page 3, please set nImageIndex to 0
//If you wish display page 4, please set nImageIndex to 1
//If you wish display page 5, please set nImageIndex to 2
//If you wish display page 6, please set nImageIndex to 3
//and so on

iImageDataLen = VeryPDF_PDFParserSDK_GetImageLength(Handleid, nImageIndex)
iTextInfoLen = VeryPDF_PDFParserSDK_GetTextInfoLength(Handleid, nImageIndex)
ReDim btImgData(iImageDataLen)
ReDim btTxtData(iTextInfoLen)
VeryPDF_PDFParserSDK_GetImageData(Handleid, nImageIndex, btImgData(0), iImageDataLen)
VeryPDF_PDFParserSDK_GetTextInfoData(Handleid, nImageIndex, btTxtData(0), iTextInfoLen)
sLogMsg = System.Text.Encoding.ASCII.GetString(btTxtData)
PageMap = sLogMsg
PageImage = btImgData
PictureBox1.Image = Byte2Image(PageImage)
End Sub

Public Function Byte2Image(ByVal ByteArr() As Byte) As Image
Dim NewImage As Image = Nothing
Dim ImageStream As MemoryStream
Try
If ByteArr.GetUpperBound(0) > 0 Then
ImageStream = New MemoryStream(ByteArr)
NewImage = Image.FromStream(ImageStream)
Else
NewImage = Nothing
End If
Catch ex As Exception
NewImage = Nothing
End Try
Byte2Image = NewImage
End Function
VeryPDF
====================================================
Continuous to previous email, I have attached a new piece of source code at below, you can use following code to read all images which returned by VeryPDF_PDFParserSDK_GetHandle() function,

Private Sub Memory_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Memory.Click
Dim nRet As Integer
Dim strOptions As String
Dim strInPDFFile As String
Dim strOutFile As String
Dim nPDFSDKLib As Integer
Dim nCount As Integer
Dim nItem As Integer
Dim vecImgData() As Byte = Nothing
Dim vecTxtData() As Byte = Nothing
Dim nImageDataLen As Integer
Dim nTextInfoLen As Integer
Dim strLogMsg As String

strInPDFFile = Application.StartupPath() & "\example1.pdf"
strOptions = "-$ XXXXXXXXXXXXXXXXXXXX"
nPDFSDKLib = VeryPDF_PDFParserSDK_GetHandle(strInPDFFile, strOptions)
nCount = VeryPDF_PDFParserSDK_GetCount(nPDFSDKLib)
For nItem = 0 To nCount - 1
nImageDataLen = VeryPDF_PDFParserSDK_GetImageLength(nPDFSDKLib, nItem)
nTextInfoLen = VeryPDF_PDFParserSDK_GetTextInfoLength(nPDFSDKLib, nItem)
ReDim vecImgData(nImageDataLen)
ReDim vecTxtData(nTextInfoLen)
VeryPDF_PDFParserSDK_GetImageData(nPDFSDKLib, nItem, vecImgData(0), nImageDataLen)
VeryPDF_PDFParserSDK_GetTextInfoData(nPDFSDKLib, nItem, vecTxtData(0), nTextInfoLen)
strLogMsg = System.Text.Encoding.ASCII.GetString(vecTxtData)
MsgBox(strLogMsg.Substring(0, 300))
Next nItem
VeryPDF_PDFParserSDK_Free(nPDFSDKLib)
nPDFSDKLib = Nothing
End Sub

You can use VeryPDF_PDFParserSDK_GetCount() function to get the count of returned items, then you can read each item in a loop, the item index for following functions is start from "0", this item index is not equal to page number in PDF file, please notice this difference,

VeryPDF_PDFParserSDK_GetTextInfoLength()
VeryPDF_PDFParserSDK_GetImageLength()
VeryPDF_PDFParserSDK_GetImageData()
VeryPDF_PDFParserSDK_GetTextInfoData()

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)
powerpoint to flash

pptconv problems

We are having trouble with your pptconv product.

I am using pptconv with MS Office 2007 on a Windows 2008 (64-bit) system.

The attached PPT file, when converted with the following command:

pptconv -unicode pics-1.ppt  pics-1.pdf

... has two problems:

1) the shadow until the title text on slide 1 is terribly dithered and creates a quality issue for us
2) the clipart drawing on slide 2 renders as a vertical line... this happens for any similar clipart.

Can you give us a workaround?  Thanks,
=============================================
Here is the sample doc.
=============================================

Thanks for your sample PPT file, please look at attached SWF file and PDF file, these SWF and PDF files were converted by our PPT to Flash Converter product, these SWF and PDF files are look fine, please feel free to let us know if you have any question for these files.

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

Also, you can download DOC to Any Converter from following web page to try, you can use DOC to Any Converter to convert this PPT file to high quality PDF file,

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

for example,

doc2any.exe D:\temp5\pics-1.ppt D:\temp5\pics-1.pdf

please refer to converted PDF file in attachment.

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

Thank you for your response... this route sounds promising as we already own 2 doc2any licenses; however, when I try to run doc2any on this file I get the following error:

C:\Users\Administrator>doc2any  "z:\pics-1.ppt"   c:\temp\pics-1.pdf
Thank you for choosing our product.
Loading "z:\pics-1.ppt" file...[20%]
Shutdown PowerPoint Application...[60%]
Prepare to convert "z:\pics-1.ppt" file...[10%]
Loading "z:\pics-1.ppt" file...[20%]
Shutdown PowerPoint Application...[60%]
[FAILED] Can't locate EMF files.
Conversion time = 827ms
z:\pics-1.ppt ==> c:\temp\pics-1.pdf, result=ERROR
TickCount = 827ms(0.83s), Result = 0

Can you help me understand what the issue is?  We use doc2any to convert other documents such as .Doc and .XLS without such errors.
==============================
We suggest you may copy the PPT file from Z:\ to local disk first, e.g., C:\ and run following command lines to try again,

doc2any  "C:\pics-1.ppt"   c:\temp\pics-1.pdf

doc2any  -useprinter -useoffice 1 "C:\pics-1.ppt"   c:\temp\pics-1.pdf

can you work fine with above command lines?

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)
docprint pro

Download doc2print installer

Hi there,

I rebuilt my machine and want to re-install the doc2print driver which I have an application integrated with (my application converts documents to image).

But I cannot download the driver from your website.

Below is the error I had when clicking on the link to download:

<Error>
<Code>InternalError</Code>
<Message>
We encountered an internal error. Please try again.
</Message>
<RequestId>XXXXXXXXXXXXXXX</RequestId>
<HostId>XXXXXXXXXXXXXXXXXXX</HostId>
</Error>

Please let me know asap because I need to launch my application again.

Thanks.
====================================
Thanks for your message, are you using docPrint product? if yes, you can download it from our website directly,

https://www.verypdf.com/artprint/index.html#dl

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

Thanks a lot for your help. I installed the driver.

But I have problem to generate image for MS Office document, hope you can help me. My situation is:
1. I have a schedule job written in Java to load all documents that need to generate preview.
2. From the job, I call my business logic to generate the previews for selected document.
3. In my business logic (written in Java), I create a bat file (whose the content is "demo_converter_cmd.exe input_test.pdf output_test.jpg" ) and execute that file
4. Everything runs fine until my business logic has to generate previews for MS Office document, it's stuck in the process of executing the bat file forever.
5. There is no problem on my developer machine (32-bit), but the problem occurs on production server (64-bit)

I am looking forward to your help.

====================================
Just for checking, can you run following command line to convert your DOC file to JPG files correctly by manual?

"C:\Program Files\docPrint Pro v5.0\doc2pdf.exe" -i C:\input.doc -o C:\output%.jpg

If you can run above command line to convert DOC file to JPG file by manual in CMD window, you can call "C:\Program Files\docPrint Pro v5.0\doc2pdf.exe" from your Java code directly to convert DOC files to JPEG files, you can also use Example 6 or Example 7 at following web page,

https://www.verypdf.com/artprint/docprintsdk.htm

if you have any other questions for the docPrint Pro product, please refer to following web page,

https://www.verypdf.com/wordpress/category/docprint-pro

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

I really appreciate your reply. The reason why I have to run the cmd as "demo_converter_cmd.exe input_test.pdf output_test.jpg" because I have to manually modify the C++ code to serve our purpose, So what's going wrong with my way?
=================================
demo_converter_cmd.exe does convert PDF file to JPEG files too, demo_converter_cmd.exe is call the docPrint_DocumentConverter() function to convert PDF file to JPEG files, in general, this function should work without any problem.

However, you can also use CreateProcess() function to call "C:\Program Files\docPrint Pro v5.0\doc2pdf.exe" to convert PDF file to JPEG files directly, for example,

~~~~~~~~~~~~~~~~~~~~~
Char *lpCmd = "\"C:\\Program Files\\docPrint Pro v5.0\\doc2pdf.exe\" -i C:\\input.doc -o C:\\output%.jpg";

PROCESS_INFORMATION ProcessInfo; //This is what we get as an [out] parameter
STARTUPINFO StartupInfo; //This is an [in] parameter
ZeroMemory(&StartupInfo, sizeof(StartupInfo));
StartupInfo.cb = sizeof StartupInfo ; //Only compulsory field
if(CreateProcess(lpCmd, NULL, NULL,NULL,FALSE,0,NULL, NULL,&StartupInfo,&ProcessInfo))
{
WaitForSingleObject(ProcessInfo.hProcess,INFINITE);
CloseHandle(ProcessInfo.hThread);
CloseHandle(ProcessInfo.hProcess);
}
else
{
MessageBox("The process could not be started...");
}
~~~~~~~~~~~~~~~~~~~~~

We hoping this solution will work fine to you, you may give it a try.

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

Thanks a lot for your help.

However, I could not resolve my problem yet. I wonder how I can specify my license key in your suggestion (sample of how to run by java)?
Whenever I try to generate previews for MS Office documents, the process of doc2pdf.exe keeps running in Task Manager (I left the process run for 12hours but seems to run endlessly).

I am looking forward to your help.
========================================

Please refer to example 6 and example 7 at following web page, these examples may helpful to you,

https://www.verypdf.com/artprint/docprintsdk.htm

Example 6: Run conversion via "docPrint_Service.exe" application,

Please by following steps to run conversion via "docPrint_Service.exe" application,

1. Please login your server via Remote Desktop under Administrator user account (or other user accounts who own Administrator right),

2. Please run "docPrint_Service.exe" application,

"C:\Program Files\docPrint Pro v5.0\docPrint_Service.exe"

3. Call RunCmd() method to deliver a command line to "docPrint_Service.exe" application,

PHP example,

<?php
$com = new COM("DocPrintCom.docPrint");
$com->docPrintCOM_Register("XXXXXXXXXXXXXX","VeryPDF.com Inc.");
$com->RunCmd("-i https://www.verypdf.com -o C:\\test\\output.pdf -* XXXXXXXXXXXXXX -d -O 2 -s ShowHTMLStatusBar=1 -l 10000", 0);
?>

VB example,

Private Sub Command1_Click()
Set docPrint = CreateObject("DocPrintCom.docPrint")
nRet = docPrint.docPrintCOM_Register("XXXXXXXXXXXXXX", "VeryPDF.com Company")
nRet = docPrint.RunCmd("-i https://www.verypdf.com -o C:\output.pdf -* XXXXXXXXXXXXXX -d -O 2 -s ShowHTMLStatusBar=1 -l 10000", 0)
MsgBox "Return value = " & Str(nRet)
End Sub

4. Close Remote Desktop and leave this user logged in.

*Please Notice: After you reboot the server, you need login your server via Remote Desktop with this user account ("docPrint_Service.exe" was installed inside this user account), and close Remote Desktop, leave this user logged in, when you call RunCmd() function, the conversion will be executed from this user account automatically.

If you still can’t get above example to work, please create a remote desktop account on your test machine, we will login your test machine to solve this problem for you asap.

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)
verypdf blog

PCLTool in a command line fails for .txt file name

When I try to use the command line to convert the attached file, I get the following messages and it doesn't create a PDF file:

C:\Users\Administrator>"C:\Program Files (x86)\VeryPDF PCL Converter v2.0\pcltoo l.exe" \compu\DATA1\%2.TXT \compu\DATA1\AAAA.PDF VeryPDF.com Inc: 49 Conversion time = 0ms ←&k2S←&k3GJul 13, 2011                                           Available Print er List                                              Page    1 ==> \compu\DATA1\ AAAA.PDF, result=ERROR VeryPDF.com Inc: 99 Conversion time = 0ms
11:26:15                                                     By Sequence
UTLSCQ ==> \compu\DATA1\AAAA.PDF, result=ERROR TickCount = 0ms(0.00s)


But when I use the graphic program to convert it, it works fine.
============================
Please rename your .txt file to .pcl filename first, then you can convert .pcl file to PDF file properly.

Because .txt is a special filename extension, .txt file can be used to store the list of PCL file names for conversion, one PCL file name per line, so you should better rename .txt to .pcl filename before conversion.

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)