While we make a pdf using an image file at that we add an image into
PDFPage. at that time PDFDocument did not show the original image
content in PDFView in iOS 16. I checked the same code which worked
properly in iOS 15. For both test cases, I used New Xcode 14,
and as well as previously uploaded TestFlight build also worked properly
with iOS 15 or below but did not work with iOS 16. So I
request to the apple developer who worked on PDFkit please check this
case. I may be sure that there is an issue with iOS 16 and I hope apple
provides a new iOS 16 sub-version release as soon as possible with
includes this bug fix. here is the sample code that I used:-
//Get Array of UIImages
let pdfDocument = PDFDocument()
for (index,image) in images.enumerated() {
// Create a PDF page instance from your image
let pdfPage = PDFPage(image: image)
// Insert the PDF page into your document
pdfDocument.insert(pdfPage!, at: index)
}
Original Image:
After convert to PDF