We are evaluating your software in order to convert a gray scale pdf image to mono G4 tiff

We are evaluating your software in order to convert a gray scale pdf image to mono G4 tiff.
I tried the command line:

pdf2img -r 300 - compress 4 -mono -multipage Infile Outfile

The original file is 12 pages gray scale. The process takes 5-7 seconds on a 16 core server. The main issue is that the resulting tif has an unacceptable level of dithering.

Do you have any suggestions?
Customer
---------------------------------------
Please use -threshold option to try again, for example,

pdf2img.exe -r 300 -threshold 180 -multipage test3.pdf _pdf2bw_threshold.tif
pdf2img.exe -r 300 -threshold 180 test3.pdf _pdf2bw_out.png

This is original PDF file,

image

The following image was created by following command line,

pdf2img.exe -r 300 -mono test3.pdf _pdf2bw_mono.png

image

The following image was created by following command line, the resultant TIFF file is a multi-page TIFF file,

pdf2img.exe -r 300 -threshold 180 -multipage test3.pdf _pdf2bw_threshold.tif

image

The following image was created by following command line,

pdf2img.exe -r 300 -threshold 180 test3.pdf _pdf2bw_out.png

image

If you still have same problem, please send to us your sample PDF file, we will check your PDF file and figure out a best command line to 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)
Posted in PDF to Image Converter | Tagged | Leave a comment

How to compress color images, grayscale images and monochrome images in PDF files?

Hello,

Our company is interested in purchasing an API that would allow us to create executable letting us compress PDF images. When I investigated the APIs offered, I didn't notice this option, but we do like your PDF compressor for our purposes, so I'm hoping there's something I missed.

Customer
------------------------------------------------
Thanks for your message, yes, we have PDF Compressor SDK product, you can download and purchase it from following web page,

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

You can run "install.vbs" to install PDFCompressCom.exe into your system first, then you can use following C# code to compress PDF files easily,

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);

        }

    }

}

 

Or you can use following VB.NET source code to compress image files in PDF file,

 

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

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in PDF Compressor | Tagged | Leave a comment

VC++ source code for EMF to Text Converter, Text Extraction from EMF and PDF formats

#include <windows.h>

#include <stdio.h>

#include <string>

using namespace std;

 

typedef BOOL  (__stdcall *EMF2TXTFunc)(LPCTSTR lpEMFFile, LPCTSTR lpTextFile, BOOL bAppend);

typedef BOOL  (__stdcall *PDF2TXTFunc)(LPCTSTR lpPDFFile, LPCTSTR lpTextFile);

typedef BOOL  (__stdcall *EMF2TXTWFunc)(LPCWSTR lpEMFFile, LPCWSTR lpTextFile, BOOL bAppend);

typedef BOOL  (__stdcall *PDF2TXTWFunc)(LPCWSTR lpPDFFile, LPCWSTR lpTextFile);

 

EMF2TXTFunc      VeryPDF_EMF2TXT = NULL;

PDF2TXTFunc      VeryPDF_PDF2TXT = NULL;

EMF2TXTWFunc     VeryPDF_EMF2TXTW = NULL;

PDF2TXTWFunc     VeryPDF_PDF2TXTW = NULL;

 

void GetModulePath(char *out_path,char *in_name)

{

      char *p;

      GetModuleFileName(NULL,out_path,256);

      p =strrchr(out_path,'\\');

      p[1]=0;

      strcat(out_path,in_name);

}

 

string GetFullPath(char *in_name)

{

      char szFileName[2000] = {0};

      GetModuleFileName(NULL,szFileName,sizeof(szFileName));

      char *p = strrchr(szFileName, '\\');

      if(p)

           p[1] = 0;

      strcat(szFileName, in_name);

      return szFileName;

}

 

wstring GetFullPath(wchar_t *in_name)

{

      wchar_t wszFileName[2000] = {0};

      GetModuleFileNameW(NULL, wszFileName, sizeof(wszFileName));

      wchar_t *p = wcsrchr(wszFileName, '\\');

      if(p)

           p[1] = 0;

      wcscat(wszFileName, in_name);

      return wszFileName;

}

 

HMODULE LoadDLLLibrary()

{

      BOOL bRet = FALSE;

      char szLibPath[_MAX_PATH];

#if _WIN64

      GetModulePath(szLibPath, "txtsdk64.dll");

#else

      GetModulePath(szLibPath, "txtsdk32.dll");

#endif

      HMODULE dll_handle = LoadLibrary(szLibPath);

      if(dll_handle == NULL)

           return FALSE;

      VeryPDF_EMF2TXT = (EMF2TXTFunc)GetProcAddress(dll_handle, "EMF2TXT");

      if(VeryPDF_EMF2TXT == NULL)

           goto _failed;

      VeryPDF_PDF2TXT = (PDF2TXTFunc)GetProcAddress(dll_handle, "PDF2TXT");

      if(VeryPDF_PDF2TXT == NULL)

           goto _failed;

      VeryPDF_EMF2TXTW = (EMF2TXTWFunc)GetProcAddress(dll_handle, "EMF2TXTW");

      if(VeryPDF_EMF2TXTW == NULL)

           goto _failed;

      VeryPDF_PDF2TXTW = (PDF2TXTWFunc)GetProcAddress(dll_handle, "PDF2TXTW");

      if(VeryPDF_PDF2TXTW == NULL)

           goto _failed;

 

      return dll_handle;

_failed:

      FreeLibrary(dll_handle);

      return NULL;

}

 

int main(int argc, char* argv[])

{

      HMODULE dll_handle = LoadDLLLibrary();

      if(dll_handle == NULL)

           return 0;

 

      VeryPDF_EMF2TXT(GetFullPath("14214580-0001.emf").c_str(),
           GetFullPath(
"emf2txt.txt").c_str(), TRUE);

      VeryPDF_EMF2TXT(GetFullPath("14214580-0002.emf").c_str(),          

           GetFullPath("emf2txt.txt").c_str(), TRUE);

      VeryPDF_EMF2TXT(GetFullPath("14214580-0003.emf").c_str(),
           GetFullPath(
"emf2txt.txt").c_str(), TRUE);

      VeryPDF_EMF2TXT(GetFullPath("14214580-0004.emf").c_str(),
           GetFullPath(
"emf2txt.txt").c_str(), TRUE);

      VeryPDF_EMF2TXT(GetFullPath("14214580-0005.emf").c_str(),
           GetFullPath(
"emf2txt.txt").c_str(), TRUE);

      VeryPDF_EMF2TXT(GetFullPath("14214580-0006.emf").c_str(),
           GetFullPath(
"emf2txt.txt").c_str(), TRUE);

      VeryPDF_EMF2TXT(GetFullPath("14214580-0007.emf").c_str(),
           GetFullPath(
"emf2txt.txt").c_str(), TRUE);

      VeryPDF_EMF2TXT(GetFullPath("14214580-0008.emf").c_str(),
           GetFullPath(
"emf2txt.txt").c_str(), TRUE);

      VeryPDF_EMF2TXT(GetFullPath("14214580-0009.emf").c_str(),
           GetFullPath(
"emf2txt.txt").c_str(), TRUE);

      VeryPDF_EMF2TXT(GetFullPath("14214580-0010.emf").c_str(),
           GetFullPath(
"emf2txt.txt").c_str(), TRUE);

 

      VeryPDF_PDF2TXT(GetFullPath("testreport.pdf").c_str(),
           GetFullPath(
"pdf2txt.txt").c_str());

 

      VeryPDF_EMF2TXTW(GetFullPath(L"14214580-0001.emf").c_str(),
           GetFullPath(L
"emf2txtW.txt").c_str(), TRUE);

      VeryPDF_EMF2TXTW(GetFullPath(L"14214580-0002.emf").c_str(),
           GetFullPath(L
"emf2txtW.txt").c_str(), TRUE);

      VeryPDF_EMF2TXTW(GetFullPath(L"14214580-0003.emf").c_str(),
           GetFullPath(L
"emf2txtW.txt").c_str(), TRUE);

      VeryPDF_EMF2TXTW(GetFullPath(L"14214580-0004.emf").c_str(),
           GetFullPath(L
"emf2txtW.txt").c_str(), TRUE);

      VeryPDF_EMF2TXTW(GetFullPath(L"14214580-0005.emf").c_str(),
           GetFullPath(L
"emf2txtW.txt").c_str(), TRUE);

      VeryPDF_EMF2TXTW(GetFullPath(L"14214580-0006.emf").c_str(),
           GetFullPath(L
"emf2txtW.txt").c_str(), TRUE);

      VeryPDF_EMF2TXTW(GetFullPath(L"14214580-0007.emf").c_str(),
           GetFullPath(L
"emf2txtW.txt").c_str(), TRUE);

      VeryPDF_EMF2TXTW(GetFullPath(L"14214580-0008.emf").c_str(),
           GetFullPath(L
"emf2txtW.txt").c_str(), TRUE);

      VeryPDF_EMF2TXTW(GetFullPath(L"14214580-0009.emf").c_str(),
           GetFullPath(L
"emf2txtW.txt").c_str(), TRUE);

      VeryPDF_EMF2TXTW(GetFullPath(L"14214580-0010.emf").c_str(),
           GetFullPath(L
"emf2txtW.txt").c_str(), TRUE);

     

      VeryPDF_PDF2TXTW(GetFullPath(L"testreport.pdf").c_str(),
           GetFullPath(L
"pdf2txtW.txt").c_str());

 

      FreeLibrary(dll_handle);

      return 0;

}

 

This is original EMF file,

image

 

The converted text file,image

 

Please feel free contact to VeryPDF if you wish to evaluate this EMF to Text Converter SDK,

 

http://support.verypdf.com/open.php

 

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in VeryPDF SDK & COM | Tagged , | Leave a comment

Text Extraction SDK (Extract ASCII text from PDF, Postscript, EPS, WMF, EMF), Extracting EMF file from SPL file format, Extract text from .emf spool file format

Extracting EMF file from SPL file format
------------------------------------------------------
Hi,

Is there a way to extract the EMF data portion from a .SPL file? From one of the customer site, we have received .SPL file for the particular issue which is failed. I found few viewers via google, but using them I was not able to extract the .EMF data from the .SPL file.

Any suggestion would be really appreciated.

Thanks and warm regards,
Customer
------------------------------------------------------
Hi,

I found out the solution.

You can see this link for details and it triggered my thoughts.

http://msdn.microsoft.com/en-us/library/cc230699.aspx

Here, EMF data starts with "EMF", which is nothing but the indication of beginning of the EMF data for your page. In a .SPL file, there can be many same tags. This indicates that you have multiple pages in it.

As per the above link, before "EMF" we can see 41 bytes are available. I have kept them and removed other data before the first EMF occurrence. And it worked.

Warm Regards,
Customer
------------------------------------------------------
How to extract text from .emf spool file?

Hi, I have an .emf spool file and I want to extract the data (text, images etc).
But how?

I know I have to use EMR_EXTTEXTOUTW or EMR_EXTTEXTOUTA, but I don't know how to use it..

Any help?
Customer
------------------------------------------------------
Text Extraction SDK (Extract ASCII text from PDF, Postscript, EPS, WMF, EMF)

The Text Extraction SDK harnesses the power of its proven engine to extract or strip text from PDF, PostScript and Windows Metafiles (WMF / EMF) files. This highly-flexible DLL or command-line interface generates ASCII text with placement, stripped ASCII text or an ASCII preview, a summary of the first few lines of the file. It can be used to feed web sites, indexing programs and content management systems. The intelligent configuration options offer extensive control over the resulting conversion using a .ini file. Entire files can be converted as easily as a range of pages or a single page. The  SDK requires just two calls to automate the conversion. Developers intending to distribute applications commercially, or to subscribers over the Internet, must purchase the appropriate CPU or Server License. It is easily integrated via a DLL or the command line, enabling its use in virtually any programming environment including Visual Basic, C/C++, Paradox, Delphi, ASP, .NET and more. It is licensed per application or project and includes 500 end-user runtimes or the right to run the resulting process on up to eight limited production servers each supporting conversion of up to 10,000 files per year. For redistribution beyond these limits, additional End-User Runtime Licenses are available. Lite and Unlimited Production Server licenses are also available.
------------------------------------------------------

VeryPDF Metafile, EMF, WMF, Postscript related software,

1. Convert EMF/WMF to PDF using HTML Converter Command Line or EMF to Vector Converter or Metafile to PDF Converter,

HTML Converter Command Line,
http://www.verypdf.com/app/html-converter/try-and-buy.html
http://www.verypdf.com/htmltools/htmltools.zip
http://www.verypdf.com/wordpress/201305/convert-hebrew-emf-files-to-pdf-files-dll-library-36610.html

EMF to Vector Converter,
http://www.verydoc.com/emf-converter.html

Metafile to PDF Converter,
http://www.verydoc.com/emf-to-pdf.html

2. Create EMF/WMF from any printable applications using mini EMF Printer Driver or docPrint or docPrint Pro,

mini EMF Printer Driver,
http://www.verypdf.com/app/mini-emf-printer-driver/index.html

docPrint or docPrint Pro,
http://www.verypdf.com/app/document-converter/try-and-buy.html

3. Convert Postscript to PDF or Postscript to Text files,

Postscript to PDF Converter,
http://www.verydoc.com/ps-to-pdf.html

Postscript to Text Converter,
http://www.verydoc.com/ps-to-text.html

4. Extract from EMF/WMF, PDF, Postscript, EPS formats,

Postscript to Text Converter,
http://www.verydoc.com/ps-to-text.html

PDF to Text OCR Converter Command Line,
http://www.verypdf.com/app/pdf-to-text-ocr-converter/try-and-buy.html

EMF/WMF to Text Converter,
Please contact VeryPDF to request a demo version of EMF/WMF to Text Converter,
http://support.verypdf.com/open.php

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in docPrint Pro, HTML Converter (htmltools), PDF to Text Converter, PDF to Text OCR Command Line | Tagged , , , , , , , | Leave a comment

How to convert from HTML and Web pages to black and white TIFF image files?

Hi Team,

http://www.verypdf.com/app/document-converter/index.html

I have been trying your tool to convert HTML to TIF file. Following command suffice my requirement.

"C:\Program Files (x86)\docPrint Pro v7.0\doc2pdf.exe" -i D:\test.html -o D:\out.tif -b 1 -r 300x300

Please share reference document or code snippet on how to utilize your API in my JAVA or VB.net program to automate the process of conversion.

Customer
-------------------------------------------------
We have created a test .bat file to you, please select and copy following command lines and paste them into a .bat file, e.g., D:\html2tif.bat file,

*************************************
"C:\Program Files (x86)\docPrint Pro v7.0\doc2pdf.exe" -i "%CD%\test.html" -o "%CD%\output_%%04d.png" -b 24 -r 300x300

for %%F in ("%CD%\output_*.png") do "C:\Program Files (x86)\docPrint Pro v7.0\imgconv.exe" -threshold 90%% "%%F" "%%F"

"C:\Program Files (x86)\docPrint Pro v7.0\imgconv.exe" -compress Group4 "%CD%\output_*.png" "%CD%\out.tif"

del "%CD%\output_*.png"

pause
*************************************

Please run html2tif.bat file, you will able to convert HTML file to black and white TIFF file with clear text properly.

If you wish execute the conversion from Java code, you can create "html2tif.bat" file from Java code programmatically, and then call it from your Java code, you will able to convert from HTML file to 1bit TIFF files easily.

VeryPDF
-------------------------------------------------
Thanks for sharing consolidated batch file. However, it doesn't serve our purpose completely as we need a reverse feed/acknowledgement in our program when conversion is completed successfully or in case any error occurred in conversion.

Pls let us know any API mechanism which can be called from our program with proper return message for further handling.

Customer
-------------------------------------------------
Thanks for your message, we have created a new version of HTML2Image COM today, please download the new version from this URL,

http://www.verydoc.com/html-to-image.html
http://www.verydoc.com/dl2.php/html2image_sdk.zip

Please look at the usage at below,

Q: How to use "HTML2ImageCom.exe" COM interface?
A: Please by following steps to use "HTML2ImageCom.exe" COM interface,
1. Run "install.vbs" to install "HTML2ImageCom.exe" COM into your system first,
2. Run "example_VBScript\test.vbs" or following VBScript code to convert a web page to image file,
-----------------------------------
set VeryPDFCom = CreateObject("VeryPDF.HTML2ImageCom")
Set filesys = CreateObject("Scripting.FileSystemObject")
strFolder = filesys.GetParentFolderName(WScript.ScriptFullName)
'strFolder = filesys.GetParentFolderName(strFolder)

VeryPDFCom.EnableDebugLog(1)

strOutFile = strFolder & "\out.png"
strCmd = "-$=XXXXXXXXXXXXXX -url=http://www.verydoc.com -out=" & strOutFile
msgbox strCmd
strReturn = VeryPDFCom.HTML2Image(strCmd)
MsgBox strReturn
-----------------------------------
3. OK, you will get an output image file after a few seconds.

You can call "VeryPDF.HTML2ImageCom" from both 32bit and 64bit applications, we hope this COM will work fine to you.

If this API still can't meet your requirement, please feel free to let us know, we will assist you continue.

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

We are moving our site are new windows2012 64bit, we are not able register html2image.dll on the new server.

Could you help?

We are using your dll on for our .net website.

below is error throws,

Unable to find an entry point named 'HtmlToImageSDKRunCmd' in DLL 'pdfshell.dll'.

But the pdfshell.dll is registered on the windows 2012 64 bit without any issue.

Thanks
Customer
-------------------------------------------------
You can use pdfshell-x64.dll to instead of pdfshell.dll to try again, we hope pdfshell-x64.dll will work fine to you.

pdfshell-x64.dll is for 64bit applications,
pdfshell.dll is for 32bit applications,

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)
Posted in docPrint Pro, HTML to Image Converter | Tagged | Leave a comment
Page 20 of 1,383« First...10...1819202122...304050...Last »