You are viewing limited content. For full access, please sign in.

Question

Question

Adding watermarks no longer works in 9.1.1

asked on August 1, 2014

I just upgraded from SDK 8.2 to SDK 9.1.    Code that worked to add watermarks to an exported document (PDF or TIFF) no longer works, as the DocumentExporter.Watermarktext property is no longer available.  Is there an example of how to add watermarks with the new SDK ?

0 0

Replies

replied on August 1, 2014 Show version history
IDocumentExporter no longer exposes a WatermarkText property. There is now an AddWatermark() method that supports the new Laserfiche 8.2 watermark options. The method accepts a WatermarkSpecification object. See the sample code in the DocumentExporter.ExportToFile topic in your SDK help file.
0 0
replied on August 4, 2014

Thank you, Miruna.   I am trying to instantiate a WatermarkSpecification object :

 

oLFWatermark = CREATEOBJECT(DocumentProcessor.WatermarkSpecification)

oLFWatermark.Text = "Whatever my Message Is"

oLFExporter.Addwatermark(oLFWaterMark)

 

I get no errors (yes, this is Foxpro - don't laugh), but I also get no watermark.

 

Any ideas ?

0 0
replied on August 6, 2014

I know nothing about FoxPro, but could it be eating the errors? The namespace for DocumentProcessor 9.1 is "DocumentProcessor91", so if you are using version 9.1 now, I'd expect at least some error about that on the first line. If you are accidentally still using DocumentProcessor 8.2 with RA 9.1, I'd expect to see an error about DP82 not having a WatermarkSpecification class.

0 0
replied on August 11, 2014

Sorry - mistyped the CREATEOBJECT line - I do have the DocumentProcessor91 specified.  I did some more digging and the Watermark object is created, it's apparently the AddWaterMark that's failing or there's some property of the watermark that I'm not setting to make it visible.

0 0
replied on August 11, 2014

BTW - I probably should have mentioned that I am working with PDFs.  Don't know if that makes a difference.

0 0
replied on August 11, 2014

When you say you're working with PDFs, you mean you have image documents in Laserfiche and are exporting them to PDF, right?

0 0
replied on August 11, 2014

No, the documents are PDFs in LaserFiche and I am exporting them but want to put a watermark on them before presenting them to the user.  The actual LaserFiche folder is not normally available to the user, but I am using a different login via the LFSO object to connect to the repository and export the document for the user to view.  Long Story.

0 0
replied on August 11, 2014

The Laserfiche SDK can't add watermarks to PDFs. The methods above only apply to exporting images (watermarks added to the image, then the image can be exported to a PDF).

0 0
replied on August 11, 2014

OK - well that would explain it...Thanks for your help.   I guess I have to find another way to do this...

0 0
replied on August 11, 2014

You can convert the PDFs to image, then export the images, but that is sort of convoluted.

 

itextsharp is a 3rd party library that can edit PDFs directly.

0 0
replied on August 11, 2014

Thanks - we have a third party tool - XFRX - that we are going to try and see if we can use to add the watermark.  I will keep your suggestion in mind, though.

0 0
replied on August 12, 2014

Can I use the PDFExporter DLL ?   I have tried to instantiate objects with the DLL, but have been unsuccessful.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.