DOC to Any Converter

How to convert from office files to PDF files, HTML files and Image files from a Web Service?

Hi,

You seem to have a million PDF to X and X to PDF converters. However I can't seem to find what I'm looking for. I'm trying to find something that can convert office documents to HTML from the command line. I thought https://www.verydoc.com/doc-to-any.html would work, but cannot see how to output to HTML. I want to try to see the quality of the HTML output.

thanks
Customer
---------------------------------------------------------
Yes, "DOC to Any Converter Command Line" does convert office files to HTML files, you may download it from following web page to try,

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

after you download it, you can run following command line to convert your office files to HTML files easily,

doc2any.exe D:\test.doc D:\out.html
doc2any.exe D:\test.docx D:\out.html
doc2any.exe D:\test.xls D:\out.html
doc2any.exe D:\test.xlsx D:\out.html
doc2any.exe D:\test.ppt D:\out.html
doc2any.exe D:\test.pptx D:\out.html

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

I've been testing this. I'm finding that Excel to PNG just freezes the whole Windows 7 machine. Is this a known bug.

Do you have another product that is more stable at converting office files to PNGs?

Customer
---------------------------------------------------------
Thanks for your message, you can run following command lines to convert your office files to PNG files with stable conversion,

doc2any.exe -useprinter -useoffice 1 D:\test.doc D:\out.png
doc2any.exe -useprinter -useoffice 1 D:\test.docx D:\out.png
doc2any.exe -useprinter -useoffice 1 D:\test.xls D:\out.png
doc2any.exe -useprinter -useoffice 1 D:\test.xlsx D:\out.png
doc2any.exe -useprinter -useoffice 1 D:\test.ppt D:\out.png
doc2any.exe -useprinter -useoffice 1 D:\test.pptx D:\out.png

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

Yes, that works better. However the PNGs produced from an Excel file are rotated at the wrong angle - in the print preview the sheets are set to landscape, but doc2any produces them vertically. Can it not auto detect stuff like this? Also there are a lot of blank pages/images produced, there are 3 tabs and one of which is long, but it seems to produce the blank areas of the other tabs.

kind regards
Customer
---------------------------------------------------------
Hi,

Any question - is doc2any the fastest tool you have for converting Office Docs to PDFs via the virtual printer? Do you have anything quicker or more suited?

many thanks
Customer
---------------------------------------------------------
Yes, doc2any.exe is the fastest tool to convert office files to PDF files with or without virtual printer, we haven't another quicker tool yet.

VeryDOC
---------------------------------------------------------
Ok thanks,

I've decided to go the PDF root rather than PNGs. I'll need to call the doc2any from c# rest Web Service. I see there is VeryPDFComRunCmd - can I use this? Do you have any C# examples? I need to be able to pass the doc and then get the result and the file produced.

Which would be best?

Also can you provide the correct link to buy as I find the website hard to find the correct product.

thanks
Customer
---------------------------------------------------------
Yes, you can call doc2any.exe from your C# code by VeryPDFComRunCmd, this can be done easily, please look at following web pages for more information,

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

https://www.verydoc.com/blog/how-to-call-doc2any-exe-from-php-source-code.html

https://www.verydoc.com/blog/verydoc-doc-to-any-converter-command-line-v3-5-release-notes-convert-word-to-pdf-without-office-and-openoffice.html

https://www.verydoc.com/blog/how-to-convert-ms-office-documents-docx-xlsx-to-a-pdf-file-from-classic-asp-source-code.html

http://www.verypdf.com/wordpress/201405/how-to-call-doc2pdf-exe-from-net4-5-windows-service-which-written-in-c-source-code-40589.html

>>Also can you provide the correct link to buy as I find the website hard to
find the correct product.

Thanks for your message, you can buy "DOC to Any Converter Command Line" from following web page,

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

VeryDOC

PCL, PS, PDF Page Counter

PDF Page Counter SDK, Pages BW or Color, how to get color, gray, black and white color information from PDF, PS, PCL, PRN, SPL-EMF, etc. spool file formats?

Dear,

We bought the Spool File Page Counter SDK Server License last year.

In VC, we change the code "printf" by "fprintf" meaning out to a file.
But the information as :
"Page 1 is [Color]
Page 2 is [Color]
Page 3 is [ BW]"
etc. ...
always "print" on the console !

On the VeryDOC knowledge base:
http://www.verypdf.com/wordpress/201106/counting-the-exact-number-of-pages-in-any-pdf-document-732.html#comments

you wrote :
"In the demo version, the following information is printed to console only" ... "after you purchase it, we will send a new version of SDK to you, you will able to get color information for each page from SDK easily, the demo version hasn’t this function yet."

==> Please can you send us the good one version of the SDK.
Regards
Customer

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

Thanks for your message, please download the latest version of "Spool File Page Counter SDK" from following URL,

https://www.verydoc.com/ps-and-pcl-info-sdk.zip

the latest version of "Spool File Page Counter SDK" has included this function, you can get the color information from each PDF/PS/PCL/PRN/SPL/EMF/EMF-SPL page using following source code,

void DumpInformation(char *lpInFile, BOOL bIsRenderToPDF)
{
    char drive[_MAX_DRIVE];
    char dir[_MAX_DIR];
    char fname[_MAX_FNAME];
    char ext[_MAX_EXT];
   
    _splitpath(lpInFile, drive, dir, fname, ext );
   
    DWORD bwPageCount = 0;
    DWORD colorPageCount = 0;
    DWORD copyCount = 0;
    double nPageWidth = 0;
    double nPageHeight = 0;
    char szPaperSizeName[200] = {0};
    BOOL bRet = FALSE;
   
    ReadInfoSetCode("XXXXXXXXXXXXXXXXXXX");
    ReadInfoEnableDebug(1);
    if(!stricmp(ext, ".ps") || !stricmp(ext, ".eps"))
        bRet = ReadInfoFromPSFile(lpInFile, bIsRenderToPDF, &bwPageCount, &colorPageCount, &copyCount, &nPageWidth, &nPageHeight, szPaperSizeName);
    else if(!stricmp(ext, ".pcl"))
        bRet = ReadInfoFromPCLFile(lpInFile, bIsRenderToPDF, &bwPageCount, &colorPageCount, &copyCount, &nPageWidth, &nPageHeight, szPaperSizeName);
    else
        bRet = ReadInfoFromAllFormats(lpInFile, bIsRenderToPDF, &bwPageCount, &colorPageCount, &copyCount, &nPageWidth, &nPageHeight, szPaperSizeName);
    printf("=======================================\n");
    printf("File = '%s'\n", lpInFile);
    printf("Return Value = %s\n", bRet?"TRUE":"FALSE");
    printf("bIsRenderToPDF = %d\n", bIsRenderToPDF);
    printf("bwPageCount = %d\n", bwPageCount);
    printf("colorPageCount = %d\n", colorPageCount);
    printf("copyCount = %d\n", copyCount);
    printf("PageWidth = %g\n", nPageWidth);
    printf("PageHeight = %g\n", nPageHeight);
    printf("PaperSizeName = '%s'\n", szPaperSizeName);

    if(bIsRenderToPDF)
    {
        int nPageCount = ReadInfoGetPageCount();
        printf("Color Information for each page (%d pages):\n", nPageCount);
        for(int i = 0; i < nPageCount; i++)
        {
            int nColor = ReadInfoGetPageColorInfo(i);
            switch(nColor)
            {
            case 1:
                printf("Page %3d is [Color]\n", i+1);
                break;
            case 2:
                printf("Page %3d is [   BW]\n", i+1);
                break;
            case 3:
                printf("Page %3d is [ Gray]\n", i+1);
                break;
            default:
                printf("[Failed to get color information from Page %3d]\n", i+1);
                break;
            }
        }
    }
    printf("\n\n\n");
}

VeryDOC

PostScript to Image Converter, PostScript to PDF Converter, PostScript to Text Converter

How to call "PS2Image.PS2ImageClass" from ASP source code to convert from PS files to image files?

Hello,

I purchased a license for PS2IMG this morning but I don't get the COM component to work on a 64bit Windows 2008 R2 server.

First, after purchasing the component I downloaded the ZIP from the URL in your confirmation mail ( https://www.verydoc.com/download/ps2imgsdk.zip ) but when I unpacked it and ran test.bat it kept saying 'Evaluation version of the PDF/PS Converter SDK product'.

I continued anyway installing the component using COM-DLL-x64-install.bat. It installs fine and confirms the DLL is successfully registered. But when I try to initiate it from ASP:

set ps2imgObj = Server.CreateObject("PS2Image.PS2ImageClass")

it returns:

006~ASP 0177~Server.CreateObject Failed~800401f3

After reading some faq's on your website i tried one more thing, to use 'ps2imgcom.exe'. After uninstalling the first try (COM-DLL-x64-uninstall.bat) I unpacked your ZIP in C:\Program Files\ps2imgsdk\ and ran in de bin directory ps2imgcom.exe /regserver. But now Server.CreateObject("PS2Image.PS2ImageClass") returns:

006~ASP 0178~Server.CreateObject Access Error~The call to Server.CreateObject failed while checking permissions. Access is denied to this object.

I gave the Windows 'users' user group full control over the C:\Program Files\ps2imgsdk\ directory.

Now I don't know what to try anymore, do you have suggestions for me to get it running?

Thanks!
Customer
------------------------------------------------
Thanks for your message.

You need set permission to "PS2Image.PS2ImageClass" in your system first, if you don't know how to do, please look at following web page,

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

In this example, please assume "Your COM Name" is "PS2Image.PS2ImageClass", please allow "Everyone" user to access to this COM component, then you can call it from your ASP application properly.

VeryDOC

HTMLPrint to Any Converter

How to print HTML file or Web URL to PDF or Postscript or EMF or Image (TIFF, JPG, PNG, etc.) files?

When using -printtopdf is there a way to tell it where the PostScript is?

Is there a list of all the options that can be used in -ps2pdfopt?

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

How to print HTML file or Web URL to PDF or Postscript or EMF or Image (TIFF, JPG, PNG, etc.) files?
>>When using -printtopdf is there a way to tell it where the PostScript is?

Yes, you can run following command line to specify output path for PS file,

html2any.exe -printtopdf C:\out.pdf http://www.verypdf.com

html2any.exe -printtopdf C:\out.pdf -ps2pdfopt "-ownerpwd owner -keylen 2 -encryption 3900" http://www.verypdf.com

html2any.exe -printtopdf C:\out.pdf -ps2pdfopt "-subject \"subject\" -creator \"creator\"" http://www.verypdf.com

html2any.exe -printtopdf C:\out.pdf -ps2pdfopt "-$ XXXXXXXXXXXX" http://www.verypdf.com

How to print HTML file or Web URL to PDF or Postscript or EMF or Image (TIFF, JPG, PNG, etc.) files?

>>Is there a list of all the options that can be used in -ps2pdfopt?

Please look at command line options which supported by -ps2pdfopt at below,

E:\htmlprint2any_cmd\ps2pdf.exe
VeryDOC PS to PDF Converter v2.1
Web: http://www.verypdf.com
Web: https://www.verydoc.com
Email: support@verypdf.com
Build: Sep 12 2009
-------------------------------------------------------
Key features in ps2pdf.exe:
Convert postscript files to Acrobat PDF files.
Merge PDF files into one PDF file.
Convert PDF files to postscript files.
Burst PDF file to single page PDF files.
Set document summary to output PDF files.
Set encryption options to output PDF files.
Remove empty pages from PDF file automatically.
Rotate PDF pages during conversion.
-------------------------------------------------------
Usage: ps2pdf.exe [options] [Options] <PS file> [PDF file]
-mode <int> : set mode for PS to PDF conversion,
        -mode 0: convert Postscript to PDF file quickly, default
        -mode 1: convert Postscript to PDF file by second method
        -mode 2: convert Postscript to EMF and merge EMF files into PDF file
        -mode 3: convert Postscript to PDF by ghostscript
-firstpage <int> : First page to print, from 1 to max page
-lastpage <int> : Last page to print, from 1 to max page
-producer <string> : Set 'producer' to PDF file
-creator <string> : Set 'creator' to PDF file
-subject <string> : Set 'subject' to PDF file
-title <string> : Set 'title' to PDF file
-author <string> : Set 'author' to PDF file
-keywords <string> : Set 'keywords' to PDF file
-openpwd <string> : Set 'open password' to PDF file
-ownerpwd <string> : Set 'owner password' to PDF file
-keylen <int> : Key length (40 or 128 bit)
        -keylen 0: 40 bit RC4 encryption (Acrobat 3 or higher)
        -keylen 1: 128 bit RC4 encryption (Acrobat 5 or higher)
        -keylen 2: 128 bit RC4 encryption (Acrobat 6 or higher)
-encryption <int> : Restrictions
        -encryption 0: Encrypt the file only
        -encryption 3900: Deny anything
        -encryption 4: Deny printing
        -encryption 8: Deny modification of contents
        -encryption 16: Deny copying of contents
        -encryption 32: No commenting
===128 bit encryption only -> ignored if 40 bit encryption is used
        -encryption 256: Deny FillInFormFields
        -encryption 512: Deny ExtractObj
        -encryption 1024: Deny Assemble
        -encryption 2048: Disable high res. printing
        -encryption 4096: Do not encrypt metadata
-rotate <int> : Rotate pages, 90, 180, 270
-noempty : Delete empty pages from PDF file
-mergepdf <string> : Merge two PDF files into one PDF file
        -mergepdf <file1|file2|file3|...>: Merge several PDF files into one
        -burstpdf <string> : Burst PDF file into single page PDF files
-pdf2ps <string> : Convert PDF to PS directly
-$ <string> : Input registration key
Example:
ps2pdf.exe C:\input.ps
ps2pdf.exe C:\input.ps C:\output.pdf
ps2pdf.exe -firstpage 1 -lastpage 20 C:\input.ps C:\output.pdf
ps2pdf.exe -subject "subject" C:\in.ps C:\out.pdf
ps2pdf.exe -producer "producer" C:\in.ps C:\out.pdf
ps2pdf.exe -creator "creator" C:\in.ps C:\out.pdf
ps2pdf.exe -ownerpwd owner -keylen 2 -encryption 3900 C:\in.ps C:\out.pdf
ps2pdf.exe -mergepdf "C:\1.pdf|C:\2.pdf|C:\3.pdf" C:\out.pdf
ps2pdf.exe -burstpdf C:\input.pdf C:\output.pdf
ps2pdf.exe -rotate 90 C:\input.ps C:\output.pdf
ps2pdf.exe -mode 1 C:\input.ps C:\output.pdf
ps2pdf.exe -mode 2 C:\input.ps C:\output.pdf
ps2pdf.exe -pdf2ps C:\input.pdf C:\output.ps
ps2pdf.exe -noempty C:\input.ps C:\output.pdf

VeryDOC

PDF Compressor

How to test PDF Compressor SDK from C# source code?

Hi,

I am looking at getting a developer SDK license for the PDF Compressor, I am unable to work out how test this in my Application. i use C#, are you able to help me out or point me in the right direction.

Customer
------------------------------------------
Thanks for your message, you can download and purchase PDF Compressor SDK  from following web page,

https://www.verydoc.com/pdfcompressor.html
https://www.verydoc.com/dl2.php/pdfcompressor_sdk.zip

this pdfcompressor_sdk.zip package is contain C#, VB and VB.NET examples, you can launch a CMD window by administrator privilege, and run following command line to register PDFCompressCom.exe COM into your system,

PDFCompressCom.exe /regserver

then you can compile and run C# project to test PDF Compression function.

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 VeryPDF;
using System.IO;

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

        private void button1_Click(object sender, EventArgs e)
        {
            string appPath = Path.GetDirectoryName(Application.ExecutablePath);
            string strPDFFile = appPath + "\\sample\\test-color-image.pdf";
            string strOutFile = appPath + "\\sample\\test-color-image_out.pdf";
            string strLicenseKey = "-$ XXXX-XXXX-XXXX-XXXX";

            string strCmd = "-ci jpx -cidown -cidownres 150 -gi jpx -gidown -gidownres 150 -mi jbig2 -midown -midownres 150 " + strLicenseKey + " \"" + strPDFFile + "\" \"" + strOutFile + "\"";

            System.Type VeryPDFType = System.Type.GetTypeFromProgID("VeryPDF.PDFCompressCom");
            VeryPDF.PDFCompressCom VeryPDFCom = (VeryPDF.PDFCompressCom)System.Activator.CreateInstance(VeryPDFType);
            string strReturn = VeryPDFCom.PDFCompressor(strCmd);
            MessageBox.Show(strReturn);
        }
    }
}

VeryDOC

See Also:

https://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-a-new-version-of-pdf-compressor-sdk-software-today.html