How to create A4 PDF in Shortcuts?

I am trying to create a letter in shortcuts.
I use html/css for layout, then the actions “make rich text from…” and “make pdf from…”.
While the generated pdf looks nice, it gets shrunk to fit on an A4 paper. This makes layouting very indirect :confused:

Is there a way to create A4 pdfs in shortcuts?

I am not sure if using media/page CSS settings in your HTML might then transfer through to the PDF generator as it isn’t exactly printing or a screen. I seem to recall havi g mixed results in the past, but I expect the action has improved since I was last experimenting with that sort of thing. But it would certainly be worth checking.

Another option is overlaying. Many have done this with images before where you start with a transparent A4 image and then overlay content on that. But, this tends to be an approach for images rather than rich text.

Yet another option would be to use an external service and have it generate the PDF via an API. Such service API inevitably have much more control than the simple UI of the Shortcuts Make PDF from action.

If you are intending to use the shortcut on Mac only, that opens up a range of local tools you could integrate instead of farming out the work to a web service.

Hope that helps.

Thank you, I will check “media/page CSS settings”. I’m new to CSS.
And if that fails, I will try again with reportlab in pythonista.

If I were on a Mac, would just use Latex and probably not shortcuts at all.