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

Free Support Forum - aspose.com

Image created with aspose words builder is being truncated

I’m trying to create an image from a html code, as per the attached files.

If I open the html file, I see a big table (image: Screen Shot 2018-04-23 at 12.52.36 PM.png (16.8 KB)
)

But If I try to create an image from it with Aspose words, the image gets created but it’s truncated. Any hint on this? Can I get the complete image? (truncated img: Screen Shot 2018-04-23 at 12.54.03 PM.png (50.0 KB) )

Please check the code for advising. Thanks

Java Code: Archive.zip (1.4 KB)

@adolfocastellanos,

You need to adjust the PageWidth accordingly. For example the following will produce expected output:

...
doc.getFirstSection().getPageSetup().setOrientation(Orientation.LANDSCAPE);
doc.save(baos, SaveFormat.JPEG);
...

You can also make use of following two properties:

doc.getFirstSection().getPageSetup().setPageHeight(some value); and
doc.getFirstSection().getPageSetup().setPageWidth(some value);