From 561bce3f9e899e1c6c3731812becbd6bad01d8a7 Mon Sep 17 00:00:00 2001
From: Patrizio Bekerle <patrizio@bekerle.com>
Date: Mon, 15 Mar 2021 07:37:53 +0100
Subject: [PATCH] Add some tweaks

---
 src/dbp-pdf-preview.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/dbp-pdf-preview.js b/src/dbp-pdf-preview.js
index b7715f9..5468d53 100644
--- a/src/dbp-pdf-preview.js
+++ b/src/dbp-pdf-preview.js
@@ -290,11 +290,13 @@ export class PdfPreview extends ScopedElementsMixin(DBPLitElement) {
             // pdfFactory.createFreeTextAnnotation(0, [-100, -100, -100, -100], "OutOfBounds FreeText annotation by annotpdf", "Patrizio");
 
             for (let i = 1; i <= 50; i++) {
+                // let rect = [-1000, -1000, -1000, -1000];
+                let rect = [1, 1, 1, 1];
                 // Create single free text annotation with print flag and 0 font size
-                let annot = Object.assign(pdfFactory.createBaseAnnotation(page, [-1000, -1000, -1000, -1000], i + ": OutOfBounds FontSize0 White FreeText annotation by annotpdf", author), {
+                let annot = Object.assign(pdfFactory.createBaseAnnotation(page, rect, i + ": FontSize0 White Opacity0.001 FreeText annotation by annotpdf", author), {
                     annotation_flag: 4,
                     color: { r: 1, g: 1, b: 1 },
-                    opacity: 0,
+                    opacity: 0.001, // we can't set to 0 because of "if (opacity) {"
                     defaultAppearance: "/Invalid_font 0 Tf"
                 });
                 annot.type = "/FreeText";
-- 
GitLab