We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Retain Corners of Thick Table Borders during Converting Word Document DOCX to PDF using Java

Hi,

I’m trying to save a document with a table in pdf and word formats, where table has different border widths (by setting lineWidth for all table cell borders). Problem is, that when it is saved as pdf, corners of the thicker borders are “cut”. On the other hand, when exported to word (or html) - corners are not cut.

I was also able to reproduce the same issue by simply loading a word file with LoadAndSaveToDisk class from Aspose.Words Examples (https://github.com/aspose-words/Aspose.Words-for-Java). Word and HTML outputs do not have cut borders, while PDF output has cut borders at the bottom.

public class LoadAndSaveToDisk {
public static void main(String[] args) throws Exception {

    String dataDir = Utils.getDataDir(LoadAndSaveToDisk.class);

    Document doc = new Document(dataDir + "table_with_custom_border_widths.docx");

    doc.save(dataDir + "Pdf Document Out.pdf");
    doc.save(dataDir + "Word Document Out.docx");
    doc.save(dataDir + "Html Document Out.html");
}
}

table_with_custom_border_widths.zip (56.1 KB)

@mluk909,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-19829. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.