cancel
Showing results for 
Search instead for 
Did you mean: 

How to put current date time on PDF document?

Harshal_Shravgi
Star Contributor
Star Contributor

We are on OnBase 17 SP1. I want to write a Unity script to be executed from workflow. This script should put below text at top-right corner of the PDF document imported in OnBase.

Text:

FILED

Current Date-Time

I have a custom C#.net program where I could do this using iText 7 library.

Can somebody give me an idea on how to do it in OnBase Unity API script?

I tried using RedactionImageModification but it is not working with PDFs.

1 ACCEPTED ANSWER

Walter_Fernande
Confirmed Champ
Confirmed Champ

Hello Harshall,

If you have Document Import Procesor, you can check in Options/Run Process/Add to Workflow On Commit, then configure in your document / Life Cycles a litle Queue that will execute a Unity Script that you will create as IWorkFlowScript that will (1) Download current document (2) execute your iTextSharp Code to apply your FILED text with Commit datetime (3) update revision . No need to convert to image or someting like that. I forgot to ask if you are a API Certified? so you can access to sdk.onbase.com and read documentation. Feel free to ask if you need more information.

Best wishes from Perú

 

View answer in original post

12 REPLIES 12

Jim_Bollinger
Champ in-the-making
Champ in-the-making

I've done similar before with signature bitmaps but the document started out as an image document and the signatures were annotations.  I had a script that then converted it into a pdf to set the annotation in.  It required PDF framework I believe. 

I am able to do it for images. But I will be getting PDF documents only.

Scott_Johnson3
World-Class Innovator
World-Class Innovator

I think you will have to export it apply the date and import as a new revision if you do not want to covert it to image which is not hard.

Actually, we will receive these PDF documents in an email as attachments. User will save attachments in a directory. Our initial approach was to stamp the documents using our C#.net program as soon as document is saved in that directory. Then user will sweep in this folder on regular basis. But, user want that Filed date and time to be OnBase commit time. Unless document is committed, document is not recognized as filed. On few occasions, sweep, index and commit takes couple of days so the filed date has to be OnBase commit date.

In your solution "I think you will have to export it apply the date and import as a new revision if you do not want to covert it to image which is not hard". I understand how to export the document using script but I am not sure how to apply filed date time in same script and again import that filed document as new revision. Could you please put the code snippet to perform these steps or at-least API methods to do this.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.