[VeryDOC Release Notes] VeryDOC Releases a new version of Postscript to Image Converter Command Line to support halftone and without halftone functions

VeryDOC Releases a new version of Postscript to Image Converter Command Line today, the new version has features to enable and disable halftone function when you convert color Postscript and PDF files to black and white image files, here is the command line options,

VeryDOC Postscript to Image Converter Command Line v2.0
Web: http://www.verypdf.com
Web: http://www.verydoc.com
Email: support@verypdf.com
Build: May 27 2014
-------------------------------------------------------
Key features in PS to Image Converter:
   Convert postscript files to various image formats.
   Use disk cache to render postscript to image files at any resolution.
   Various compression arithmetic for output TIFF files.
-------------------------------------------------------
Usage: ps2image.exe [options] [Options] <PS Files>
  -f <int>         : first page to print, from 1 to max page
  -l <int>         : last page to print, from 1 to max page
  -r <int>         : set resolution when render ps to image files
  -c <string>      : set compression method to generated TIFF files
    -c lzw         : Compress TIFF using LZW arithmetic
    -c packbit     : Compress TIFF using packbits arithmetic
    -c g3          : Compress TIFF using CCITT G3 arithmetic
    -c g4          : Compress TIFF using CCITT G4 arithmetic
    -c rlebmp      : Compress BMP using RunLength arithmetic
  -b <int>         : set bitcount when render ps to image files
  -forcebw         : force to create Black and White image file
  -debug           : print debug message
  -silent          : suppress log message
  -$ <string>      : input registration key

Example:
   ps2image.exe C:\input.ps C:\output.tif
   ps2image.exe -c g3 C:\input.ps C:\output.tif
   ps2image.exe -c g4 C:\input.ps C:\output.tif
   ps2image.exe -c lzw C:\input.ps C:\output.tif
   ps2image.exe -c packbit C:\input.ps C:\output.tif
   ps2image.exe C:\input.ps C:\output.jpg
   ps2image.exe C:\input.ps C:\output.bmp
   ps2image.exe C:\input.ps C:\output.pcx
   ps2image.exe C:\input.ps C:\output.png
   ps2image.exe C:\test\*.ps C:\test\*.jpg
   ps2image.exe C:\filelist.txt

If you wish convert a color EPS, PS, PDF file to black and white TIFF file with halftone processing, please run following command line, the default is work in halftone mode,

ps2image.exe -r 300 -b 1 test.eps _test.eps.halftone.tif

This is original color EPS file,

image

This is the converted black and white TIFF file with halftone processing,

image

If you wish disable halftone processing, please run following command line,

ps2image.exe -r 300 -b 8 -forcebw test.eps _test.eps.no_halftone.tif

image

The new version of Postscript to Image Converter Command Line is also support PDF format as input format, it can convert PDF file to a new PDF, Postscript, PS, EPS, TIFF, PNG, JPG, BMP, PCX, TGA, etc. formats, the following are some sample command lines,

ps2image.exe -c rlebmp -r 300 -b 8 test.ps _test.ps.bmp
ps2image.exe -c rlebmp -r 300 -b 8 test.eps _test.eps.bmp
ps2image.exe -r 300 -b 1 test.eps _test.eps.halftone.tif
ps2image.exe -r 300 -b 8 -forcebw test.eps _test.eps.no_halftone.tif
ps2image.exe -r 300 -b 1 verypdf.pdf _verypdf.pdf.halftone.tif
ps2image.exe -r 300 -b 8 -forcebw verypdf.pdf _verypdf.pdf.no_halftone.tif
ps2image.exe verypdf.pdf _verypdf.pdf.ps
ps2image.exe verypdf.pdf _verypdf.pdf.pdf
ps2image.exe test.eps _test.eps.pdf
ps2image.exe multi-page-test.ps _multi-page-test.ps.pdf

Postscript to Image Converter Command Line can be downloaded from following web page,

http://www.verydoc.com/ps-to-image.html
http://www.verydoc.com/ps2img.zip

if you encounter any problem, please feel free to let us know, we are glad to assist you asap,

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

VN:F [1.9.20_1166]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in Postscript to Image Converter | Tagged , | Leave a comment

[VeryDOC Release Notes] VeryDOC PDF to Vector Converter Command Line does support -vector, -vectorplus, -vectorgray options

VeryDOC has released a new version of PDF to Vector Converter Command Line today, the new version is support -vector, -vectorplus, -vectorgray options, these options will render PDF file to vector graphics first, print vector graphics to Windows Printer and create XPS, PCL, Postscript etc. file formats.

http://www.verydoc.com/pdf-to-vector.html
http://www.verydoc.com/pdf2vec_cmd.zip

-vector                  : render PDF page to vector EMF before printing
-vectorplus         : render PDF page to vector EMF with GDIPlus before printing
-vectorgray         : render PDF page to vector EMF with grayscale before printing

Some Command Line examples,

pdf2vec.exe drawing.pdf _out_drawing.xps
pdf2vec.exe -vector drawing.pdf _out_drawing_vector.xps
pdf2vec.exe -vectorplus drawing.pdf _out_drawing_vectorplus.xps
pdf2vec.exe -vectorgray test.pdf _out_drawing_vectorgray.xps
pdf2vec.exe -vectorgray test.pdf _out_drawing_vectorgray.pcl
pdf2vec.exe -vectorgray -psmode 0 test.pdf _out_drawing_vectorgray.ps

This is original PDF file, it is contain color information,

image

With -vectorgray option, we can convert all color objects to grayscale colorspace in a new XPS file, here is a screenshot of output XPS file,

image

This XPS file was created from following command line,

pdf2vec.exe -vectorgray test.pdf _out_drawing_vectorgray.xps

-vectorplus option does use GDIPlus module to render PDF file to XPS file, this is original PDF file, this PDF file is contain lots of drawings,

image

The following output XPS file is created by -vector option,

pdf2vec.exe -vector drawing.pdf _out_drawing_vector.xps

image

The following output XPS file is created by -vectorplus option,

pdf2vec.exe -vectorplus drawing.pdf _out_drawing_vectorplus.xps

 

image

-vectorplus and -vector two parameters have some difference on output XPS file, you can download the trial version and test them by yourself.

VN:F [1.9.20_1166]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in PDF to Vector Converter | Tagged | Leave a comment

How to use PDF Viewer OCX (ActiveX Control) to view the PDF file from memory?

Is there any complete reference/documentation (website, Document or CHM-file) to the PDFView ActiveX control?

I have downloaded the free trial version of the control, to demo the features of the control to our customer, and would like to use the OpenPDFFromMem - method, but as I see is there only some examples to illustrate some of the features of the control.

Best regards
Customer
--------------------------------------------------
Thanks for your message, OpenPDFFromMem() function does open and view the PDF file from memory,

BOOL OpenPDFFromMem(long lpPDFData, long nPDFDataLen, LPCTSTR lpszUserPwd, LPCTSTR lpszOwnerPwd);

Please refer to following C++ example for this function,

void CSampleDlgDlg::OnBnClickedButtonOpen()

{

    char szFilter[] ="PDF File (*.pdf)|*.pdf||";

    CFileDialog  fSaveDlg(TRUE,"","",

        OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,

        szFilter,this);

    if(fSaveDlg.DoModal() != IDOK)

        return;

    CString strFileName = fSaveDlg.GetPathName();

 

#if 0

    m_PDFViewer.OpenPDF(strFileName, "", "");

   

#else

    //----------------------------------------------------------------

    //

    // Memory Open

    //

    //----------------------------------------------------------------

    CString tmp = _T( "" );

    HANDLE          hFile = ::CreateFile( strFileName, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );

    if ( hFile == INVALID_HANDLE_VALUE )

    {

        tmp.Format( _T( "CreateFile ERROR [CODE = %d]" ), GetLastError() );

        AfxMessageBox( tmp );

        return;

    }

 

    DWORD            dwRead;

    DWORD            dwSize = ::GetFileSize( hFile, NULL );

    BYTE*              pBuffer = new BYTE[ dwSize ];

    memset(pBuffer, 0, dwSize);

 

    if ( !::ReadFile( hFile, (LPVOID)pBuffer, dwSize, &dwRead, NULL ) )

    {

        tmp.Format( _T( "ReadFile ERROR [CODE = %d]" ), GetLastError() );

        AfxMessageBox( tmp );

 

        ::CloseHandle( hFile );

        return;

    }

 

    ::CloseHandle( hFile );

 

    BOOL bRes = m_PDFViewer.OpenPDFFromMem((long)pBuffer, dwSize, "", "" );

    if ( !bRes )

    {

        AfxMessageBox( _T( "Open error!" ) );

    }

#endif

 

    CString csCurrentPage = _T( "" );

    csCurrentPage.Format( _T( "Current Page : %d" ), m_PDFViewer.GetCurrentPage() );

    AfxMessageBox( csCurrentPage );

 

    m_PDFViewer.SetMsgCallbackWnd((long)m_hWnd);

}

 

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 Viewer OCX Control | Tagged | Leave a comment

PDF to DWG Converter. How to convert a multi-page PDF file to single page DWG files?

I have a PDF file with 2 pages, I want convert each page to a DWG file, I need to PDF to DWG Converter software, where to get it?

Thank you.
Customer
------------------------------------------------
You may download VeryDOC PDF to DWG Converter Command Line software from following web page to try,

http://www.verydoc.com/pdf-to-dwg-dxf.html
http://www.verydoc.com/pdf2dwg.zip

you can run following command line to convert your PDF file to DWG files, one PDF page will create one DWG file,

pdf2dwg.exe D:\downloads\test.pdf  D:\downloads\out-%d.dwg

This is original PDF file with 2 pages,

image

Here are converted two DWG files, one PDF file will create one DWG file,

image

This is a screenshot of converted DWG file,

image

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)
Posted in PDF to DWG Converter | Tagged , | 2 Comments

A C++ example to convert Postscript files to PDF files simultaneously

This is a VC++ source code example, this example does call ps2pdf.exe in a multiple threads and convert more PS files to PDF files concurrently,

 

#include <stdio.h>

#include <tchar.h>

#include <windows.h>

 

DWORD WINAPI PS2PDF_Thread(LPVOID lpParameter)

{

    int threadNum = (int)lpParameter;

 

    printf("Thread %d started\n", threadNum);

 

    PROCESS_INFORMATION pi = {0};

    char commandLine[4096] = {0};

    char threadNumStr[16] = {0};

   

    STARTUPINFO StartupInfo = {0};

    StartupInfo.cb = sizeof(STARTUPINFO);

    StartupInfo.dwFlags = STARTF_USESHOWWINDOW;

    StartupInfo.wShowWindow = SW_HIDE;

 

    _itoa(threadNum, threadNumStr, 10);

 

    strcpy(commandLine, "ps2pdf.exe -debug");

    strcat(commandLine, " \"pdftest");

    strcat(commandLine, threadNumStr);

    strcat(commandLine, ".ps\"");

 

    printf("Thread %d process starting %S\n", threadNum, commandLine);

 

    BOOL cpSuccess = CreateProcess(NULL, commandLine, NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL, &StartupInfo, &pi);

   

    if (cpSuccess == FALSE)

    {

        printf("Thread %d process failed to start\n", threadNum);

    }

 

    printf("Thread %d process started\n", threadNum);

 

    DWORD waitResult = WaitForSingleObject(pi.hProcess, INFINITE);

   

    printf("Thread %d process finished\n", threadNum);

 

    if (waitResult != WAIT_OBJECT_0)

    {

        printf("Thread %d process wait = %d\n", threadNum, waitResult);

    }

 

    if (pi.hProcess != NULL)

    {

        CloseHandle (pi.hProcess);

        pi.hProcess = NULL;

    }

 

    if (pi.hThread != NULL)

    {

        CloseHandle (pi.hThread);

        pi.hThread = NULL;

    }

 

    printf("Thread %d finished\n", threadNum);

 

    return 0;

}

 

int _tmain(int argc, _TCHAR* argv[])

{

    int numThreads = 10;

    HANDLE* hThread = NULL;

 

    printf("Running %d threads\n", numThreads);

 

    for (int i = 0; i < numThreads; i++)

    {

        wchar_t pdfFileName[32] = {0};

        wchar_t threadNumStr[16] = {0};

 

        _itow(0, threadNumStr, 10);

 

        wcscpy(pdfFileName, L"pdftest");

        wcscat(pdfFileName, threadNumStr);

        wcscat(pdfFileName, L".pdf");

 

        DeleteFileW(pdfFileName);

    }

 

    hThread = new HANDLE[numThreads];

 

    for (i = 0; i < numThreads; i++)

    {

        hThread[i] = ::CreateThread(NULL, 0, PS2PDF_Thread, (LPVOID)i, CREATE_SUSPENDED, NULL);

    }

 

    for (int j = 0; j < numThreads; j++)

    {

        ResumeThread(hThread[j]);

    }

 

    WaitForMultipleObjects(numThreads, hThread, TRUE, INFINITE);

 

    if (hThread != NULL)

    {

        delete []hThread;

        hThread = NULL;

    }

   

    printf("Press [Enter] to exit.\n");

    getchar();

 

    return 0;

}

 

 

VN:F [1.9.20_1166]
Rating: 8.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: -1 (from 1 vote)
Posted in Postscript to PDF Converter | Tagged | Leave a comment
Page 20 of 331« First...10...1819202122...304050...Last »