From 2762f84b27e98b2fe1cc0d9a40143afbcd21c3cf Mon Sep 17 00:00:00 2001 From: Dmitry Radchuk Date: Fri, 30 Aug 2024 14:49:32 +0000 Subject: [PATCH] Take into account role mapping, while combining tag root kids, Fix NPE in grid creating related to box-sizing, Remove confusing #findMcrByMcid method from PdfStructTreeRoot DEVSIX-8578, DEVSIX-8581, DEVSIX-8573 Autoported commit. Original commit hash: [b8f684a0d] --- .../itext/kernel/utils/PdfMergerTest.cs | 20 +++++++++++++++ .../PdfMergerTest/cmp_mergedResult04.pdf | Bin 151930 -> 151982 bytes .../utils/PdfMergerTest/cmp_mergedTags.pdf | Bin 0 -> 39488 bytes .../utils/PdfMergerTest/tagRootKidsDoc1.pdf | Bin 0 -> 12286 bytes .../utils/PdfMergerTest/tagRootKidsDoc2.pdf | Bin 0 -> 12287 bytes .../itext/layout/element/GridContainerTest.cs | 23 ++++++++++++++++-- .../cmp_basicThreeColumnsTest.pdf | Bin 1440 -> 1440 bytes .../GridContainerTest/cmp_borderBoxChild.pdf | Bin 0 -> 1334 bytes .../cmp_borderBoxWithNoBordersTest.pdf | Bin 0 -> 1125 bytes .../kernel/pdf/tagging/PdfStructTreeRoot.cs | 12 --------- .../kernel/pdf/tagutils/RootTagNormalizer.cs | 6 +++-- .../itext/layout/renderer/GridItemRenderer.cs | 4 ++- .../itext/pdfua/checkers/PdfUA1Checker.cs | 15 ++++++++++-- port-hash | 2 +- 14 files changed, 62 insertions(+), 20 deletions(-) create mode 100644 itext.tests/itext.kernel.tests/resources/itext/kernel/utils/PdfMergerTest/cmp_mergedTags.pdf create mode 100644 itext.tests/itext.kernel.tests/resources/itext/kernel/utils/PdfMergerTest/tagRootKidsDoc1.pdf create mode 100644 itext.tests/itext.kernel.tests/resources/itext/kernel/utils/PdfMergerTest/tagRootKidsDoc2.pdf create mode 100644 itext.tests/itext.layout.tests/resources/itext/layout/GridContainerTest/cmp_borderBoxChild.pdf create mode 100644 itext.tests/itext.layout.tests/resources/itext/layout/GridContainerTest/cmp_borderBoxWithNoBordersTest.pdf diff --git a/itext.tests/itext.kernel.tests/itext/kernel/utils/PdfMergerTest.cs b/itext.tests/itext.kernel.tests/itext/kernel/utils/PdfMergerTest.cs index 0fda61cb08..5f0a494db0 100644 --- a/itext.tests/itext.kernel.tests/itext/kernel/utils/PdfMergerTest.cs +++ b/itext.tests/itext.kernel.tests/itext/kernel/utils/PdfMergerTest.cs @@ -783,6 +783,26 @@ public virtual void CopyOnlyEmptyOcPropertiesTest() { , destinationFolder, "diff_")); } + [LogMessage(iText.IO.Logs.IoLogMessageConstant.SOURCE_DOCUMENT_HAS_ACROFORM_DICTIONARY)] + [NUnit.Framework.Test] + public virtual void CombineTagRootKidsTest() { + String filename1 = sourceFolder + "tagRootKidsDoc1.pdf"; + String filename2 = sourceFolder + "tagRootKidsDoc2.pdf"; + String resultFile = destinationFolder + "mergedTags.pdf"; + PdfDocument result = new PdfDocument(CompareTool.CreateTestPdfWriter(resultFile)); + PdfMerger merger = new PdfMerger(result, new PdfMergerProperties().SetMergeTags(true).SetMergeOutlines(true + )).SetCloseSourceDocuments(true); + PdfDocument input1 = new PdfDocument(new PdfReader(filename1)); + merger.Merge(input1, 1, 1); + input1.Close(); + PdfDocument input2 = new PdfDocument(new PdfReader(filename2)); + merger.Merge(input2, 1, 1); + input2.Close(); + merger.Close(); + NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(resultFile, sourceFolder + "cmp_mergedTags.pdf" + , destinationFolder, "diff_")); + } + private PdfDictionary MergeSinglePdfAndGetResultingStructTreeRoot(String pathToMerge) { IList sources = new List(); sources.Add(new FileInfo(sourceFolder + pathToMerge)); diff --git a/itext.tests/itext.kernel.tests/resources/itext/kernel/utils/PdfMergerTest/cmp_mergedResult04.pdf b/itext.tests/itext.kernel.tests/resources/itext/kernel/utils/PdfMergerTest/cmp_mergedResult04.pdf index f362958bff3e47b84839cf832eb3a30cc0412f78..6bbe3fdc55bd007cff2f67fa39f65a1ca32e3ece 100644 GIT binary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erTest/cmp_mergedTags.pdf b/itext.tests/itext.kernel.tests/resources/itext/kernel/utils/PdfMergerTest/cmp_mergedTags.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e0c63b3f78436e452133430c6c2e5c24b5382ff8 GIT binary patch literal 39488 zcmeHw37AyHwJ>obAmV}&!L1cgP=@Y%Z?8%qv%w$?GtLZ~BeXp|cNUnLo^rBMk6XNfH5kl0W|K43&MZSsk%$u>gBe7-v58!d(lt3r}|XY zsZ*y;ovO3ckm|BAMaqa!?;%^aZP?g5=<#_H4KsU>9O)g?+LqRn-Z5>lv|gsi6OFoe zg5J@bZt?gPZPch#I;qFndskfX@sby2KIJ>4eAjoq=Uw>A8y7bYDDnLI!Isur4*c}= zUVo@;*&cu8kvo=0cNG_{d+f>9)h9o3_JW58J)in;%jtJ5e7$4cV|TwccjU4cKfGjM z(e+;!-Q2%?T-iMze81w6%`5MpvU=S=D{sDT#DZ%dKH>F=V;218+wXRjocXg07kesv z6%SN&R;*w2?&3v*iu=`_{jY)j?~i@`$n-rcKfY~w|397ZLB*1{4jppV+EtJ3ylYjj z1zjh{Z#eSvWhZ|+_80LJo)wTKPz9=9Bl0eyitu!;ida*Q#B|#gBS=-rk*O z*A5(bz_8KkLl?ZT^6{6Vi52SxpSjKR!GaBX_xGE(lyBa7T6*oJ-@NhiI|B!vReG70 z4$nDy)H{#*2afe`PhNUlq_pqHeZOAau>R`fLzn)2zhu8}n-4j5@_66A4<5e0#xwrH z-ygPq%0yeel|=m;UR= z{x7dRaba6y&o#$~FFwBGz=Kaa@ZMRUPdoVDS@HLWr|#Wg}LN|T=^~~A3{=DMaSM^`3Q*Ph#e9NJSjNUt=;uMeX zu>E=+(5rv1zP$zfKOZU9- z^1B01{oNm)dU)Gs-+gk&E8$ygZb?)gyLo-zw$jd?rGM`~V|M>D-`u+H*fZaJcKx*NGd>#h_5(`AH795{ zUvtIL^^+U4zrFL1h4I}-j(&FU^xc)e`B{(N&y5}+bE^_W9^+GN@++J8e?P}6L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jR2qDS$q)sU4uyLU8B$&~ HruY8=2F;cB literal 0 HcmV?d00001 diff --git a/itext.tests/itext.kernel.tests/resources/itext/kernel/utils/PdfMergerTest/tagRootKidsDoc1.pdf b/itext.tests/itext.kernel.tests/resources/itext/kernel/utils/PdfMergerTest/tagRootKidsDoc1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..102a3201611de7e51c8264253b21df862be7dcc7 GIT binary patch literal 12286 zcmeHtcUY5I(>Gn|NR=j$u9WnIP^E;XNG}$I5JD43gwR0{5s|KR5J3=G=}kbIBGN1f zg3@~j=~AVue;FIjT=L%TpbBP^|@ zkAKB5<|HHAxjeK8Hy3cmt>ty}j2Ila(O04{9tciqID~wjxIXVOh zYSQjEa+r7`Pj3F4Lz$hUA8=~d%1<9~9K@4bG8zY*qtSyK6TBNMtII7id!YD-M1bocH+rIR-36itEW4r z9)6V)x1iEs9f{;0pU2d%)lnTMv+SzQWTeA6TmOKbL><}?f&l*uYa)I(CIk#3858_> z#=QUjox@8#mf+D#NvX8?t@qO$c9n~Q-A_JM&X7EZ$oU7TOFC2lH|nV0duI)A^;b5p71%b8Qy*jm*!F7`3= zYN0!okD`_tp+Kq&fwV70>0W*$AJR&G(=HlZs{U#b4FTm(mY($F9R5^fHr(L5UU@%q zWQKn!iLZsFBZ{kBw27D2Wu#Di;-^h|8xRM3VK<$gw10`y3Ee&Q;M{c* zU}$P1=q~|-{0qP!f4IL4k^~s^?*N0qpvE9Q5DaPvLL4!eqT`IGLm+nAwzIrM=z@2K zl1?>t04`A8N;lh!ejRAE7x3y!mzA8{IrJ0@n*0v>2>?@6ue`OM$eS?>ZfK`uu_S9s zk-GECQA7X5s9|u_?}kPqA*6A`|909wO3=agonbk1@S3lmzPhwD%{YiX*(j$k=jaEv z*Ed)s?x=t$#A5x2xy9T?w2Mp?M&R?)Nz=XSed=oM0d_AgIv=%~2=>tO=C_P?W~Rwf z3Rns5Kl(_ag0=;03)8b|1DIL05z1QbpCkmMu=UiVe4cmS`3=!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ests/resources/itext/kernel/utils/PdfMergerTest/tagRootKidsDoc2.pdf b/itext.tests/itext.kernel.tests/resources/itext/kernel/utils/PdfMergerTest/tagRootKidsDoc2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a07b23bd549acfffd29378645a69e868459e46d2 GIT binary patch literal 12287 zcmeHtby$>J*FKFj(kUaY#Pke9N(v~_rP4Em0y7RngCL?Jtu%-rAxf7>iing!2+}Q$ zlqeRz#)^Rl4VCC|45c8htr;D$;9{pMKkL!Uh0@ln zU4-(3J?Z)L&DJ2Y`?bEFDe-dq*oOcoc5VIj0bC%SywZs{-~yE%+!*K6R9RDDee#KG%LNfRI}hWH z^a-V8$}5SMz8{Z}^QtZZ(h&ZntAY5 zO5BR#G|PA-|A$4JhV^F@TqM>#HJJ>w7+3TU>WR{!4Iv2dzpy6a4`V{WAfhqBe`m~l z9dET8Pq8(vnO4<^I>tZ+Dx9Ql45riRU(d2&*T%U{s|?Y^+gZ4!7biZ?h1FK;q)!hnMKUoZwLCy#k=BE>(eov^zGO-xIt9sQ!q$MSd^ ze)Ziu>W6}=RD;4`&9WR$#t|pSn0L3RK=N8QIb6IJ6J3K=E>v5kbuTR}T)Cn}y@D3| z_-JKn>umj{MGq#I*z2`!fORW{x0i4Gp3619QX*AE$||7213_U@TLQWE71 zBj9fdgZvA^AV1w-21z6g`gepuU{GU_9tZ|C1R_U&wM5!#zOqe&;4 zx&Y?nH`2}aqF)6W?FGL4++!;zcUFCdS)KH@`eT4iaf9;Kmqgx-d2nMVIkPoMbBfgM z-_9EPFJ=vcqy8{75(y#B8~(S;HY-5~J9vuu)WIvhA-bBfvNYphwq&E+!Q3P7SYKUZ zmbk3~A`^=Z7~>Z65Ya9+RTzga&L+(cd>PbG>kM>!e%|$n?bJ%HT+n<%>m$_YNN+i(3xX*dCn6M_^H7lWb+sd9H^ z056~OaclCi-UfKjOeJcNn(N7pGH)&jJ2Ly*G$Cp4sZo#?aD~LH)3n{Xbnd037VvbO zpqYLdU(f9nFV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r5wLgw z7(xsXe)E3TQoA4z1*st5P$&|GR0D%l)l{JB>JU|;6M<36GHP(JDp(Z?l2KL$!9fTF z3Z<$h16P(ofD!627zzvpLm@~w2nJVIRaI6~QHN?MYp5WURghp+6dVLWszPMoYBK6@ zsHzIF9SMc0%fMwIYAO&lI7mZAnfPB7q$m$U5N{*kDk?}-n3^&SqO7j0j8F$7)zoAV zY9J^?(E@lF@eqRz;K1+E%(vi)7~~KSu>cT+%=fs)%m8B#G`#=@KmcHi zKV98%)Yg`SOcWNRzsp13eUNaz)%I*SpEZY2xb^O>7yKd`Bx~4ZM=n6fL5_aaLE`@2 z0mB=GTx8%&ejzHrCa=b524lmcUM5=%IgN>{wPoE-iUxp_+p%CelWU`+wr;8 zPF0frY3|nQPaK+{`{XQVZvt++oC*?Q&;*T templateColumns = new List(); + templateColumns.Add(new PointValue(150.0f)); + templateColumns.Add(new PointValue(150.0f)); + using (Document document = new Document(new PdfDocument(new PdfWriter(filename)))) { + GridContainer grid = new GridContainer(); + grid.SetProperty(Property.GRID_TEMPLATE_COLUMNS, templateColumns); + Paragraph child = new Paragraph("First"); + child.SetProperty(Property.BOX_SIZING, BoxSizingPropertyValue.BORDER_BOX); + grid.Add(child); + document.Add(grid); + } + NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(filename, cmpName, DESTINATION_FOLDER, "diff_" + )); + } + [NUnit.Framework.Test] public virtual void BasicTwoColumnsTest() { - String filename = DESTINATION_FOLDER + "basicTwoColumnsTest.pdf"; - String cmpName = SOURCE_FOLDER + "cmp_basicTwoColumnsTest.pdf"; + String filename = DESTINATION_FOLDER + "borderBoxChild.pdf"; + String cmpName = SOURCE_FOLDER + "cmp_borderBoxChild.pdf"; IList templateColumns = new List(); templateColumns.Add(new PointValue(150.0f)); templateColumns.Add(new PointValue(150.0f)); diff --git a/itext.tests/itext.layout.tests/resources/itext/layout/GridContainerTest/cmp_basicThreeColumnsTest.pdf b/itext.tests/itext.layout.tests/resources/itext/layout/GridContainerTest/cmp_basicThreeColumnsTest.pdf index 89371e7953bf35f66d9feb932b667abf1a7d4445..0aa4e37347556324fd9f7e2e9b79e31e9aaaa247 100644 GIT binary patch delta 347 zcmc(bJ!(Qx5QXs(i##`wDvem?G53E4LLf!NDo@Z2%$+;8vQi5>SCGm&;1YyvFqc%> zfpD5roR5!lon2=)=^oLNF~J$U?7F9a?W=p9(f|Ye+`8|{*=I(hg~3sd0SGWd_7y2s zaxq)VoRln3by&3#W27Rb7W5cQ;?!0KkR@3a_QAL;9t4b9wpfya^^QfNxS*OWd(;*v v6kVg8`R(FeE delta 347 zcmc(bF-k*05Qgz#3STZ@Wg{tl%+BoY%zy|Mij_}@7ucD%Tct`;*yRLPsf8RN;01kH zc>}ATulV5OKP^wovv*e+C;&##3=CML3EnaN~o=s{6kiUIOGLcwQ2n1fi3&P^attC9$?RZPHH8&1L& vy#O8P;r>4pF6Rb1j*H>;_mjKz>*L${Wqj{<`?B4CY-{V4a=%(VjnDlLv7lQM diff --git a/itext.tests/itext.layout.tests/resources/itext/layout/GridContainerTest/cmp_borderBoxChild.pdf b/itext.tests/itext.layout.tests/resources/itext/layout/GridContainerTest/cmp_borderBoxChild.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b8387843b94bcedb8196bad926e85b6b7d4ac024 GIT binary patch literal 1334 zcmc&zU1%Id9FGqotfldz(GdI?luIwRcRM@#H5;y{$z3j~Chd7Sw3w!5c6au=df5%T zd*vD$(F#@iP_QH@B@ZgSLbbG_#ym&}4J`(=t)lgz`e0j&qG%BXQSoEuy!JE&U!8~D zng9Ghe*fR^Ke2o^mynXW5W8^k%*TQXAn?s6gj7n*x#frkVy;Xgnx&R+Q*n@brD!`q zs*z5IQ9#MKP@SFHe|+^4SheSJ>iYhL!7cM`$2up~&eZPHC!TkEJ%`V| z{qq;#f%ev?bDeV+$iR;+9aEpi=UUg@^`@=g_P&4b@uTl9-?UFXbHjn}E-udev0>6( zygd8jv*+72{ii*juR8K|{MFpA)3Tj={oCHm%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BfcJydp5__pzhhQ^U%*@cl-*)(-9~$@|_miU*%C05f&2494=UZMI?mhClp5k zcq~e2l;D6dT`P$RO=8X>*YkAB5O^ZufD%Gn#wmas3D?Dm;FK_*LmYA;s0c#=#Pc1G z1OjNpbZiVPCP9)A$7Nyt|06iGJ6R%;c@jOlC#BZ5-1gIVfC8;&r5x$1nds`@6K&-M RS4AnbPaLaKS>J72zX9t7LYDvl literal 0 HcmV?d00001 diff --git a/itext/itext.kernel/itext/kernel/pdf/tagging/PdfStructTreeRoot.cs b/itext/itext.kernel/itext/kernel/pdf/tagging/PdfStructTreeRoot.cs index 7a6d371016..7e95ffa915 100644 --- a/itext/itext.kernel/itext/kernel/pdf/tagging/PdfStructTreeRoot.cs +++ b/itext/itext.kernel/itext/kernel/pdf/tagging/PdfStructTreeRoot.cs @@ -369,18 +369,6 @@ public virtual PdfMcr FindMcrByMcid(PdfDictionary pageDict, int mcid) { return GetParentTreeHandler().FindMcrByMcid(pageDict, mcid); } - public virtual PdfMcr FindMcrByMcid(PdfDocument document, int mcid) { - int amountOfPages = document.GetNumberOfPages(); - for (int i = 1; i <= amountOfPages; ++i) { - PdfPage page = document.GetPage(i); - PdfMcr mcr = FindMcrByMcid(page.GetPdfObject(), mcid); - if (mcr != null) { - return mcr; - } - } - return null; - } - public virtual PdfObjRef FindObjRefByStructParentIndex(PdfDictionary pageDict, int structParentIndex) { return GetParentTreeHandler().FindObjRefByStructParentIndex(pageDict, structParentIndex); } diff --git a/itext/itext.kernel/itext/kernel/pdf/tagutils/RootTagNormalizer.cs b/itext/itext.kernel/itext/kernel/pdf/tagutils/RootTagNormalizer.cs index b3deb89bd6..ec08ccc492 100644 --- a/itext/itext.kernel/itext/kernel/pdf/tagutils/RootTagNormalizer.cs +++ b/itext/itext.kernel/itext/kernel/pdf/tagutils/RootTagNormalizer.cs @@ -113,8 +113,10 @@ private void AddStructTreeRootKidsToTheRootTag(IList rootKids) { } // This boolean is used to "flatten" possible deep "stacking" of the tag structure in case of the multiple pages copying operations. // This could happen due to the wrapping of all the kids in the createNewRootTag or ensureExistingRootTagIsDocument methods. - // And therefore, we don't need here to resolve mappings, because we exactly know which role we set. - bool kidIsDocument = PdfName.Document.Equals(kid.GetRole()); + IRoleMappingResolver mapping = kid.GetRole() == null ? null : context.ResolveMappingToStandardOrDomainSpecificRole + (kid.GetRole().GetValue(), rootTagElement.GetNamespace()); + bool kidIsDocument = mapping != null && mapping.CurrentRoleIsStandard() && StandardRoles.DOCUMENT.Equals(mapping + .GetRole()); if (kidIsDocument && kid.GetNamespace() != null && context.TargetTagStructureVersionIs2()) { // we flatten only tags of document role in standard structure namespace String kidNamespaceName = kid.GetNamespace().GetNamespaceName(); diff --git a/itext/itext.layout/itext/layout/renderer/GridItemRenderer.cs b/itext/itext.layout/itext/layout/renderer/GridItemRenderer.cs index a85d8aec8c..15ec494643 100644 --- a/itext/itext.layout/itext/layout/renderer/GridItemRenderer.cs +++ b/itext/itext.layout/itext/layout/renderer/GridItemRenderer.cs @@ -160,7 +160,9 @@ internal virtual float CalculateHeight(float initialHeight) { rectangle.DecreaseHeight(paddingBottom.GetValue()); } Border borderBottom = renderer.GetBorders()[AbstractRenderer.BOTTOM_SIDE]; - rectangle.DecreaseHeight(borderBottom.GetWidth()); + if (borderBottom != null) { + rectangle.DecreaseHeight(borderBottom.GetWidth()); + } } else { renderer.ApplyMarginsBordersPaddings(rectangle, false); diff --git a/itext/itext.pdfua/itext/pdfua/checkers/PdfUA1Checker.cs b/itext/itext.pdfua/itext/pdfua/checkers/PdfUA1Checker.cs index f4973b2596..0b9aeec0df 100644 --- a/itext/itext.pdfua/itext/pdfua/checkers/PdfUA1Checker.cs +++ b/itext/itext.pdfua/itext/pdfua/checkers/PdfUA1Checker.cs @@ -255,8 +255,7 @@ private bool IsRealContent(Tuple2 tag) { if (properties == null || !properties.ContainsKey(PdfName.MCID)) { return false; } - PdfMcr mcr = this.pdfDocument.GetStructTreeRoot().FindMcrByMcid(pdfDocument, (int)properties.GetAsInt(PdfName - .MCID)); + PdfMcr mcr = McrExists(pdfDocument, (int)properties.GetAsInt(PdfName.MCID)); if (mcr == null) { throw new PdfUAConformanceException(PdfUAExceptionMessageConstants.CONTENT_WITH_MCID_BUT_MCID_NOT_FOUND_IN_STRUCT_TREE_ROOT ); @@ -264,6 +263,18 @@ private bool IsRealContent(Tuple2 tag) { return true; } + private PdfMcr McrExists(PdfDocument document, int mcid) { + int amountOfPages = document.GetNumberOfPages(); + for (int i = 1; i <= amountOfPages; ++i) { + PdfPage page = document.GetPage(i); + PdfMcr mcr = document.GetStructTreeRoot().FindMcrByMcid(page.GetPdfObject(), mcid); + if (mcr != null) { + return mcr; + } + } + return null; + } + private void CheckCatalog(PdfCatalog catalog) { PdfDictionary catalogDict = catalog.GetPdfObject(); if (!catalogDict.ContainsKey(PdfName.Metadata)) { diff --git a/port-hash b/port-hash index fb6a48d90b..0e7b1735f1 100644 --- a/port-hash +++ b/port-hash @@ -1 +1 @@ -280e61ecff65c45495a10a43f25b8c66bd34149e +b8f684a0dd103255900f1cf090e811e8c2444b11