Skip to content

Commit ec82fb5

Browse files
kevinwillems1993pavel-alay
authored andcommitted
Add test for DEVSIX-2033
Autoported commit. Original commit hash: [db0fb68a0]
1 parent 49c595d commit ec82fb5

File tree

5 files changed

+30
-2
lines changed

5 files changed

+30
-2
lines changed

itext.tests/itext.kernel.tests/itext/kernel/utils/PdfMergerTest.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,5 +215,33 @@ public virtual void MergeDocumentTest04() {
215215
NUnit.Framework.Assert.Fail(errorMessage);
216216
}
217217
}
218+
219+
/// <exception cref="System.IO.IOException"/>
220+
/// <exception cref="System.Exception"/>
221+
/// <exception cref="Javax.Xml.Parsers.ParserConfigurationException"/>
222+
/// <exception cref="Org.Xml.Sax.SAXException"/>
223+
[NUnit.Framework.Test]
224+
public virtual void MergeTableWithEmptyTdTest() {
225+
String filename = sourceFolder + "tableWithEmptyTd.pdf";
226+
String resultFile = destinationFolder + "tableWithEmptyTdResult.pdf";
227+
PdfReader reader = new PdfReader(filename);
228+
PdfDocument sourceDoc = new PdfDocument(reader);
229+
PdfDocument output = new PdfDocument(new PdfWriter(resultFile));
230+
output.SetTagged();
231+
PdfMerger merger = new PdfMerger(output).SetCloseSourceDocuments(true);
232+
merger.Merge(sourceDoc, 1, sourceDoc.GetNumberOfPages());
233+
sourceDoc.Close();
234+
reader.Close();
235+
merger.Close();
236+
output.Close();
237+
CompareTool compareTool = new CompareTool();
238+
String errorMessage = "";
239+
String tagStructErrorMessage = compareTool.CompareTagStructures(resultFile, sourceFolder + "cmp_tableWithEmptyTd.pdf"
240+
);
241+
errorMessage += tagStructErrorMessage == null ? "" : tagStructErrorMessage + "\n";
242+
if (!String.IsNullOrEmpty(errorMessage)) {
243+
NUnit.Framework.Assert.Fail(errorMessage);
244+
}
245+
}
218246
}
219247
}

itext/itext.io/itext/io/font/PdfEncodings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public class PdfEncodings {
6969
public const String WINANSI = "Windows-1252";
7070

7171
/// <summary>A possible encoding.</summary>
72-
public const String MACROMAN = "x-mac-romanian";
72+
public const String MACROMAN = "MacRoman";
7373

7474
/// <summary>A possible encoding.</summary>
7575
public const String SYMBOL = "Symbol";

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1d17ae9c1ee4089010ec2209154296ebe8f53eac
1+
db0fb68a039469dbe8f13366ce362b74e639d6c6

0 commit comments

Comments
 (0)