Expo print - landscape orientation on IOS

Viewed 79

I'm developing a React Native app with Expo, and I use expo print to make a PDF file from a HTML document. One of the PDFs that I make, needs to have the landscape orientation, so on Android I use @page { size: landscape } and it works fine, but on IOS, it doesn't. The same thing happens with margins, but it worked on IOS too with this:

const { uri } = await Print.printToFileAsync({ 
                html,
                margins: {
                    left: 20,
                    top: 20,
                    right: 20,
                    bottom: 20
                },
            });

So I was trying to find if there was a similar option for orientation, and there is, but that option is just for Print.printAsync and not for Print.printToFileAsync, that I use because it returns the URI of the created file, which the other one doesn't do. So is there anything that I can do to make it landscape and get the URI of the document?

0 Answers
Related