Raster to Text OCR Command Line

How to add dynamic text when converting scanned PDF/raster image to TXT text

Raster to Text OCR Converter Command Line enables you to add dynamic text when converting PDF to TXT or raster to text on Windows platforms.

Raster to Text OCR Converter Command Line has been designed for running MS-DOS interface and converting scanned PDF files to TXT files or or raster image files to text files. Through VeryPDF OCR technology in the market, the application can recognize many kinds of languages. It can also retain the original layout of input files during the conversion. With this tool, dynamic text could be added into TXT files during entire conversion through command line. And the following paragraphs will tell you exact steps to realize them with commands in Windows systems. 🙂

First of all, please have this tool in your computer, so you need to click following icon to download trial version to your computer:

Download trial version of VeryDOC Raster to Text OCR Converter Command Line 

After specific folder extracted to your computer, trial version software could be yours. 🙂

Then, please run cmd.exe to open command prompt window, which is operating environment of commands for Windows systems. After that, please refer to following examples to type your own commands and parameters to accomplish your process from PDF file to TXT or raster image to text:

pdf2txtocr.exe -text "PageText %PageNumber% of %PageCount%" C:\in.pdf C:\out.txt

pdf2txtocr.exe -text "PageText %PageNumber% of %PageCount%" C:\in.tiff C:\out.txt

where you need to know this essential parameter:

  • -text <string>: add additional text at end of each text page, this parameter supports the following variables:

%PageNumber%: current page number
%PageCount% : total page count of PDF file

With this parameter, dynamic page number and page count could be displayed in each page of produced text file after entire process. Also, here are about directories:

  • pdf2txtocr.exe: call executive file “pdf2txtocr.exe”
  • C:\in.pdf/tiff: specify input file of PDF or multiple page TIFF
  • C:\out.txt: specify output TXT file

So when all commands and parameter are inputted in command prompt, conversion could be started, and yet, targeting text file can be produced and also, you can find it in destination folder. And below is relevant example TXT file:

Example text after converting PDF to TXT or raster to text through command line

By now, it is the end about this article here. So if you want to use VeryDOC Raster to Text OCR Converter Command Line for good, welcome to purchase this software from below:

Purchase VeryDOC Raster to Text OCR Converter Command Line

And also, please keep visiting here for we will update other articles about this software and other applications besides one about converting PDF file to TXT or raster image to text through commands. 🙂

DOC to Any Converter

How to make IIS7 play nice with Office Interop

I’ve just started working on a new project for which we had to dig out one of our older libraries. We wrote it to retrieve data from MS Excel workbooks using the Office interop assemblies, and thus far it has never given us issues. A slight change this time round was that we were using our library in an ASP.NET site rather than a desktop application. As a result I was faced with two errors that we’d never seen before.

Error Message:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0Ă—80070005 (E_ACCESSDENIED)).

Solution:

This is a COM permissions problem.

  1. Start > Run > dcomcnfg (or “mmc -32″ and then add the Component Services snap-in manually if you can’t find the app under step 3)
  2. Navigate to Component Services > Computers > My Computer > DCOM Config
  3. Locate the MS application giving you trouble (eg: “Microsoft Excel Application” for Excel or “Microsoft Word 97 – 2003 Document” for Word)
  4. Right click > Properties
  5. On the security tab: Select Customize under Launch and Activation Permissions and click Edit…
  6. Add the account under which the site is running (eg: Network Service) and assign Local Launch & Local Activation permissions
  7. Voila!

Error Message:

[COMException (0x800a03ec): Microsoft Excel cannot access the file '<filename>'. There are several possible reasons:
• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.

Solution:

This seems to be an issue with Excel/Word/etc not having access to a profile when being started via the interop route.

  1. Open Windows Explorer
  2. Depending on whether you installed a 32bit or 64bit version of office you will need to do one  (or both) of the following:
    1. 32bit Office installation: Navigate to C:\Windows\System32\config\systemprofile
    2. 64bit Office installation: Navigate to C:\Windows\SysWOW64\config\systemprofile
  3. Verify the folder "Desktop" exists (create it if it's not there)
  4. Right click > Properties
  5. On the security tab: Add the account under which the site is running (eg: Network Service) with default permissions (Read & execute; List folder contents; Read)
  6. Voila!

Many thanks to the contributors of this discussion.

DOC to Any Converter

aspnet account dcom permisson for MS Word

Question to doc2any Converter Command Line,
https://www.verydoc.com/doc-to-any.html

I have a win 2000 webserver. Any thoughts on how to grant ASPNET account permission to run Microsoft Word using DCOM. I know this can be done using dcomcnfg but not sure what is the right way.I do not want to mess up a production server.

------------------------------------------------------------------------------
Under DCOM Config locate “Microsoft Word Application” right click on it and go to Properties.

Under the “Security” Tab, in the “Launch & Activation Permissions” select “Customize” and Click on Edit.

Give All Permissions to the following Account
      IUSR_<Machine_Name>
      IWAM_<Machine_Name>
      ASPNET

Now try your application.

If this does not work, then create a New Windows Account on the Server, say "Word_User" and put it in Admin Group, give it Admin Permissions. Alternatively use the existing Admin account (The account Admin uses to log into the Web Server Machine). Now add this account to the List above, i.e. in DCOMConfg give this account all permissions as well.

Now Impersonate using this account for you app. For this Modify your Web.Config  and Add these Configurations

      <identity impersonate="true" userName="domain\admin_user_account" password="xyz" />

Where admin_user_account is the Login Account of Admin on the Server or the "Word_User" that you created on the Server with Admin Previlages.

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

See Also:

How to configure Office applications to run under a specific user account
http://theether.net/download/Microsoft/kb/288367.html

Microsoft Excel Application entry missing in DCOMCNFG
https://www.verydoc.com/blog/microsoft-excel-application-entry-missing-in-dcomcnfg.html

DOC to Any Converter

Microsoft Excel Application entry missing in DCOMCNFG

VeryDOC DOC to Any Converter Home Page,

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

Hi I'm using windows 7 home premium. I have an application in ASP.Net which uses Excel Application Object. It used to work fine in XP but in Windows 7 I'm getting an error as mentioned below:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

I need to give permissions to Microsoft Excel Application in DCOM config but I can't seem to find this in windows 7. It used to be there in earlier versions but now its not there. I tried to reinstall Office 2007 but still I couldn't find it in DCOM config. Please suggest where I can give permissions to MS Excel Application so that my application runs without errors.
----------------------------------------------------------------------
1. Control Panel -> Administrative Tools -> Component Services
2. Console Root -> Component Services -> Computers -> My Computer -> DCOM Config
3. Right-Click 'Microsoft Excel Application' and choose Properties
4. Click 'Security' tab
5. Customize 'Launch and Activation Permissions'
6. Add the local ASPNET user and give it all permissions

----------------------------------------------------------------------
Thanks for the reply.. the problem is that there is no "Microsoft Excel Application" in dcomcnfg.. I'm not able to find it there. I reinstalled Office 2007 also, but still I couldn't find it there.
----------------------------------------------------------------------
I have the same problem. I took a look in the registry to find the correct CLSID from the appID but I did not found anything. Is there any workaround or solution ?

Best regards
----------------------------------------------------------------------
I found a solution to this problem by giving permissions at system level by following the steps below
1. go to DCOMCNFG
2. In the left tree structure, right click on My Computer and select Properties
3. Click on COM SECURITY tab
4. Give Permissions to Network Service and Users in the "Access Permissions" and "Launch and Activation Permissions" by clicking the Edit Default buttons.

Now check your application.
----------------------------------------------------------------------
This does not fully work. Having changed the settings according to your solution, I could create excel reports (via asp.net, iis and office). however, a day later, this no longer worked although the permissions are still assigned to the network account (and the account of the iis pool). There must be another setting that affects using Office/Excel in IIS 7.5 on Windows Server 2008/Windows 7

Any help is appreciated
----------------------------------------------------------------------
Use MMC comexp.msc /32 on Windows 7 x64
----------------------------------------------------------------------
This solution is ...

- Windows 2008 Server x64
Please make this folder.
C:\Windows\SysWOW64\config\systemprofile\Desktop

- Windows 2008 Server x86
Please make this folder.
C:\Windows\System32\config\systemprofile\Desktop
----------------------------------------------------------------------

We faced similar kind of issues and found some workarounds ...

1. Issue in opening word document (from DCOM component, in windows 2008 64 bit machines)
create folder called "Desktop" under "C:\Windows\SysWOW64\config\systemprofile" or "C:\Windows\System32\config\systemprofile" as mentioned in http://social.msdn.microsoft.com/Forums/en/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91

2. Issue in printing
configure word to run as "Interactive user"

Steps to configure word to run as “Interactive User”
1. open registry editor (regedit)
2. Search for winword.exe, copy the AppId/Guid for word from “HKEY_CLASSES_ROOT\AppID\WINWORD.EXE”
3. Open Compent Services (dcomcnfg), Go to Computers->MyComputer->DCOM Cnfg
4. Select the application with the guid copied from registry.
5. Right click on it, select properties, select Identity tab, select “Interactive User”, click on “Apply” button.
----------------------------------------------------------------------

See Also:

Windows Service Running Word via DCOM
http://social.msdn.microsoft.com/forums/en-US/windowscompatibility/thread/742e4b7c-594d-4c10-8bae-f8d398d0e190/

Raster to Text OCR Command Line

How to convert encrypted PDF to TXT with original PDF layout

VeryDOC Raster to Text OCR Converter Command Line allows Windows users to convert encrypted PDF to TXT with original PDF layout through command line instantly.

Sometimes, encrypted PDF files are not easy to be converted, or they are not retained in original PDF layout when they need to be converted in relevant conversion. So, then, VeryDOC Raster to Text OCR Converter Command Line could be your best choice, which not only help you retain original layout, but also help you with other operations flexibly. For more information about this software, please check its homepage from link above. And now, the next paragraphs tells you how to get encrypted PDF converted to TXT with original PDF layout through commands:

Step1. Download software

Please download package of its trial version from here:

Download VeryDOC Raster to Text OCR Converter Command Line

And then, after download, you need to extract its folder to your computer, where there are essential executive file, “readme.txt”, etc. for later process, and after that folder is in your computer, it means trial version of this application is yours. 🙂

Step2. Run cmd.exe

If you are beginner in commands, maybe you want to ask why run cmd.exe. So let me tell you, running cmd.exe can help you open command prompt, which is right environment of commands in Windows systems.

Step3. Convert encrypted PDF file to TXT with original PDF layout

After command prompt is opened, please understand parameters below and refer to examples to fulfill your process:

  • Parameters:

-ownerpwd <string>: set owner password for encrypted PDF file

-userpwd <string>: set user password for encrypted PDF file

-layout: maintain original physical layout

  • Examples:

pdf2txtocr.exe –ownerpwd 123765 –userpwd 456321 –layout C:\in.pdf C:\out.txt

where:

pdf2txtocr.exe: call executive file “pdf2txtocr.exe”

C:\in.pdf: specify input PDF file

C:\out.txt: specify output TXT file

After you use this trial version software to accomplish process like above, and you can get TXT file with original PDF layout exactly in targeting folder. However, there are some watermarks in produced TXT file, yes, it must be, for it is trial version. So if you want to avoid this kind of watermarks, you can get full version of this software from here:

Purchase VeryDOC Raster to Text OCR Converter Command Line

Thank you for reading this article to know how to use VeryDOC Raster to Text OCR Converter Command Line to convert encrypted PDF file to TXT file with original PDF layout through commands. 🙂