Skip to content

Commit

Permalink
Merge pull request #627 from veraPDF/watermark_annot
Browse files Browse the repository at this point in the history
Add GFPDWatermarkAnnot
  • Loading branch information
MaximPlusov authored Dec 26, 2023
2 parents efd2438 + 34ef884 commit a566b3c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public class GFPDAnnot extends GFPDObject implements PDAnnot {
public static final String SQUIGGLY = "Squiggly";
public static final String TEXT = "Text";
public static final String TRAP_NET = "TrapNet";
public static final String WATERMARK = "Watermark";
public static final String UNDERLINE = "Underline";
public static final String WIDGET = "Widget";

Expand Down Expand Up @@ -472,6 +473,8 @@ public static GFPDAnnot createAnnot(PDAnnotation annot, PDResourcesHandler pageR
return new GFPDRubberStampAnnot(annot, pageResources, page);
case TRAP_NET:
return new GFPDTrapNetAnnot(annot, pageResources, page);
case WATERMARK:
return new GFPDWatermarkAnnot(annot, pageResources, page);
case WIDGET:
return new GFPDWidgetAnnot((PDWidgetAnnotation) annot, pageResources, page);
case CARET:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* This file is part of veraPDF Validation, a module of the veraPDF project.
* Copyright (c) 2015, veraPDF Consortium <[email protected]>
* All rights reserved.
*
* veraPDF Validation is free software: you can redistribute it and/or modify
* it under the terms of either:
*
* The GNU General public license GPLv3+.
* You should have received a copy of the GNU General Public License
* along with veraPDF Validation as the LICENSE.GPL file in the root of the source
* tree. If not, see http://www.gnu.org/licenses/ or
* https://www.gnu.org/licenses/gpl-3.0.en.html.
*
* The Mozilla Public License MPLv2+.
* You should have received a copy of the Mozilla Public License along with
* veraPDF Validation as the LICENSE.MPL file in the root of the source tree.
* If a copy of the MPL was not distributed with this file, you can obtain one at
* http://mozilla.org/MPL/2.0/.
*/
package org.verapdf.gf.model.impl.pd.annotations;

import org.verapdf.gf.model.impl.pd.GFPDAnnot;
import org.verapdf.gf.model.impl.pd.util.PDResourcesHandler;
import org.verapdf.model.pdlayer.PDWatermarkAnnot;
import org.verapdf.pd.PDAnnotation;
import org.verapdf.pd.PDPage;

/**
* @author Maxim Plushchov
*/
public class GFPDWatermarkAnnot extends GFPDAnnot implements PDWatermarkAnnot {

public static final String WATERMARK_ANNOTATION_TYPE = "PDWatermarkAnnot";

public GFPDWatermarkAnnot(PDAnnotation annot, PDResourcesHandler pageResources, PDPage page) {
super(annot, pageResources, page, WATERMARK_ANNOTATION_TYPE);
}

}

0 comments on commit a566b3c

Please sign in to comment.