Hi,
we created a table using cell merge and generated the pdf using aspose.words java.
We are having table regularity issue while running it through accessibility checker. But if we create a table with cell merge using MS word and generate the pdf using Adobe acrobat pro plugin and run through accessibility checker, it passed the table regularity check. Can you please let us know if there anything we need to do extra during cell merge to pass the table regularity check or it is Aspose.words issue? I have attached sample code used, output and expected output.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Table table = builder.startTable();
ParagraphFormat paragraphFormat = builder.getParagraphFormat();
paragraphFormat.setAlignment(ParagraphAlignment.LEFT);
builder.insertCell();
builder.getCellFormat().setHorizontalMerge(CellMerge.FIRST);
builder.write("ANALGESICS");
builder.insertCell();
builder.getCellFormat().setHorizontalMerge(CellMerge.PREVIOUS);
builder.insertCell();
builder.getCellFormat().setHorizontalMerge(CellMerge.PREVIOUS);
builder.endRow();
builder.insertCell();
builder.getCellFormat().setHorizontalMerge(CellMerge.NONE);
builder.write("methadone hydrochloride i");
builder.insertCell();
builder.write("2");
builder.insertCell();
builder.write("QL (120 mL / 30 days), NM; TEST NOTE1");
builder.endRow();
table.setAllowAutoFit(false);
builder.endTable();
com.aspose.words.PdfSaveOptions options = new com.aspose.words.PdfSaveOptions();
options.setExportDocumentStructure(true);
doc.updateFields();
doc.save("test.pdf", options);
CellMerge.zip (129.6 KB)