Aspose PDF (Java): Converting Document to pdf causing some table alignment issue

Hi Team,

We are generating document using aspose java and once we generated the document we are saving same document as pdf but for one scenario the column which we appended for table is showing wrongly in pdf but in word it looks fine.

We are just saving document by using ByteArrayOutputStream by using below code.

Document document  = getDocument(input); // untill here document looks good
ByteArrayOutPutStream outputStream =  new ByteArrayOutPutStream();
document.save(outputStream,SaveFormat.PDF);

Thanks,
Priyanka.

@priyanka9 Unfortunately, it is impossible to analyze the problem using screenshots. Could you please attach your input and output document along with runnable code that will allow us to reproduce the problem.

Hi @alexey.noskov ,

I created project but unfortunately getting some PDF convertion error. But you can refer the file and cnvertion logic how we are doing.

aspose_test.zip (657.2 KB)

Thanks,
Aruna.

@priyanka9 Thank you for additional information. I do not see the problem you have shown on the screenshots above in the PDF document you have attached. In your code as I can see you are simply converting DOCX document to PDF. I have tested the scenario on my side and the produced PDF document also does not have the mentioned problem. So unfortunately I cannot reproduce the problem on my side.

Ok thanks @alexey.noskov ,

We will only check from our end.

1 Like