Thanks for your inquiry. Please check the second code example ‘Converts large size image into a PDF document’ from the following documentation link.
Hope this helps you. I have attached the
output document with this post for your kind reference. Please let us
know if you have any more queries.