PDF to Vector Converter

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

https://www.verydoc.com/pdf-to-vector.html
https://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,

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

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,

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

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,

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

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

pdf2vec.exe -vector drawing.pdf _out_drawing_vector.xps

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

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

pdf2vec.exe -vectorplus drawing.pdf _out_drawing_vectorplus.xps

 

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

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

PDF Viewer OCX Control

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

PDF to DWG Converter

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,

https://www.verydoc.com/pdf-to-dwg-dxf.html
https://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,

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

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

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

This is a screenshot of converted DWG file,

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

VeryDOC

PostScript to PDF Converter

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;

}

 

 

DOC to Any Converter

How to convert Text files to TIFF files?

Is there a reference guide for the command line of Doc2Any? I recently purchased a license for one of our servers to do batch conversion of TXT to TIFF, but there seems to be an error in the conversion, as the files are coming across as garbage and the conversion shows ERROR. I would like to see what the error is and verify i am doing the TIFF conversion correctly.

Customer
------------------------------------
Yes, you can use doc2any to convert text files to TIFF files, please look at following web page for more information,

https://www.verydoc.com/blog/convert-text-to-tiff-and-compress-tiff-by-ccitt-method-through-command-line.html

In general, you can run following command lines to convert text files to TIFF files easily,

doc2any.exe -useprinter -compression 4 "C:\in.txt" C:\out.tif
doc2any.exe -compression 4 "C:\in.txt" C:\out.tif
doc2any.exe -useprinter -compression 4 "C:\in.txt" C:\out.tif
doc2any.exe -multipagetif -useprinter -compression 4 "C:\in.txt" C:\out.tif

If you can't get it work, please feel free to let us know what command line that you used, we will assist you asap.

VeryDOC