Adding text to Webtop delivered documents

I always thought that it would be pretty cool to use Webtop as a viewing tool directly – something that access a Docbase directly.  If you have umpteen million users – then caching is a good idea – but in a corporate environment where a few thousand users – well why not.

So I use Webtop as the delivery platform and the virtual link component.  I’m sure you could do this better – but this works fine.  The idea is that a user access a document using a virtual link – a straight HTTP link.  The document must be PDF – and when it comes out of the repository – its stamped with a small watermark.  This gives a better level of integrity – if you print it off for example then you’d know where it came from.  With everything being in Webtop it gives you a good opportunity to add in any Documenutm properties/values that may be appropriate for content.

You need iText – without doubt brilliant.

Add that as an external JAR to your Webtop Eclipse project.  I put the iText jar into the tomcat lib.

Create a custom package area in webtrop/custom/src/com/document/web/virtuallink – place this file in it.  http://www.dhrobertson.com/projects/vlink/VirtualLink404Handler.java  That should recompile and replace the class file in the webtop app.  You could also do this by subclassing the whole thing – but it seemed easier to do it this way. 

All that happens is when the document eventually gets extracted from the repository – an iText function is called to create a new file – this is the one thats viewed.  Its all done in a local folder so everything gets deleted by Documentum – which is handy

Thats it – the watermark I’ve applied is a bit crap – but you can buy the iText book – details here http://itextpdf.com/book/index.php and do your own thing… If you want.

You can also extend the view action – so that you can do same sort of thing with a view of a document.  Its a bit more involved – but extending webtop view action. 

Again I did this with full debug on Webtop – that works very well I have to say and using iText means that it works on ‘nix and Windows platforms…

Advertisements

Documentum Webtop on Eclipse with debug

ok, Documentum good, really good.  WDK very sophisticated, Webtop good web app for ECM and such stuff.  All good.  Except when it comes to writing apps.  Say you want to mod webtop – can you debug it live in an app server ?  Sure – well not so easy I found.   But here is what I did and it does work.

I am using Documenutm 6.5 with Eclispse 3.1 and tomcat 6 on Windows 2008 64 bit… yeah – 64.  Tried various combos with Tomcat 5.x but seems to have difficulty with 64 bit. 

Read this – works fine.  Very very good actually.  Good job and many thanks

http://dmnotes.wordpress.com/2007/10/10/configuring-wdk-development-environment-in-eclipse/

Now you need to configure Eclispse to debug.  I used Run > Debug Configurations. 

Added a new server – Tomcat 6.

For the arguments, I copied in the once from the tomcat configure dialog

For the source, I added the webtop project

The run – it does run – pretty cool – you can now debug

One issue for 6.5 seems to be an error in a java source – About comparable types on ids.append.  You need to go back to the webtop project properties in Eclispse.  java build path – The on the order and export  of the libs tab – put the JRE System Library right at the top.  Dont mess with anything else.   The error went away immediately.  I think this is only on 6.5 related.

 Then you can do your usual.  If you want to mod a class – then do it in the custom/src area or decompile a class and do same. 

I was writing a bit of stuff to add a watermark stamp to a webtop PDF delivered doc on the fly.  So that when you view, you can see the time it was generated.  I did this for the virtual link handler by decompiling the virtual404handler – adding in a method after the object is pulled from the docbase and before its sent to the client. 

Did all this with debug – so its pretty handy.

Paul Warren is the definitive source for all things to do with this sort of stuff – pure genius – but lots of other very smart folks out there – many thanks for their posts on this as well

Kerberos on AIX 1.6

This might help.  Saw a few posts when trying to get Kerberos from MIT compiled up on AIX 5.2/5.3

I had a problem with libs – couldn’t find shared libs.  I added this to config/shlib.conf

RPATH_FLAG=-Wl,-brtl,-blibpath:

Its the -brtl that makes the linker see the .so files as well as the .a files.  Dont know why its not added already – but anyway thats what I did.  I also had to load the AIX Berkley Embedded DB package – I just loaded the RPM from the IBM http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html toolbox

Once loaded – the whole thing ran and I was able to use the kinit.c source for an embedded Documentum application to authenticate against an Active Directory.

A bit obscure but it may save you a couple of days getting Kerberos compiled and running on AIX

Blog Shmog – Cut and Paste at your peril

The Internet is a great thing but when a top Oracle site posts a method for doing something that ain’t quite right you are going to be able to see a cut and paste job when you see it.  I was speaking with a friend last week who received some expensivly produced documents and with a simple google she found internet cut and paste.  Cut and paste is no substitute for actually knowing what you are doing.

Therefore – to go off at a slight angle and with my own cut and paste but with corrections…

If you want to autostart Oracle on AIX – easy.

1. Create the script /etc/rc/oracle and make it executable… chmod +x /etc/rc.oracle

su – oracle <<EOF
<$ORACLE_HOME>/bin/dbstart
EOF

2. Add the script to the inittab using the mkitab utility.
$ /usr/sbin/mkitab “rcoracle:2:wait:/etc/rc.oracle >/dev/console 2>&1”

All references to <$ORACLE_HOME> should be replaced with the actual Oracle Home directory. Now upon system startup, the dbstart utility is invoked at run level 2.

Check your /etc/oratab and they will have entries like:

In the file the entries will be like :

ORACLE_SID:ORACLE_HOME:AUTOSTART(Y or N)

Eg as below :
MYDBINSTANCE:/u001/app/oracle/10.2.0/db_1:Y

I hope this saves you a bit of time…

 

 

 

Citrix and Acrobat and Anonymous Users

Cracking one this…. 

I was trying to get a small app working on Citrix.  Something that allows an ICA session to be launched from a URL.  The URL links back to  a Documentum system.  I decided to set this up as an anonymous user.  No password.  Easy.  But no. Acrobat Reader 8.0 and presumably other previous versions launches some kind of speed launcher – reader_sl.exe.  This stays in memory which is not good for Citrix.  Caused Acrobat to hang.  Anyway – I used AutoRuns from SysInternals – identified the boot sequence and disabled it – spent a couple of days and a few reboots to sort that one out….. anyway it works.

 Anon…

More on FTI – How to tell if a doc has been indexed already

1) To check if a document has been indexed, you can access the Instream query page:

http://localhost:15100/

Actually, the host has to be your Index Server host and the port has to be your IndexServer Base Port + 2100.

Type the following in the query box, replacing the object id with the r_object_id of the object you want to test.

dmftmetadata:090000018000190c

And in the results, double check that the r_object_id appears inside the appropriate metadata field (because you could get some hits that are not really the document you are looking for):

<FIELD NAME=”robjectid”>090000018000190c</FIELD>

And in the results, double check that the r_object_id appears inside the appropriate metadata field (because you could get some hits that are not really the document you are looking for):