Thursday, December 28, 2006

Diff between Image Server and Content Engine.

Ist Deifference
IS (Image Service) is just Document and Image Repository server, Where as P8-CE (Content Engine) is just one module out of 8 modules. which is more advance to IS. CE include all major functionality of IS. But P8 has 7 more modules like Process
Automation or PE(Process Engine), AE( Application Engine) etc..
Second Diff
Actually Image Service is the base of P8 and the rappers are different 8 modules. More over when you install PE Process IS gets installed. So if you are planning to upgrade from IS to P8 you need basic 3 components CE, PE, AE, and for web access to Content module and process modules you need either of the following JBoss, WebLogic, Web Sphere or Tomcat Application Server. Of course Database in the vital part of any FileNet. Yes, you can access content stored in IS from Java, you can also use ISRA. For that while installing AE you need to execute the AE setup for ISRA instead of general AE. There are 2 setup available for AE one is simple and other is ISRA support.

Is it possible to add more than one CS 5.2 library on the same?what are precautions and limits?

We can have up to 12 libraries on a CS server.

How to generate BarCode?

Open MS WORD and write any thing like number or text (of length 9). selected the written text and change its font to any of the following
IDAutomationHC39L, IDAutomationHC39M
It will display the corresponding barcode.
[Note: If you don't have these Fonts installed on your PC just downloand them from http://www.idautomation.com/fonts/free/ ]
--------------------------------------------------
IDAutomation's Free Code 39 Barcode Font allows the ability to print letters, numbers and some symbols with the Code 3 of 9 symbology. TrueType and OpenType versions are provided.

Error "COMMITTAL NOT ALLOWED." - Capture 4.1

Problem :
I have designed a python application(run as a service) for automating Capture Process. I used FileNet capture components.This application was built to perform all the steps staring with FileImport then Assembly,Indexing and finally Commit.The documentclass which I was using has 2 required fields.I was setting the values for the mandatory index fields in code but it was just opening the Index window and waiting for user to manually index the batch.In code there was Commit step after Indexing. As indexing window was not getting closed automatically so Indexing was not completed. And just after I was executing commit component and getting error "COMMITTAL NOT ALLOWED.All documents in the batch have not been indexed.".
solution :
I analize the problem and came to know that I was not checking 'Process documents using initial values above (i.e without user input)' option of Indexing component. Once I checked it and again started application It has started working

How to convert a colored BMP to Black & White BMP?

Solution 1 : For Windows 2000,2003,XP
1)Create a Python script and compile it.Script Code is given below:

import sys
import Image
import imageop
# open an image file you have in the working folder
im1 = Image.open(sys.argv[1])
str1=im1.mode
print str1
im2=im1.convert("1")
im2.save(sys.argv[1])
str2=im2.mode
print str2

2). Create abatch file and pass Image FileName as a paramter and get the desired result. [Batch File Contents are give n below]

@echo off
c:\python23\python.exe C:\PythonScript\Imaging.py %1
Pause

-- YOU CAN NOW EXECUTE THIS BATCH FILE ON COMMAND LINE AS WELL AS FROM YOUR CODE. --

Solution 2 : (For Windows 98,2000 and 2003 Not for Windows XP)[Less successful option]
1) For converting Colored BITMAP image to Black & White BMP. Just download Image Magic software from
ftp://ftp.fifi.org/pub/ImageMagick/binaries/ImageMagick-6.3.0-7-Q16-windows-static.exe

2)Install it and you will find one file 'Convert.exe'.Run this line from command line by passing valid parameters as shown below:

"C:\Program Files\ImageMagick-6.3.0-Q16\convert.exe" -colors 255,255,255 %1 %2

a) First part specifies the path of convert.exe.
b) '-colors 255,255,255' argument is to convert a Colored BMP to B&W BMP.
c) %1 - Name of file (e.g c:\test.BMP)
d) %2 - Name of same file (e.g c:\test.BMP)

Note : Before running Convert.exe make sure that your BMP file's Color attribute(MSPAINT->Image->Attributes)is set to Color.

Get Capture 5.0 Patch.

visit at ftp://guestuser:patches@ftp.eng.filenet.com
/softwarepatches/panagon/Capture/5.0.0/CAP-5.0.0-005

HOW TO USE ZONAL OCR

Use following code for the same
Public Function Execute(oBatch As RepObject) As Long
Dim workarray(1 To 1) As RepObject
Dim iResult As Long
Dim bShowForm As Boolean

DoEvents

Dim intZoneID As Integer
Dim lngLeft As Long
Dim lngTop As Long
Dim lngRight As Long
Dim lngBottom As Long
Dim lngReq1 As Long
Dim lngReq2 As Long

With OCR1 - This is the zonal ocr component

Set .CurrentObject = oBatch
.Load oBatch

DoEvents
DoEvents
DoEvents

Set workarray(1) = oBatch

intZoneID = 1
lngLeft = 1988
lngTop = 392
lngRight = 2438
lngBottom = 467
lngReq1 = 0
lngReq2 = 0
.SetOcrZone intZoneID, lngLeft, lngTop, lngRight, lngBottom, lngReq1, lngReq2

intZoneID = 2
lngLeft = 902
lngTop = 446
lngRight = 2432
lngBottom = 521
lngReq1 = 0
lngReq2 = 0
.SetOcrZone intZoneID, lngLeft, lngTop, lngRight, lngBottom, lngReq1, lngReq2

intZoneID = 3
lngLeft = 908
lngTop = 518
lngRight = 1607
lngBottom = 607
lngReq1 = 0
lngReq2 = 0
.SetOcrZone intZoneID, lngLeft, lngTop, lngRight, lngBottom, lngReq1, lngReq2

intZoneID = 4
lngLeft = 905
lngTop = 593
lngRight = 1619
lngBottom = 686
lngReq1 = 0
lngReq2 = 0
.SetOcrZone intZoneID, lngLeft, lngTop, lngRight, lngBottom, lngReq1, lngReq2

intZoneID = 5
lngLeft = 392
lngTop = 2771
lngRight = 774
lngBottom = 2885
lngReq1 = 0
lngReq2 = 0
.SetOcrZone intZoneID, lngLeft, lngTop, lngRight, lngBottom, lngReq1, lngReq2

.VerifyMode = vmVerifyWords
.OCRVerification = False

.AutoLoadSettings = False
.Reset

End With

If OCR1.OCRVerification Then
bShowForm = True
Me.Show vbModal
End If

State = "Execute"

iResult = OCR1.Execute(workarray)

DoEvents
DoEvents
DoEvents

State = "Idle"

If bShowForm Then
'Me.Hide
End If

Execute = iResult
'MsgBox iResult

End Function

**********************************************************

This is where the OCR values are picked up and assigned to text boxes on the form.

**********************************************************
Set oRepObject = gobjCurrentDoc.Contents(gintCurrentPageNo - 1)
Call frmZonalOCR.Execute(oRepObject) '- Calling above function

If oRepObject.NodeId = fnniPage Then
Set oAttr = oRepObject.Attributes("UserDefined", "OCRValue1")
If Not oAttr Is Nothing Then
'MsgBox "First OCR Value " & " is " & CStr(oAttr.Value)
txtIndex(1).text = CStr(oAttr.Value)
End If

Set oAttr = oRepObject.Attributes("UserDefined", "OCRValue2")
If Not oAttr Is Nothing Then
'MsgBox "Second OCR Value " & " is " & oAttr.Value
txtIndex(2).text = CStr(oAttr.Value)
End If

Set oAttr = oRepObject.Attributes("UserDefined", "OCRValue3")
If Not oAttr Is Nothing Then
'MsgBox "Third OCR Value " & " is " & oAttr.Value
txtIndex(3).text = CStr(oAttr.Value)
End If

Set oAttr = oRepObject.Attributes("UserDefined", "OCRValue4")
If Not oAttr Is Nothing Then
'MsgBox "Fourth OCR Value " & " is " & oAttr.Value
'txtIndex(4).text = CStr(oAttr.Value)
End If

Set oAttr = oRepObject.Attributes("UserDefined", "OCRValue5")
If Not oAttr Is Nothing Then
'MsgBox "Fifth OCR Value " & " is " & oAttr.Value
txtIndex(5).text = CStr(oAttr.Value)
End If
End If