Clarification on Page Orientation Support in Moqui Print Services

Dear Moqui Community,

I am currently using the Moqui framework’s print services, specifically the org.moqui.impl.PrintServices.print#Document service, to generate print copies of PDF documents. The service is working well for generating soft copies, and the documents appear correctly on the system. However, when I try to print them, the page content seems to be cut off, and it does not respect the correct orientation (e.g., Landscape or Portrait).

From my understanding, the print service does not provide an explicit orientation setting. Could someone confirm whether Moqui’s print services or the underlying CUPS integration support orientation settings for document printing (such as Landscape or Portrait)? If so, could you provide an example of how to specify or configure the page orientation in Moqui for proper printing?

Additionally, if this is something that needs to be handled outside of Moqui’s built-in print service (perhaps through CUPS or a custom print service), I would appreciate guidance on how to implement it effectively.

Thank you for your assistance!

Best regards,
Mathan

Did you end up figuring this out or do you still need help?

1 Like

Hi Michael :slight_smile:

Thanks for checking in! I was able to resolve the issue. While Moqui’s print#Document service doesn’t directly support orientation settings, I handled it by customizing the print logic.

I added code to set the page orientation using something like
pjb.portrait(false) for landscape.

1 Like

Great! I’m glad you figured it out

1 Like

It might be useful to customize the service to take as an input parameter document specs like size and orientation.

2 Likes