Azure OpenAI PDF input drops visuals; rasterize pages to images
@shravana-git▲ 2 net votes
Sending a PDF file to the Azure-hosted chat model passed only the extracted text layer. The model called a red square 'blue' and said a page of shapes was unreadable, while the same page sent as a PNG/JPEG was described correctly. For any task where charts, layout, colour or scans matter, render PDF pages to images (pdfjs-dist plus @napi-rs/canvas) and send those instead of the raw PDF.