May 02, 2024 12:29:42 PM com.groupdocs.watermark.internal.c.a.w.internal.jq r
SEVERE:
java.lang.UnsatisfiedLinkError: com.a.b.a.a.a.a(ILjava/lang/String;)Ljava/util/Map;
at com.a.b.a.a.a.a(Native Method)
at com.groupdocs.watermark.internal.c.a.w.internal.lv.a(Unknown Source)
at com.groupdocs.watermark.internal.c.a.w.internal.wL.d(Unknown Source)
at com.groupdocs.watermark.internal.c.a.w.internal.Ie.nra(Unknown Source)
at com.groupdocs.watermark.internal.c.a.w.internal.Ie.b(Unknown Source)
import com.groupdocs.watermark.Watermarker;
import com.groupdocs.watermark.common.HorizontalAlignment;
import com.groupdocs.watermark.common.VerticalAlignment;
import com.groupdocs.watermark.licenses.License;
import com.groupdocs.watermark.watermarks.Font;
import com.groupdocs.watermark.watermarks.SizingType;
import com.groupdocs.watermark.watermarks.TextWatermark;
public class AddTextWatermarktoRTFusingJava {
public static void main(String[] args) {
// Set License to avoid the limitations of Watermark library
License license = new License();
license.setLicense("GroupDocs.Watermark.lic");
Watermarker watermarker = new Watermarker("input.rtf");
Font font = new Font("Calibri", 8);
TextWatermark watermark = new TextWatermark("Test watermark", font);
watermark.setHorizontalAlignment(HorizontalAlignment.Right);
watermark.setVerticalAlignment(VerticalAlignment.Top);
watermark.setSizingType(SizingType.ScaleToParentDimensions);
watermark.setScaleFactor(0.5);
// Set rotation angle
watermark.setRotateAngle(45);
watermarker.add(watermark);
watermarker.save("output.rtf");
watermarker.close();
}
}
input.zip (9.2 KB)