Dim pdf_in As FolderItem
Dim pdf_page As Picture
pdf_in = SpecialFolder.Desktop.Child(“book.pdf”)
pdf_page = pdf_in.OpenAsVectorPicture
The above code executes perfectly in the Mac version and displays the first page of the pdf file.
But in Windows the above code throws a nil object for pdf_page
Am I missing out on somethins ?
To open a PDF, open it as Picture, not Vector.
As far as I am aware, the ‘OpenAs’ methods simply tap into what is provided by the operating system.
Since the Mac operating system has support for PDF built-in, your Mac Xojo app also gets it. I don’t think MS-Windows has support for PDF built-in so it is probably the reason why it fails.
You might need to use a 3rd party plugin such as the MBS DynaPDF plugin