diff --git a/ChangeLog b/ChangeLog index a3de5ecb..43c716d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2021-02-22 Jay Berkenbilt + * Update pdf-overlay-page example to include copying of + annotations. + * Add a new version of QPDFPageObjectHelper::placeFormXObject that initializes the transformation matrix that was used so you don't have to call both placeFormXObject and diff --git a/examples/pdf-overlay-page.cc b/examples/pdf-overlay-page.cc index 88722352..1e06c40c 100644 --- a/examples/pdf-overlay-page.cc +++ b/examples/pdf-overlay-page.cc @@ -56,9 +56,10 @@ static void stamp_page(char const* infile, // Generate content to place the form XObject centered within // destination page's trim box. + QPDFMatrix m; std::string content = ph.placeFormXObject( - stamp_fo, name, ph.getTrimBox().getArrayAsRectangle()); + stamp_fo, name, ph.getTrimBox().getArrayAsRectangle(), m); if (! content.empty()) { // Append the content to the page's content. Surround the @@ -72,6 +73,11 @@ static void stamp_page(char const* infile, ph.addPageContents( QPDFObjectHandle::newStream(&inpdf, "\nQ\n" + content), false); } + // Copy the annotations and form fields from the original page + // to the new page. For more efficiency when copying multiple + // pages, we can create a QPDFAcroFormDocumentHelper and pass + // it in. See comments in QPDFPageObjectHelper.hh for details. + ph.copyAnnotations(stamp_page_1, m); } QPDFWriter w(inpdf, outfile); diff --git a/examples/qtest/overlay-page.test b/examples/qtest/overlay-page.test index 68e695d3..a946b0ca 100644 --- a/examples/qtest/overlay-page.test +++ b/examples/qtest/overlay-page.test @@ -18,9 +18,16 @@ $td->runtest("compare files", {$td->FILE => "a.pdf"}, {$td->FILE => "out.pdf"}); +$td->runtest("overlay-page with fields/ annotations", + {$td->COMMAND => "pdf-overlay-page in.pdf annotations.pdf a.pdf"}, + {$td->STRING => "", $td->EXIT_STATUS => 0}); +$td->runtest("compare files", + {$td->FILE => "a.pdf"}, + {$td->FILE => "annotations-out.pdf"}); + cleanup(); -$td->report(2); +$td->report(4); sub cleanup { diff --git a/examples/qtest/overlay-page/annotations-out.pdf b/examples/qtest/overlay-page/annotations-out.pdf new file mode 100644 index 00000000..6d793724 --- /dev/null +++ b/examples/qtest/overlay-page/annotations-out.pdf @@ -0,0 +1,702 @@ +%PDF-1.4 +% +1 0 obj +<< /AcroForm 3 0 R /Pages 4 0 R /Type /Catalog >> +endobj +2 0 obj +<< /CreationDate (D:20120721200217) /Producer (Apex PDFWriter) >> +endobj +3 0 obj +<< /Fields [ 5 0 R 6 0 R 7 0 R 8 0 R 9 0 R 10 0 R 11 0 R 12 0 R 13 0 R 14 0 R 15 0 R 16 0 R ] >> +endobj +4 0 obj +<< /Count 4 /Kids [ 17 0 R 18 0 R 19 0 R 20 0 R ] /Type /Pages >> +endobj +5 0 obj +<< /AP << /N 21 0 R >> /DA (0 0.4 0 rg /F1 18 Tf) /DR 22 0 R /DV () /FT /Tx /Ff 0 /Rect [ 72 470.774 190.8 484.922 ] /Subtype /Widget /T (Text Box 1) /Type /Annot /V (Formy field) >> +endobj +6 0 obj +<< /AP << /N 23 0 R >> /DA (0 0.4 0 rg /F1 18 Tf) /DR 22 0 R /DV () /FT /Tx /Ff 0 /Rect [ 372 330.774 386.148 470.374 ] /Subtype /Widget /T (Text Box 1) /Type /Annot /V (Rot-ccw field) >> +endobj +7 0 obj +<< /DV /1 /FT /Btn /Ff 49152 /Kids [ 24 0 R 25 0 R 26 0 R ] /T (r1) /V /2 >> +endobj +8 0 obj +<< /AP << /N 27 0 R >> /DA (0 0.4 0 rg /F1 18 Tf) /DR 22 0 R /DV () /FT /Tx /Ff 0 /Rect [ 72 470.774 190.8 484.922 ] /Subtype /Widget /T (Text Box 1) /Type /Annot /V (Formy field) >> +endobj +9 0 obj +<< /AP << /N 28 0 R >> /DA (0 0.4 0 rg /F1 18 Tf) /DR 22 0 R /DV () /FT /Tx /Ff 0 /Rect [ 372 330.774 386.148 470.374 ] /Subtype /Widget /T (Text Box 1) /Type /Annot /V (Rot-ccw field) >> +endobj +10 0 obj +<< /DV /1 /FT /Btn /Ff 49152 /Kids [ 29 0 R 30 0 R 31 0 R ] /T (r1) /V /2 >> +endobj +11 0 obj +<< /AP << /N 32 0 R >> /DA (0 0.4 0 rg /F1 18 Tf) /DR 22 0 R /DV () /FT /Tx /Ff 0 /Rect [ 72 470.774 190.8 484.922 ] /Subtype /Widget /T (Text Box 1) /Type /Annot /V (Formy field) >> +endobj +12 0 obj +<< /AP << /N 33 0 R >> /DA (0 0.4 0 rg /F1 18 Tf) /DR 22 0 R /DV () /FT /Tx /Ff 0 /Rect [ 372 330.774 386.148 470.374 ] /Subtype /Widget /T (Text Box 1) /Type /Annot /V (Rot-ccw field) >> +endobj +13 0 obj +<< /DV /1 /FT /Btn /Ff 49152 /Kids [ 34 0 R 35 0 R 36 0 R ] /T (r1) /V /2 >> +endobj +14 0 obj +<< /AP << /N 37 0 R >> /DA (0 0.4 0 rg /F1 18 Tf) /DR 22 0 R /DV () /FT /Tx /Ff 0 /Rect [ 72 470.774 190.8 484.922 ] /Subtype /Widget /T (Text Box 1) /Type /Annot /V (Formy field) >> +endobj +15 0 obj +<< /AP << /N 38 0 R >> /DA (0 0.4 0 rg /F1 18 Tf) /DR 22 0 R /DV () /FT /Tx /Ff 0 /Rect [ 372 330.774 386.148 470.374 ] /Subtype /Widget /T (Text Box 1) /Type /Annot /V (Rot-ccw field) >> +endobj +16 0 obj +<< /DV /1 /FT /Btn /Ff 49152 /Kids [ 39 0 R 40 0 R 41 0 R ] /T (r1) /V /2 >> +endobj +17 0 obj +<< /Annots [ 42 0 R 5 0 R 43 0 R 6 0 R 44 0 R 45 0 R 46 0 R 47 0 R 24 0 R 25 0 R 26 0 R ] /Contents [ 48 0 R 49 0 R 50 0 R ] /MediaBox [ 0 0 612 792 ] /Parent 4 0 R /Resources << /Font << /F1 51 0 R >> /ProcSet [ /PDF /Text ] /XObject << /Fx1 52 0 R >> >> /Type /Page >> +endobj +18 0 obj +<< /Annots [ 53 0 R 8 0 R 54 0 R 9 0 R 55 0 R 56 0 R 57 0 R 58 0 R 29 0 R 30 0 R 31 0 R ] /Contents [ 59 0 R 60 0 R 61 0 R ] /MediaBox [ 0 0 612 792 ] /Parent 4 0 R /Resources << /Font << /F1 51 0 R >> /ProcSet [ /PDF /Text ] /XObject << /Fx1 52 0 R >> >> /Type /Page >> +endobj +19 0 obj +<< /Annots [ 62 0 R 11 0 R 63 0 R 12 0 R 64 0 R 65 0 R 66 0 R 67 0 R 34 0 R 35 0 R 36 0 R ] /Contents [ 68 0 R 69 0 R 70 0 R ] /MediaBox [ 0 0 612 792 ] /Parent 4 0 R /Resources << /Font << /F1 51 0 R >> /ProcSet [ /PDF /Text ] /XObject << /Fx1 52 0 R >> >> /Type /Page >> +endobj +20 0 obj +<< /Annots [ 71 0 R 14 0 R 72 0 R 15 0 R 73 0 R 74 0 R 75 0 R 76 0 R 39 0 R 40 0 R 41 0 R ] /Contents [ 77 0 R 78 0 R 79 0 R ] /MediaBox [ 0 0 612 792 ] /Parent 4 0 R /Resources << /Font << /F1 51 0 R >> /ProcSet [ /PDF /Text ] /XObject << /Fx1 52 0 R >> >> /Type /Page >> +endobj +21 0 obj +<< /BBox [ 0 -2.826 118.8 11.322 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 58 /Filter /FlateDecode >> +stream +xPpu*r +RPw3T0PI5r+2SsR4B\C\V endstream +endobj +22 0 obj +<< /Font << /F1 80 0 R >> >> +endobj +23 0 obj +<< /BBox [ 0 -2.826 140.4 11.322 ] /Matrix [ 0 1 -1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 60 /Filter /FlateDecode >> +stream +xPpu*r +RPw3T0PI5Kt2SsR4B\C\rP endstream +endobj +24 0 obj +<< /AP << /N << /1 81 0 R /Off 82 0 R >> >> /AS /1 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 7 0 R /Rect [ 152.749 648.501 164.801 660.549 ] /Subtype /Widget /Type /Annot >> +endobj +25 0 obj +<< /AP << /N << /2 84 0 R /Off 85 0 R >> >> /AS /2 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 7 0 R /Rect [ 152.749 627.301 164.801 639.349 ] /Subtype /Widget /Type /Annot >> +endobj +26 0 obj +<< /AP << /N << /3 86 0 R /Off 87 0 R >> >> /AS /3 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 7 0 R /Rect [ 151.399 606.501 163.451 618.549 ] /Subtype /Widget /Type /Annot >> +endobj +27 0 obj +<< /BBox [ 0 -2.826 118.8 11.322 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 58 /Filter /FlateDecode >> +stream +xPpu*r +RPw3T0PI5r+2SsR4B\C\V endstream +endobj +28 0 obj +<< /BBox [ 0 -2.826 140.4 11.322 ] /Matrix [ 0 1 -1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 60 /Filter /FlateDecode >> +stream +xPpu*r +RPw3T0PI5Kt2SsR4B\C\rP endstream +endobj +29 0 obj +<< /AP << /N << /1 88 0 R /Off 89 0 R >> >> /AS /1 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 10 0 R /Rect [ 152.749 648.501 164.801 660.549 ] /Subtype /Widget /Type /Annot >> +endobj +30 0 obj +<< /AP << /N << /2 90 0 R /Off 91 0 R >> >> /AS /2 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 10 0 R /Rect [ 152.749 627.301 164.801 639.349 ] /Subtype /Widget /Type /Annot >> +endobj +31 0 obj +<< /AP << /N << /3 92 0 R /Off 93 0 R >> >> /AS /3 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 10 0 R /Rect [ 151.399 606.501 163.451 618.549 ] /Subtype /Widget /Type /Annot >> +endobj +32 0 obj +<< /BBox [ 0 -2.826 118.8 11.322 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 58 /Filter /FlateDecode >> +stream +xPpu*r +RPw3T0PI5r+2SsR4B\C\V endstream +endobj +33 0 obj +<< /BBox [ 0 -2.826 140.4 11.322 ] /Matrix [ 0 1 -1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 60 /Filter /FlateDecode >> +stream +xPpu*r +RPw3T0PI5Kt2SsR4B\C\rP endstream +endobj +34 0 obj +<< /AP << /N << /1 94 0 R /Off 95 0 R >> >> /AS /1 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 13 0 R /Rect [ 152.749 648.501 164.801 660.549 ] /Subtype /Widget /Type /Annot >> +endobj +35 0 obj +<< /AP << /N << /2 96 0 R /Off 97 0 R >> >> /AS /2 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 13 0 R /Rect [ 152.749 627.301 164.801 639.349 ] /Subtype /Widget /Type /Annot >> +endobj +36 0 obj +<< /AP << /N << /3 98 0 R /Off 99 0 R >> >> /AS /3 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 13 0 R /Rect [ 151.399 606.501 163.451 618.549 ] /Subtype /Widget /Type /Annot >> +endobj +37 0 obj +<< /BBox [ 0 -2.826 118.8 11.322 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 58 /Filter /FlateDecode >> +stream +xPpu*r +RPw3T0PI5r+2SsR4B\C\V endstream +endobj +38 0 obj +<< /BBox [ 0 -2.826 140.4 11.322 ] /Matrix [ 0 1 -1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 60 /Filter /FlateDecode >> +stream +xPpu*r +RPw3T0PI5Kt2SsR4B\C\rP endstream +endobj +39 0 obj +<< /AP << /N << /1 100 0 R /Off 101 0 R >> >> /AS /1 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 16 0 R /Rect [ 152.749 648.501 164.801 660.549 ] /Subtype /Widget /Type /Annot >> +endobj +40 0 obj +<< /AP << /N << /2 102 0 R /Off 103 0 R >> >> /AS /2 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 16 0 R /Rect [ 152.749 627.301 164.801 639.349 ] /Subtype /Widget /Type /Annot >> +endobj +41 0 obj +<< /AP << /N << /3 104 0 R /Off 105 0 R >> >> /AS /3 /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) /DR << /Font << /ZaDi 83 0 R >> >> /F 4 /FT /Btn /MK << /CA (l) >> /Parent 16 0 R /Rect [ 151.399 606.501 163.451 618.549 ] /Subtype /Widget /Type /Annot >> +endobj +42 0 obj +<< /A << /S /URI /URI (https://www.qbilt.org/) >> /Border [ 0 0 .4 ] /C [ .8 .6 .6 ] /H /I /Rect [ 72 501.832 374.4 520.696 ] /Subtype /Link /Type /Annot >> +endobj +43 0 obj +<< /AP << /N 106 0 R >> /Contents (attachment1.txt) /FS 107 0 R /NM (attachment1.txt) /Rect [ 72 400 92 420 ] /Subtype /FileAttachment /Type /Annot >> +endobj +44 0 obj +<< /AP << /N 108 0 R >> /DA () /Rect [ 72 350 92 360 ] /Subtype /FreeText /Type /Annot >> +endobj +45 0 obj +<< /AP << /N 109 0 R >> /DA () /Rect [ 102 350 112 370 ] /Subtype /FreeText /Type /Annot >> +endobj +46 0 obj +<< /AP << /N 110 0 R >> /DA () /Rect [ 122 350 142 360 ] /Subtype /FreeText /Type /Annot >> +endobj +47 0 obj +<< /AP << /N 111 0 R >> /DA () /Rect [ 152 350 162 370 ] /Subtype /FreeText /Type /Annot >> +endobj +48 0 obj +<< /Length 10 /Filter /FlateDecode >> +stream +x+|endstream +endobj +49 0 obj +<< /Filter /FlateDecode /Length 53 >> +stream +xs +Qw3T04UIS07" ̼TCM,. ,endstream +endobj +50 0 obj +<< /Length 32 /Filter /FlateDecode >> +stream +x +*2T0B˥VaUendstream +endobj +51 0 obj +<< /BaseFont /Times-Roman /Encoding /WinAnsiEncoding /Subtype /Type1 /Type /Font >> +endobj +52 0 obj +<< /BBox [ 0 0 612 792 ] /Resources << /Font << /F1 80 0 R >> >> /Subtype /Form /Type /XObject /Length 455 /Filter /FlateDecode >> +stream +xeRr0+R`YɐL/ʹ饗62&}Ǚ}cLBg5 dY e29R^ؙ D,!FbIș2}?GJb,o=?ORXh]%#6iv;mVyL$J(R)Gꖆ$^S3Eq8_L`+_V(>e{|Lc2'AviE Ns[j*joxV=6|)VPQ$iCf~5m3}5eDTk<;zǡ1mݴf>lHt3*6_]XCXpPZ9͆B0j.~(!5C87`ͨ2w_N`J[Gu.qJ? +NΨendstream +endobj +53 0 obj +<< /A << /S /URI /URI (https://www.qbilt.org/) >> /Border [ 0 0 .4 ] /C [ .8 .6 .6 ] /H /I /Rect [ 72 501.832 374.4 520.696 ] /Subtype /Link /Type /Annot >> +endobj +54 0 obj +<< /AP << /N 112 0 R >> /Contents (attachment1.txt) /FS 107 0 R /NM (attachment1.txt) /Rect [ 72 400 92 420 ] /Subtype /FileAttachment /Type /Annot >> +endobj +55 0 obj +<< /AP << /N 113 0 R >> /DA () /Rect [ 72 350 92 360 ] /Subtype /FreeText /Type /Annot >> +endobj +56 0 obj +<< /AP << /N 114 0 R >> /DA () /Rect [ 102 350 112 370 ] /Subtype /FreeText /Type /Annot >> +endobj +57 0 obj +<< /AP << /N 115 0 R >> /DA () /Rect [ 122 350 142 360 ] /Subtype /FreeText /Type /Annot >> +endobj +58 0 obj +<< /AP << /N 116 0 R >> /DA () /Rect [ 152 350 162 370 ] /Subtype /FreeText /Type /Annot >> +endobj +59 0 obj +<< /Length 10 /Filter /FlateDecode >> +stream +x+|endstream +endobj +60 0 obj +<< /Filter /FlateDecode /Length 53 >> +stream +xs +Qw3T04UIS07" ̼T#M,. -endstream +endobj +61 0 obj +<< /Length 32 /Filter /FlateDecode >> +stream +x +*2T0B˥VaUendstream +endobj +62 0 obj +<< /A << /S /URI /URI (https://www.qbilt.org/) >> /Border [ 0 0 .4 ] /C [ .8 .6 .6 ] /H /I /Rect [ 72 501.832 374.4 520.696 ] /Subtype /Link /Type /Annot >> +endobj +63 0 obj +<< /AP << /N 117 0 R >> /Contents (attachment1.txt) /FS 107 0 R /NM (attachment1.txt) /Rect [ 72 400 92 420 ] /Subtype /FileAttachment /Type /Annot >> +endobj +64 0 obj +<< /AP << /N 118 0 R >> /DA () /Rect [ 72 350 92 360 ] /Subtype /FreeText /Type /Annot >> +endobj +65 0 obj +<< /AP << /N 119 0 R >> /DA () /Rect [ 102 350 112 370 ] /Subtype /FreeText /Type /Annot >> +endobj +66 0 obj +<< /AP << /N 120 0 R >> /DA () /Rect [ 122 350 142 360 ] /Subtype /FreeText /Type /Annot >> +endobj +67 0 obj +<< /AP << /N 121 0 R >> /DA () /Rect [ 152 350 162 370 ] /Subtype /FreeText /Type /Annot >> +endobj +68 0 obj +<< /Length 10 /Filter /FlateDecode >> +stream +x+|endstream +endobj +69 0 obj +<< /Filter /FlateDecode /Length 53 >> +stream +xs +Qw3T04UIS07" ̼TcM,. .endstream +endobj +70 0 obj +<< /Length 32 /Filter /FlateDecode >> +stream +x +*2T0B˥VaUendstream +endobj +71 0 obj +<< /A << /S /URI /URI (https://www.qbilt.org/) >> /Border [ 0 0 .4 ] /C [ .8 .6 .6 ] /H /I /Rect [ 72 501.832 374.4 520.696 ] /Subtype /Link /Type /Annot >> +endobj +72 0 obj +<< /AP << /N 122 0 R >> /Contents (attachment1.txt) /FS 107 0 R /NM (attachment1.txt) /Rect [ 72 400 92 420 ] /Subtype /FileAttachment /Type /Annot >> +endobj +73 0 obj +<< /AP << /N 123 0 R >> /DA () /Rect [ 72 350 92 360 ] /Subtype /FreeText /Type /Annot >> +endobj +74 0 obj +<< /AP << /N 124 0 R >> /DA () /Rect [ 102 350 112 370 ] /Subtype /FreeText /Type /Annot >> +endobj +75 0 obj +<< /AP << /N 125 0 R >> /DA () /Rect [ 122 350 142 360 ] /Subtype /FreeText /Type /Annot >> +endobj +76 0 obj +<< /AP << /N 126 0 R >> /DA () /Rect [ 152 350 162 370 ] /Subtype /FreeText /Type /Annot >> +endobj +77 0 obj +<< /Length 10 /Filter /FlateDecode >> +stream +x+|endstream +endobj +78 0 obj +<< /Filter /FlateDecode /Length 53 >> +stream +xs +Qw3T04UIS07" ̼TM,.) /endstream +endobj +79 0 obj +<< /Length 32 /Filter /FlateDecode >> +stream +x +*2T0B˥VaUendstream +endobj +80 0 obj +<< /BaseFont /Courier /Encoding /WinAnsiEncoding /Subtype /Type1 /Type /Font >> +endobj +81 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 136 /Filter /FlateDecode >> +stream +x=0 Dw 4nY > +stream +xPpurb&endstream +endobj +83 0 obj +<< /BaseFont /ZapfDingbats /Subtype /Type1 /Type /Font >> +endobj +84 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 137 /Filter /FlateDecode >> +stream +x=0 Dw 4nY > +stream +xPpurb&endstream +endobj +86 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 136 /Filter /FlateDecode >> +stream +x=0 w? nYK;2 ebCAE 0$n`w']b:)p%!Ħ! 6?""$;-.Ρa/ ԱPȡgrB;'6|Oxږo +R?tS'endstream +endobj +87 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 18 /Filter /FlateDecode >> +stream +xPpurb&endstream +endobj +88 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 136 /Filter /FlateDecode >> +stream +x=0 Dw 4nY > +stream +xPpurb&endstream +endobj +90 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 137 /Filter /FlateDecode >> +stream +x=0 Dw 4nY > +stream +xPpurb&endstream +endobj +92 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 136 /Filter /FlateDecode >> +stream +x=0 w? nYK;2 ebCAE 0$n`w']b:)p%!Ħ! 6?""$;-.Ρa/ ԱPȡgrB;'6|Oxږo +R?tS'endstream +endobj +93 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 18 /Filter /FlateDecode >> +stream +xPpurb&endstream +endobj +94 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 136 /Filter /FlateDecode >> +stream +x=0 Dw 4nY > +stream +xPpurb&endstream +endobj +96 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 137 /Filter /FlateDecode >> +stream +x=0 Dw 4nY > +stream +xPpurb&endstream +endobj +98 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 136 /Filter /FlateDecode >> +stream +x=0 w? nYK;2 ebCAE 0$n`w']b:)p%!Ħ! 6?""$;-.Ρa/ ԱPȡgrB;'6|Oxږo +R?tS'endstream +endobj +99 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 18 /Filter /FlateDecode >> +stream +xPpurb&endstream +endobj +100 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 136 /Filter /FlateDecode >> +stream +x=0 Dw 4nY > +stream +xPpurb&endstream +endobj +102 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 137 /Filter /FlateDecode >> +stream +x=0 Dw 4nY > +stream +xPpurb&endstream +endobj +104 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 136 /Filter /FlateDecode >> +stream +x=0 w? nYK;2 ebCAE 0$n`w']b:)p%!Ħ! 6?""$;-.Ρa/ ԱPȡgrB;'6|Oxږo +R?tS'endstream +endobj +105 0 obj +<< /BBox [ 0 0 12.05 12.05 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 127 0 R /Subtype /Form /Type /XObject /Length 18 /Filter /FlateDecode >> +stream +xPpurb&endstream +endobj +106 0 obj +<< /BBox [ 0 0 20 20 ] /Matrix [ 1 0 0 1 0 0 ] /Resources << >> /Subtype /Form /Type /XObject /Length 41 /Filter /FlateDecode >> +stream +x3P04P +9\F n 5qA<#0*J +m endstream +endobj +107 0 obj +<< /EF << /F 128 0 R /UF 128 0 R >> /F (attachment1.txt) /Type /Filespec /UF (attachment1.txt) >> +endobj +108 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 31 /Filter /FlateDecode >> +stream +x3T0 w.ed`hP +B\y'endstream +endobj +109 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 0 1 -1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 34 /Filter /FlateDecode >> +stream +x3P0T0Pr2RF + +E`)y%endstream +endobj +110 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ -1 0 0 -1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 33 /Filter /FlateDecode >> +stream +x3P0P0Tr22lT0y#endstream +endobj +111 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 0 -1 1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 35 /Filter /FlateDecode >> +stream +x33U0P0Tr22lT00endstream +endobj +112 0 obj +<< /BBox [ 0 0 20 20 ] /Matrix [ 1 0 0 1 0 0 ] /Resources << >> /Subtype /Form /Type /XObject /Length 41 /Filter /FlateDecode >> +stream +x3P04P +9\F n 5qA<#0*J +m endstream +endobj +113 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 31 /Filter /FlateDecode >> +stream +x3T0 w.ed`hP +B\y'endstream +endobj +114 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 0 1 -1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 34 /Filter /FlateDecode >> +stream +x3P0T0Pr2RF + +E`)y%endstream +endobj +115 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ -1 0 0 -1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 33 /Filter /FlateDecode >> +stream +x3P0P0Tr22lT0y#endstream +endobj +116 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 0 -1 1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 35 /Filter /FlateDecode >> +stream +x33U0P0Tr22lT00endstream +endobj +117 0 obj +<< /BBox [ 0 0 20 20 ] /Matrix [ 1 0 0 1 0 0 ] /Resources << >> /Subtype /Form /Type /XObject /Length 41 /Filter /FlateDecode >> +stream +x3P04P +9\F n 5qA<#0*J +m endstream +endobj +118 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 31 /Filter /FlateDecode >> +stream +x3T0 w.ed`hP +B\y'endstream +endobj +119 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 0 1 -1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 34 /Filter /FlateDecode >> +stream +x3P0T0Pr2RF + +E`)y%endstream +endobj +120 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ -1 0 0 -1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 33 /Filter /FlateDecode >> +stream +x3P0P0Tr22lT0y#endstream +endobj +121 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 0 -1 1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 35 /Filter /FlateDecode >> +stream +x33U0P0Tr22lT00endstream +endobj +122 0 obj +<< /BBox [ 0 0 20 20 ] /Matrix [ 1 0 0 1 0 0 ] /Resources << >> /Subtype /Form /Type /XObject /Length 41 /Filter /FlateDecode >> +stream +x3P04P +9\F n 5qA<#0*J +m endstream +endobj +123 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 31 /Filter /FlateDecode >> +stream +x3T0 w.ed`hP +B\y'endstream +endobj +124 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 0 1 -1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 34 /Filter /FlateDecode >> +stream +x3P0T0Pr2RF + +E`)y%endstream +endobj +125 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ -1 0 0 -1 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 33 /Filter /FlateDecode >> +stream +x3P0P0Tr22lT0y#endstream +endobj +126 0 obj +<< /BBox [ 0 0 20 10 ] /Matrix [ 0 -1 1 0 0 0 ] /Resources 22 0 R /Subtype /Form /Type /XObject /Length 35 /Filter /FlateDecode >> +stream +x33U0P0Tr22lT00endstream +endobj +127 0 obj +<< /Font 129 0 R /ProcSet [ /PDF /Text ] >> +endobj +128 0 obj +<< /Params << /CheckSum <80a33fc110b5a7b8b4d58b8d57e814bc> /Size 22 /Subtype /text#2fplain >> /Type /EmbeddedFile /Length 28 /Filter /FlateDecode >> +stream +xK+I+QOSH,)ILbDendstream +endobj +129 0 obj +<< /ZaDi 83 0 R >> +endobj +xref +0 130 +0000000000 65535 f +0000000015 00000 n +0000000080 00000 n +0000000161 00000 n +0000000273 00000 n +0000000354 00000 n +0000000552 00000 n +0000000755 00000 n +0000000847 00000 n +0000001045 00000 n +0000001248 00000 n +0000001341 00000 n +0000001540 00000 n +0000001744 00000 n +0000001837 00000 n +0000002036 00000 n +0000002240 00000 n +0000002333 00000 n +0000002620 00000 n +0000002907 00000 n +0000003196 00000 n +0000003485 00000 n +0000003718 00000 n +0000003763 00000 n +0000003999 00000 n +0000004266 00000 n +0000004533 00000 n +0000004800 00000 n +0000005033 00000 n +0000005269 00000 n +0000005537 00000 n +0000005805 00000 n +0000006073 00000 n +0000006306 00000 n +0000006542 00000 n +0000006810 00000 n +0000007078 00000 n +0000007346 00000 n +0000007579 00000 n +0000007815 00000 n +0000008085 00000 n +0000008355 00000 n +0000008625 00000 n +0000008798 00000 n +0000008965 00000 n +0000009071 00000 n +0000009179 00000 n +0000009287 00000 n +0000009395 00000 n +0000009476 00000 n +0000009600 00000 n +0000009703 00000 n +0000009803 00000 n +0000010422 00000 n +0000010595 00000 n +0000010762 00000 n +0000010868 00000 n +0000010976 00000 n +0000011084 00000 n +0000011192 00000 n +0000011273 00000 n +0000011397 00000 n +0000011500 00000 n +0000011673 00000 n +0000011840 00000 n +0000011946 00000 n +0000012054 00000 n +0000012162 00000 n +0000012270 00000 n +0000012351 00000 n +0000012475 00000 n +0000012578 00000 n +0000012751 00000 n +0000012918 00000 n +0000013024 00000 n +0000013132 00000 n +0000013240 00000 n +0000013348 00000 n +0000013429 00000 n +0000013553 00000 n +0000013656 00000 n +0000013752 00000 n +0000014059 00000 n +0000014247 00000 n +0000014321 00000 n +0000014629 00000 n +0000014817 00000 n +0000015124 00000 n +0000015312 00000 n +0000015619 00000 n +0000015807 00000 n +0000016115 00000 n +0000016303 00000 n +0000016610 00000 n +0000016798 00000 n +0000017105 00000 n +0000017293 00000 n +0000017601 00000 n +0000017789 00000 n +0000018096 00000 n +0000018284 00000 n +0000018592 00000 n +0000018781 00000 n +0000019090 00000 n +0000019279 00000 n +0000019587 00000 n +0000019776 00000 n +0000019980 00000 n +0000020095 00000 n +0000020290 00000 n +0000020489 00000 n +0000020688 00000 n +0000020888 00000 n +0000021092 00000 n +0000021287 00000 n +0000021486 00000 n +0000021685 00000 n +0000021885 00000 n +0000022089 00000 n +0000022284 00000 n +0000022483 00000 n +0000022682 00000 n +0000022882 00000 n +0000023086 00000 n +0000023281 00000 n +0000023480 00000 n +0000023679 00000 n +0000023879 00000 n +0000023940 00000 n +0000024151 00000 n +trailer << /Info 2 0 R /Root 1 0 R /Size 130 /ID [<31415926535897932384626433832795>] >> +startxref +24187 +%%EOF diff --git a/examples/qtest/overlay-page/annotations.pdf b/examples/qtest/overlay-page/annotations.pdf new file mode 100644 index 00000000..118363d7 --- /dev/null +++ b/examples/qtest/overlay-page/annotations.pdf @@ -0,0 +1,942 @@ +%PDF-1.6 +% +%QDF-1.0 + +1 0 obj +<< + /AcroForm << + /DR 2 0 R + /Fields [ + 3 0 R + 4 0 R + 5 0 R + ] + >> + /Names << + /EmbeddedFiles 6 0 R + >> + /Pages 7 0 R + /Type /Catalog +>> +endobj + +2 0 obj +<< + /Font << + /F1 8 0 R + >> +>> +endobj + +3 0 obj +<< + /AP << + /N 9 0 R + >> + /DA (0 0.4 0 rg /F1 18 Tf) + /DR 2 0 R + /DV () + /FT /Tx + /Ff 0 + /Rect [ + 72 + 470.774 + 190.8 + 484.922 + ] + /Subtype /Widget + /T (Text Box 1) + /Type /Annot + /V (Formy field) +>> +endobj + +4 0 obj +<< + /AP << + /N 11 0 R + >> + /DA (0 0.4 0 rg /F1 18 Tf) + /DR 2 0 R + /DV () + /FT /Tx + /Ff 0 + /Rect [ + 372 + 330.774 + 386.148 + 470.374 + ] + /Subtype /Widget + /T (Text Box 1) + /Type /Annot + /V (Rot-ccw field) +>> +endobj + +5 0 obj +<< + /DV /1 + /FT /Btn + /Ff 49152 + /Kids [ + 13 0 R + 14 0 R + 15 0 R + ] + /T (r1) + /V /2 +>> +endobj + +6 0 obj +<< + /Names [ + (attachment1.txt) + 16 0 R + ] +>> +endobj + +7 0 obj +<< + /Count 1 + /Kids [ + 17 0 R + ] + /Type /Pages +>> +endobj + +8 0 obj +<< + /BaseFont /Courier + /Encoding /WinAnsiEncoding + /Subtype /Type1 + /Type /Font +>> +endobj + +9 0 obj +<< + /BBox [ + 0 + -2.826 + 118.8 + 11.322 + ] + /Resources 2 0 R + /Subtype /Form + /Type /XObject + /Length 10 0 R +>> +stream +/Tx BMC +q +BT + /F1 18 Tf + (Formy field) Tj +ET +Q +EMC +endstream +endobj + +10 0 obj +53 +endobj + +11 0 obj +<< + /BBox [ + 0 + -2.826 + 140.4 + 11.322 + ] + /Matrix [ + 0 + 1 + -1 + 0 + 0 + 0 + ] + /Resources 2 0 R + /Subtype /Form + /Type /XObject + /Length 12 0 R +>> +stream +/Tx BMC +q +BT + /F1 18 Tf + (Rot-ccw field) Tj +ET +Q +EMC +endstream +endobj + +12 0 obj +55 +endobj + +13 0 obj +<< + /AP << + /N << + /1 18 0 R + /Off 20 0 R + >> + >> + /AS /1 + /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) + /DR << + /Font << + /ZaDi 22 0 R + >> + >> + /F 4 + /FT /Btn + /MK << + /CA (l) + >> + /Parent 5 0 R + /Rect [ + 152.749 + 648.501 + 164.801 + 660.549 + ] + /Subtype /Widget + /Type /Annot +>> +endobj + +14 0 obj +<< + /AP << + /N << + /2 23 0 R + /Off 25 0 R + >> + >> + /AS /2 + /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) + /DR << + /Font << + /ZaDi 22 0 R + >> + >> + /F 4 + /FT /Btn + /MK << + /CA (l) + >> + /Parent 5 0 R + /Rect [ + 152.749 + 627.301 + 164.801 + 639.349 + ] + /Subtype /Widget + /Type /Annot +>> +endobj + +15 0 obj +<< + /AP << + /N << + /3 27 0 R + /Off 29 0 R + >> + >> + /AS /3 + /DA (0.18039 0.20392 0.21176 rg /ZaDi 0 Tf) + /DR << + /Font << + /ZaDi 22 0 R + >> + >> + /F 4 + /FT /Btn + /MK << + /CA (l) + >> + /Parent 5 0 R + /Rect [ + 151.399 + 606.501 + 163.451 + 618.549 + ] + /Subtype /Widget + /Type /Annot +>> +endobj + +16 0 obj +<< + /EF << + /F 31 0 R + /UF 31 0 R + >> + /F (attachment1.txt) + /Type /Filespec + /UF (attachment1.txt) +>> +endobj + +%% Page 1 +17 0 obj +<< + /Annots [ + 33 0 R + 3 0 R + 34 0 R + 4 0 R + 35 0 R + 36 0 R + 37 0 R + 38 0 R + 13 0 R + 14 0 R + 15 0 R + ] + /Contents 39 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 7 0 R + /Resources 2 0 R + /Type /Page +>> +endobj + +18 0 obj +<< + /BBox [ + 0 + 0 + 12.05 + 12.05 + ] + /Resources 41 0 R + /Subtype /Form + /Type /XObject + /Length 19 0 R +>> +stream +/Tx BMC +q BT +0.18039 0.20392 0.21176 rg /ZaDi 12.05 Tf +0 0 Td +ET +Q +1 0 0 rg +6 8.4 m 7.35 8.4 8.45 7.35 8.45 6 c +8.45 4.65 7.35 3.55 6 3.55 c +4.65 3.55 3.6 4.65 3.6 6 c +3.6 7.35 4.65 8.4 6 8.4 c f* + +EMC +endstream +endobj + +19 0 obj +202 +endobj + +20 0 obj +<< + /BBox [ + 0 + 0 + 12.05 + 12.05 + ] + /Resources 41 0 R + /Subtype /Form + /Type /XObject + /Length 21 0 R +>> +stream +/Tx BMC +EMC +endstream +endobj + +21 0 obj +12 +endobj + +22 0 obj +<< + /BaseFont /ZapfDingbats + /Subtype /Type1 + /Type /Font +>> +endobj + +23 0 obj +<< + /BBox [ + 0 + 0 + 12.05 + 12.05 + ] + /Resources 41 0 R + /Subtype /Form + /Type /XObject + /Length 24 0 R +>> +stream +/Tx BMC +q BT +0.18039 0.20392 0.21176 rg /ZaDi 12.05 Tf +0 0 Td +ET +Q +0 1 0 rg +6 8.4 m 7.35 8.4 8.45 7.35 8.45 6 c +8.45 4.65 7.35 3.55 6 3.55 c +4.65 3.55 3.6 4.65 3.6 6 c +3.6 7.35 4.65 8.4 6 8.4 c f* + +EMC +endstream +endobj + +24 0 obj +202 +endobj + +25 0 obj +<< + /BBox [ + 0 + 0 + 12.05 + 12.05 + ] + /Resources 41 0 R + /Subtype /Form + /Type /XObject + /Length 26 0 R +>> +stream +/Tx BMC +EMC +endstream +endobj + +26 0 obj +12 +endobj + +27 0 obj +<< + /BBox [ + 0 + 0 + 12.05 + 12.05 + ] + /Resources 41 0 R + /Subtype /Form + /Type /XObject + /Length 28 0 R +>> +stream +/Tx BMC +q BT +0.18039 0.20392 0.21176 rg /ZaDi 12.05 Tf +0 0 Td +ET +Q +0 0 1 rg +6 8.4 m 7.35 8.4 8.45 7.35 8.45 6 c +8.45 4.65 7.35 3.55 6 3.55 c +4.65 3.55 3.6 4.65 3.6 6 c +3.6 7.35 4.65 8.4 6 8.4 c f* + +EMC +endstream +endobj + +28 0 obj +202 +endobj + +29 0 obj +<< + /BBox [ + 0 + 0 + 12.05 + 12.05 + ] + /Resources 41 0 R + /Subtype /Form + /Type /XObject + /Length 30 0 R +>> +stream +/Tx BMC +EMC +endstream +endobj + +30 0 obj +12 +endobj + +31 0 obj +<< + /Params << + /CheckSum <80a33fc110b5a7b8b4d58b8d57e814bc> + /Size 22 + /Subtype /text#2fplain + >> + /Type /EmbeddedFile + /Length 32 0 R +>> +stream +content of attachment +endstream +endobj + +32 0 obj +22 +endobj + +33 0 obj +<< + /A << + /S /URI + /URI (https://www.qbilt.org/) + >> + /Border [ + 0 + 0 + .4 + ] + /C [ + .8 + .6 + .6 + ] + /H /I + /Rect [ + 72 + 501.832 + 374.4 + 520.696 + ] + /Subtype /Link + /Type /Annot +>> +endobj + +34 0 obj +<< + /AP << + /N 42 0 R + >> + /Contents (attachment1.txt) + /FS 16 0 R + /NM (attachment1.txt) + /Rect [ + 72 + 400 + 92 + 420 + ] + /Subtype /FileAttachment + /Type /Annot +>> +endobj + +35 0 obj +<< + /AP << + /N 44 0 R + >> + /DA () + /Rect [ + 72 + 350 + 92 + 360 + ] + /Subtype /FreeText + /Type /Annot +>> +endobj + +36 0 obj +<< + /AP << + /N 46 0 R + >> + /DA () + /Rect [ + 102 + 350 + 112 + 370 + ] + /Subtype /FreeText + /Type /Annot +>> +endobj + +37 0 obj +<< + /AP << + /N 48 0 R + >> + /DA () + /Rect [ + 122 + 350 + 142 + 360 + ] + /Subtype /FreeText + /Type /Annot +>> +endobj + +38 0 obj +<< + /AP << + /N 50 0 R + >> + /DA () + /Rect [ + 152 + 350 + 162 + 370 + ] + /Subtype /FreeText + /Type /Annot +>> +endobj + +%% Contents for page 1 +39 0 obj +<< + /Length 40 0 R +>> +stream +q +1 1 .7 rg +.5 .5 0 RG +72 470.77 118.8 14.15 re +B +Q +q +0 .5 .5 RG +0 1 1 rg +372 330.77 14.15 139.4 re +B +Q +q +1 0 0 RG +72 310 20 10 re +72 310 5 10 re +S +0 1 0 RG +102 310 10 20 re +102 310 10 5 re +S +0 0 1 RG +122 310 20 10 re +137 310 5 10 re +S +0.5 0 1 RG +152 310 10 20 re +152 325 10 5 re +S +10 w +0.14 .33 .18 RG +5 5 602 782 re +S +Q +BT + /F1 16 Tf + 20.6 TL + 170 650 Td + (radio button 1) Tj + (radio button 2) ' + (radio button 3) ' + 1 0 0 1 72 546 Tm + /F1 20 Tf + (Thick green border surrounds page.) Tj + 0 -40 Td + /F1 24 Tf + 0 0 1 rg + (https://www.qbilt.org) Tj + /F1 12 Tf + 1 0 0 1 202 474 Tm + (<- Formy field in yellow) Tj + 1 0 0 1 392 410 Tm + 14.4 TL + (<- Rot-ccw field) Tj + (with "Rot" at bottom) ' + (and text going up) ' + 0 g + 1 0 0 1 102 405 Tm + (Arrow to the left points down.) Tj + 1 0 0 1 182 310 Tm + (<- Drawn rectangles appear below annotations.) Tj +ET +endstream +endobj + +40 0 obj +874 +endobj + +41 0 obj +<< + /Font 52 0 R + /ProcSet [ + /PDF + /Text + ] +>> +endobj + +42 0 obj +<< + /BBox [ + 0 + 0 + 20 + 20 + ] + /Resources << + >> + /Subtype /Form + /Type /XObject + /Length 43 0 R +>> +stream +0 10 m +10 0 l +20 10 l +10 0 m +10 20 l +0 0 20 20 re +S +endstream +endobj + +43 0 obj +52 +endobj + +44 0 obj +<< + /BBox [ + 0 + 0 + 20 + 10 + ] + /Resources 2 0 R + /Subtype /Form + /Type /XObject + /Length 45 0 R +>> +stream +1 0 0 RG +0 0 20 10 re +0 0 5 10 re +S +endstream +endobj + +45 0 obj +36 +endobj + +46 0 obj +<< + /BBox [ + 0 + 0 + 20 + 10 + ] + /Matrix [ + 0 + 1 + -1 + 0 + 0 + 0 + ] + /Resources 2 0 R + /Subtype /Form + /Type /XObject + /Length 47 0 R +>> +stream +0 1 0 RG +0 0 20 10 re +0 0 5 10 re +S +endstream +endobj + +47 0 obj +36 +endobj + +48 0 obj +<< + /BBox [ + 0 + 0 + 20 + 10 + ] + /Matrix [ + -1 + 0 + 0 + -1 + 0 + 0 + ] + /Resources 2 0 R + /Subtype /Form + /Type /XObject + /Length 49 0 R +>> +stream +0 0 1 RG +0 0 20 10 re +0 0 5 10 re +S +endstream +endobj + +49 0 obj +36 +endobj + +50 0 obj +<< + /BBox [ + 0 + 0 + 20 + 10 + ] + /Matrix [ + 0 + -1 + 1 + 0 + 0 + 0 + ] + /Resources 2 0 R + /Subtype /Form + /Type /XObject + /Length 51 0 R +>> +stream +0.5 0 1 RG +0 0 20 10 re +0 0 5 10 re +S +endstream +endobj + +51 0 obj +38 +endobj + +52 0 obj +<< + /ZaDi 22 0 R +>> +endobj + +xref +0 53 +0000000000 65535 f +0000000025 00000 n +0000000211 00000 n +0000000263 00000 n +0000000506 00000 n +0000000755 00000 n +0000000874 00000 n +0000000944 00000 n +0000001017 00000 n +0000001121 00000 n +0000001335 00000 n +0000001355 00000 n +0000001625 00000 n +0000001645 00000 n +0000001997 00000 n +0000002349 00000 n +0000002701 00000 n +0000002842 00000 n +0000003114 00000 n +0000003473 00000 n +0000003494 00000 n +0000003663 00000 n +0000003683 00000 n +0000003764 00000 n +0000004123 00000 n +0000004144 00000 n +0000004313 00000 n +0000004333 00000 n +0000004692 00000 n +0000004713 00000 n +0000004882 00000 n +0000004902 00000 n +0000005110 00000 n +0000005130 00000 n +0000005374 00000 n +0000005578 00000 n +0000005718 00000 n +0000005860 00000 n +0000006002 00000 n +0000006167 00000 n +0000007098 00000 n +0000007119 00000 n +0000007193 00000 n +0000007397 00000 n +0000007417 00000 n +0000007603 00000 n +0000007623 00000 n +0000007862 00000 n +0000007882 00000 n +0000008122 00000 n +0000008142 00000 n +0000008383 00000 n +0000008403 00000 n +trailer << + /Root 1 0 R + /Size 53 + /ID [<7b639c67bfc16b5e891fa5468aac3a14>] +>> +startxref +8441 +%%EOF diff --git a/manual/qpdf-manual.xml b/manual/qpdf-manual.xml index cbeee1f6..35391938 100644 --- a/manual/qpdf-manual.xml +++ b/manual/qpdf-manual.xml @@ -5301,7 +5301,11 @@ print "\n"; QPDFPageObjectHelper::getMatrixForFormXObjectPlacement, which returns the transformation matrix required to map from a form field's coordinate system into a specific rectangle - within the page. + within the page. Also add a version of + QPDFPageObjectHelper::placeFormXObject + that initializes a QPDFMatrix + reference. For example, see + examples/pdf-overlay-page.cc.