Generate a pdf from a mail where inline images are larger than A4 page using Java

Hi, I’m trying pdf file larger than A4, like A3. Reason is that I want to generate a pdf from a mail where inline image are larger than the page A4.

Is it possible ?

For A4, I’m doing so :

	int dpi = 72;
	pdfSaveOptions.setDpi(dpi);
	pdfSaveOptions.setHeight(842 * dpi / 72);
	pdfSaveOptions.setWidth(595 * dpi / 72);

For A3, I’m doing so :

	int dpi = 72;
	pdfSaveOptions.setDpi(dpi);
	pdfSaveOptions.setHeight(2 * 595 * dpi / 72);
	pdfSaveOptions.setWidth(842 * dpi / 72);

But it doesn’t work, the page is indeed A3, but the conversion just enlarge the whole content, so that the inlinge images are still cut.

Best regards,
Eric

@enrico44,

In order to investigate this issue at our end, we need following details:

  • API version
  • Problematic files along-with their output

18.12

In fact, my question is more is there a way to set the oritentation to landscape , so that image are larger

1 Like

@enrico44,

Currently, there is no such feature in the API. But we are investigating the possibility of adding page orientation option in the API. Your investigation ticket ID is CONVERSIONJAVA-596. As we have any further update, we’ll notify you.

@enrico44,

You can just swap width and height:

pdfSaveOptions.setWidth(2 * 595 * dpi / 72);
pdfSaveOptions.setHeight(842 * dpi / 72);