postscript to text converter

Return code from PS to Text SDK Library

We have purchased your product "PS2Image and PS2Text". When using the PS2Text SDK using a C#, I was running the following code

public long Convert2TXT()
{
        long nRet = 0;
        string strCmd = null;
        strCmd = "ps2txt -$ XXXXXXXXXXXXXXX";
        strCmd = strCmd + " \"" + strInFile + "\"";
        strCmd = strCmd + " \"" + strOutFile + "\"";
        nRet = VeryPDF_PSToText(strCmd);
        return nRet;
}

My issue is, when I run the above code, the nRet (the integer that is the result of the command), if this number is zero or less than zero it is not success - right?, but if that number is a positive number it means success - right?

in some case I get number 2, as a result and there is not file output saved - Do you have what error number 2 means?, I was just wondering if you have list of results that show explanations of error outputs.

Thanks,
Customer

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

Thanks for your message, VeryPDF_PSToText() function does return following error codes,
//~~~~~~~~~~~~~~~~~~~
//0: - Success not found any problem.
//1: - Couldn't open PDF file, this PDF file maybe contains an open password or be damaged
//2: - Couldn't open output text file
//10: - Success with found some embed fonts.
//11: - Success with have only embed fonts in PDF file.
//12: - Fail with empty text file such as this PDF is picture scan or PDF have only picture.
//-1: - Fail with other causes (can not convert to text file) such as found exception, time out, not enough memory.
//-11: - Fail with something is wrong in input parameters,
//~~~~~~~~~~~~~~~~~~~

Postscript to Text Converter SDK can be downloaded from following web page,

https://www.verydoc.com/ps-to-text.html
https://www.verydoc.com/ps2txtsdk.zip

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)
pdf to dwg converter

How to convert PDF drawing to AutoCAD file and change the scale of drawing?

Question: I have converted a PDF drawing to a AutoCAD DXF file . how should i change the scale of drawing? I have converted a PDF file to an Dxf file but when i am measuring all dimensions are diff then actual dimensions in drawing. so please tell me how can I change the scale of drawing.

Answer: If a dimension says 10m and the actual measurement is 5 units, you have to modify your dimension style and adjust the DIMLFAC system variable. Decrease the size to half or calculate the scale factor by dividing the actual value with the displayed value. Use the DISTANCE command when checking measurements, not the DIMENSION command.DIMLFAC can be manually adjusted in the "Modify Dimension Style" dialog box, under "Primary Units" tab in the " Measurement Scale" group. Change the "Scale Factor" value.  And there is also another methods that you can use software to convert PDF to AutoCAD directly. VeryDOC PDF to DWG Converter can help you convert PDF to AutoCAD and change the scale of drawing in one command line. 

   If you need to do the conversion and changing in the easiest way, maybe you can have a free trial of this software. Please check more information of this software on homepage. In the following part, I will show you how to use this software.

Step 1. Free download PDF to DWG Converter Command Line

  • This software is Window command line version software, when downloading finishes, there will be a zip file. Please extract it to some folder then you can find the executable file.
  • When call this software from MS Dos Windows, please refer to the usage and examples in readme.txt.

Step 2. Convert PDF to AutoCAD and change the scale of drawing.

  • Here is the usage for your reference: pdf2dwg [options] <pdf-file> [<out-file>]
  • When converting PDF to AutoCAD and scale output drawing, please refer to the following command line templates.
    pdf2dwg.exe -xscale 0.5 -yscale 0.5 C:\test.pdf C:\out.dxf
    When inputting command line, please input options of parameters first then input the full path of input PDF file the the output PDF file. When changing scale of PDF, you may use the following parameters. This software allows you to scale output CAD file from X and Y directions.
  • -xscale <fp>    : scale by a factor in x-direction
    -yscale <fp>    : scale by a factor in y-direction

By this software, you can also do lots of work, like rotating output by any degree (0-360 degree), map colors to layers in CAD drawing and others. More functions could be found in readme.txt. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 1.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
pdf to image converter

How to extract image from PDF and save it as color JPG

When handling PDF file, if you just need the image part of PDF, the following article will be quite helpful for you. In this article, I will show you how to remove text from PDF and only keep the image part of PDF. The software I use is VeryDOC PDF to TIFF Extractor, by which you can save all the color images as JPG files with high quality. The output JPG files can perfectly retain the original color.  Please check more information on software homepage, in the following part, I will show you how to use this software.

Step 1. Install PDF to TIFF Extractor

  • This software is Window version, now it can not be used under Mac and Linux version. When downloading finishes, there will be an exe file in downloading package.
  • Please install this software by double clicking the exe and following installation message. When installation finishes, there will be an icon on the desktop. Simply click the icon then you can launch this software. The following snapshot is from the software interface, please have a check.

software interface of PDF to TIFF Extractor

Step 2. Extract image from PDF and save it as color JPG.

  • When you open software, please click Menu option then you will see the dropdown list. Please choose Option Setting then you can set setting menu option. The following snapshot is from the setting menu option, please have a check.

setting menu option

  • Here you can Set Image Resolutions from Horizontal and Vertical and the unit is DPI.  You can also choose the conversion page range. In the Extract Image Option part, please make sure choose the option of Export color images as JPG files. This option can help you output image as JPG file. As to other options, you can choose them according to your needs.
  • In the image processing part, you can auto detect and rotate landscape pictures. If you need to invert color for white & black pictures, this software also can help you. And this software also can help you flip image from vertical and horizontal direction. 
  • In the bottom part, you can choose name templates.
  • When you finish setting part, please click button OK to back to the main interface.
  • Simply add PDF file to software interface then it will remind you to choose output folder.
  • Then output image file will be shown in output folder at once.

So by this software and this method, we can extract image form PDF and save it as color JPG file. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
postscript to image converter

VeryDOC releases a new version of Postscript to Image Converter Command Line today

VeryDOC has released a new version of Postscript to Image Converter Command Line product today, please download new version from following URL,

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

after you download and unzip it to a folder, you can run following command line to convert your PS file to TIFF file at high quality, e.g., 25000 dpi,

ps2image.exe -r 25000 -b 1 D:\Gray.eps D:\Gray.tif

the new version of EXE is ps2image.exe, but not the ps2img.exe, please notice their difference. The new version of ps2image.exe is support following parameters,

C:\>E:\ps2img\ps2image.exe
VeryDOC Postscript to Image Converter Command Line v2.0
Web:
http://www.verypdf.com
Web: https://www.verydoc.com
Email: support@verypdf.com
Build: Jul 24 2013
-------------------------------------------------------
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 none          : Create TIFF file without compression
    -c lzw           : Compress TIFF using LZW arithmetic
    -c packbits      : Compress TIFF using packbits arithmetic
    -c g3            : Compress TIFF using CCITT G3 arithmetic
    -c g4            : Compress TIFF using CCITT G4 arithmetic
  -b <int>        : set bitcount when render ps to image files
  -debug          : print debug message
  -silent         : print debug message
  -$ <string>     : input registration key
Example:
   ps2image.exe C:\input.ps C:\output.tif
   ps2image.exe -c none 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 packbits 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

The new version of ps2image.exe does use disk file to cache the temporary image data, so in theory, it can render PS file to image file at any high DPI resolution, e.g., up to 50,000 DPI, the output TIFF file may up to 200MB or more, image file’s width and height may become 12,0000x12,0000 pixel or more.

The following command lines can be used to convert ps and eps files to image files easily,

ps2image.exe multi-page-test.ps _multi-page-test.tif
ps2image.exe multi-page-test.ps _multi-page-test_%d.tif
ps2image.exe multi-page-test.ps _multi-page-test_%d.png
ps2image.exe multi-page-test.ps _multi-page-test_%d.jpg
ps2image.exe multi-page-test.ps _multi-page-test_%d.pcx

ps2image.exe test.ps _test.ps.tif
ps2image.exe test.ps _test.ps.png
ps2image.exe test.ps _test.ps.jpg
ps2image.exe test.ps _test.ps.pcx
ps2image.exe test.ps _test.ps.bmp

ps2image.exe test.eps _test.eps.tif
ps2image.exe test.eps _test.eps.png
ps2image.exe test.eps _test.eps.jpg
ps2image.exe test.eps _test.eps.pcx
ps2image.exe test.eps _test.eps.bmp

the new package is contain the old version of ps2img.exe too, please refer to parameters of ps2img.exe at below,

C:\>E:\ps2img\ps2img.exe
-------------------------------------------------------
PS To Image Converter Copyright (C) 2000-2013 verypdf.com Inc.
Description:
Convert PS (Postscript) and EPS to TIF, TIFF, JPG, GIF, PNG, BMP, WMF, EMF, PCX, TGA, etc. formats
Web:
http://www.verypdf.com
Web: https://www.verydoc.com
Email: support@verypdf.com
Release Date: Jun 11 2013
Usage: ps2img [options] <-i PS File> [-o Output]
-i [input PS file]   : Input PS filename
-o [output TIF file] : Output TIFF filename
-g                   : Convert to 8-bit grayscale image file, this option
                       is only available while bitcount equal 8 (-b 8 )
-m                   : Set output to multi-page TIFF file, the
                       default is output to single page TIFF files
-r [resolution]      : Set resolution in generated image files
    -r 300           : Set horizontal and vertical resolution to 300 DPI
    -r 200x300       : Set horizontal and vertical resolution to 200x300 DPI
    -r 204x98        : Set horizontal and vertical resolution to 204x98 DPI
-f [first Page]      : First page to convert
-l [last Page]       : Last page to convert
-c [compress]        : Set compression method in generated image files(for tif only)
    -c none          : Create TIFF file without compression
    -c lzw           : Compress TIFF using LZW arithmetic
    -c jpeg          : Compress TIFF using JPEG arithmetic
    -c packbits      : Compress TIFF using packbits arithmetic
    -c g3            : Compress TIFF using CCITT G3 arithmetic
    -c g4            : Compress TIFF using CCITT G4 arithmetic
    -c ClassF        : Compress TIFF into Fax compatible ClassF 204x98 format
    -c ClassF196     : Compress TIFF into Fax compatible ClassF 204x196 format
-q [quality]         : Set quality in created image files(for jpeg image only)
-t                   : Enable transparent background
-b [bit count]       : Set bit count in generated image files
-e                   : Append suffix to single page image file (out0001.jpg)
-#                   : Set your License Key
-?                   : Help
-------------------------------------------------------
Example:
    ps2img -i C:\input.ps -o C:\output.tif
    ps2img -i C:\input.eps -o C:\output.tif
    ps2img -m -i C:\input.ps -o C:\output.tif
    ps2img -c lzw -i C:\input.ps -o C:\output.tif
    ps2img -q 80 -i C:\input.ps -o C:\output.jpg
    ps2img -b 4 -i C:\input.ps -o C:\output.tif
    ps2img -i C:\input.ps -o C:\output.tif -b 1 -c ClassF -r 204x98 -m
    ps2img -f 1 -l 9 C:\input.ps -o C:\output.jpg
    ps2img -i C:\*.ps -o C:\*.pcx
    ps2img "-#" "XXXXXXXXXXXXXXXX"
    ps2img "-#" "XXXXXXXXXXXXXXXX" -i C:\input.ps -o C:\output.tif

ps2img.exe is the old version, it is render PS file in memory completely, it can render PS file to PNG file with transparent background, it can also convert PS file to faxable TIFF files.

ps2image.exe is the latest version, it does use disk file to cache image data, so it can render the PS file to image file without insufficient memory limitation, it can render ps and eps files to image file at very high quality, e.g., up to 50,000 dpi and more.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
pdf compressor

PDF Compressor Command Line is crash on Windows 2008 system

Dear Sir or Madam,

We recently purchased your product "PDF Compressor Command Line 1 Server License" for $399.

We downloaded the latest version v2.0 from your purchase site:

https://www.verydoc.com/pdfcompressor.html

We successfully registered and brought PDF Compressor productive as a part of our server based solution.

But then, after some days, we experienced problems with certain PDFs.

One of them you find attached ("Zeugnisse.pdf").

PDF Compressor's behavior with this PDF is as follows:

---------------------------------------------------------
1. System:
- Windows Server 2008, SP1
- MS SQL Server 2008 R2

2. Contents in folder C:\PDFCompressorTest BEFORE command line execution is:

23.07.2013 14:58 .
25.06.2013 14:46 ..
24.04.2011 23:35 10'294'272 pdfcompressor.exe
17.04.2011 21:44  1'224'704 cximagecrt.dll
01.07.2013 15:56  1'779'115 Zeugnisse.pdf
3 Datei(en), 13'298'091 Bytes
2 Verzeichnis(se), 140'865'122'304 Bytes frei

3. Command line called from a stored procedure by MS SQL Server:

C:\PDFCompressorTest>pdfcompressor.exe Zeugnisse.pdf result.pdf

4. pdfcompressor.exe crashes (screenshot):

Complete reported details for the pdfcompressor crash are:

Problemsignatur:
Problemereignisname: BEX
Anwendungsname: pdfcompressor.exe
Anwendungsversion: 2.0.0.1
Anwendungszeitstempel: 4db442e2
Fehlermodulname: StackHash_e8ad
Fehlermodulversion: 0.0.0.0
Fehlermodulzeitstempel: 00000000
Ausnahmeoffset: 043e5f8e
Ausnahmecode: c0000409
Ausnahmedaten: 00000000
Betriebsystemversion: 6.1.7601.2.1.0.16.7
Gebietsschema-ID: 2055
Zusatzinformation 1: e8ad
Zusatzinformation 2: e8adce1c2b9e7be834b4063ac3c53863
Zusatzinformation 3: e8ad
Zusatzinformation 4: e8adce1c2b9e7be834b4063ac3c53863

5. Contents in folder C:\PDFCompressorTest AFTER the crash is:

23.07.2013 15:00 .
25.06.2013 14:46 ..
24.04.2011 23:35 10'294'272 pdfcompressor.exe
17.04.2011 21:44  1'224'704 cximagecrt.dll
01.07.2013 15:56  1'779'115 Zeugnisse.pdf
23.07.2013 15:00 0 result.pdf
4 Datei(en), 13'298'091 Bytes
2 Verzeichnis(se), 140'862'541'824 Bytes frei

>>> Before crashing, pdfcompressor created a result file of size 0 Bytes.
---------------------------------------------------------

You may reproduce this problem with the attached "Zeugnisse.pdf".

You don't need to involve an MS SQL Server.

The crash happens as well when manually executing in a command shell window.

We have two questions :

1. Is there a fixed version available for pdfcompressor.exe?

2. If not so: Is there a workaround to avoid this program crash of pdfcompressor.exe?

With kind regards
Customer
----------------------------------------
I have tried following command line, it does compress your PDF file properly,

C:\>E:\pdfcompressor.exe -ci jpg -cidown -cidownres 80 -gi jpg -gidown -gidownres 80 -mi fax -midown -midownres 80 D:\downloads\Zeugnisse.pdf D:\downloads\_Zeugnisse.pdf
You have 296 time to evaluate this product, you may purchase a full version from http://www.verypdf.com.
D:\downloads\Zeugnisse.pdf ==> D:\downloads\_Zeugnisse.pdf
===========================================
Input File = "C:\Users\admin\AppData\Local\Temp\pdfB64B.tmp.pdf"
Output File = "D:\downloads\_Zeugnisse.pdf"
Original PDF file size = 1.78MB (1779.96KB, 1779957 Bytes)
Compressed PDF file size = 0.51MB (509.67KB, 509668 Bytes)
Compression Ratio = 71.37%
===========================================

I guess your problem maybe caused by DEP on Windows 2008 system, please turn off DEP for pdfcompressor.exe to try again. Please refer to following steps about how to turn off DEP in your system,

1. Click "Start"
2. Select "Control Panel"
3. Select "System"
4. Click the "Advanced" tab
5. In the "Performance" region select "Settings"
6. Click the "Data Execute" tab in the dialog box that opens
7. Select "Turn on DEP for all programs and services except for those I select"
8. Click "Add"
9. The open dialog box will open. Browse and select "pdfcompressor.exe" application in your computer,
10. Click "Open"
11. Click "Apply"
12. Click "Ok"
13. Reboot

OK, you should no problem to run "pdfcompressor.exe" now, please give it a try.

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)