# ChatGPT bug with scanned pdfs that use /Rotate flag (all gpt version)

**URL:** <https://community.openai.com/t/chatgpt-bug-with-scanned-pdfs-that-use-rotate-flag-all-gpt-version/1378921>\
**Category:** Bugs\
**Tags:** chatgpt\
**Created:** [April 13, 2026, 8:42pm UTC](https://community.openai.com/t/chatgpt-bug-with-scanned-pdfs-that-use-rotate-flag-all-gpt-version/1378921 "2026-04-13T20:42:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sirk390](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@sirk390](https://community.openai.com/u/sirk390)\
**Post date:** [April 13, 2026, 8:42pm UTC](https://community.openai.com/t/chatgpt-bug-with-scanned-pdfs-that-use-rotate-flag-all-gpt-version/1378921/1 "2026-04-13T20:42:10Z")

</div>

Hi All,

A few days ago, I found this bug with scanned pdfs that use /Rotate flag. think it’s a fairly serious bug. Did any of you encounter this? How to report it such that it is fixed (I did so on the website but no response)?

Basically: OpenAI’s PDF pipeline ignores the `/Rotate` entry defined in the PDF spec. Scanners typically store the raw bitmap in the sensor’s native orientation (e.g. landscape) and add a `/Rotate` flag so viewers display it correctly as portrait — without re-encoding the image.

The PDF-to-image rasterizer then only exposes a square crop of one side of the raw bitmap to the vision model. The result: part of the page is simply never seen — the model either fails to read the content or hallucinates.

The bug reproduces 100% of and affects GPT-4.1, 5.3, and 5.4 — on both the API and the website (when thinking is disabled).

Gemini handles it correctly. Reported to OpenAI on April 10, 2026, still unfixed.

code:

from PIL import Image, ImageDraw, ImageFont  
import pypdf  
import random  
import io

PAGE\_W = 1240  
PAGE\_H = 1754

NO\_ROTATE\_PDF = “OK.pdf”  
WITH\_ROTATE\_PDF = “NOK.pdf”

def make\_page(number: str) → Image.Image:  
img = Image.new(“RGB”, (PAGE\_W, PAGE\_H), “white”)  
draw = ImageDraw.Draw(img)

```
font = ImageFont.load_default(100)
text = f"Number: {number}"
bbox = draw.textbbox((0, 0), text, font=font)
text_width = bbox\[2\] - bbox\[0\]
x = (PAGE_W - text_width) / 2
y = 100 - bbox\[1\]
draw.text((x, y), text, fill="black", font=font)
return img

```

def save\_pdf(image: Image.Image, path: str, rotate: int) → None:  
buf = io.BytesIO()  
image.save(buf, format=“PDF”, resolution=200.0)  
buf.seek(0)

```
reader = pypdf.PdfReader(buf)
writer = pypdf.PdfWriter()
page = reader.pages\[0\]
if rotate:
    # page.rotate() only updates the /Rotate entry in the page
    page.rotate(rotate)
writer.add_page(page)

with open(path, "wb") as f:
    writer.write(f)

```

def generate\_pdfs(number: str) → None:  
upright = make\_page(number)  
# PDF A: bitmap stored upright (1240 x 1754), no /Rotate flag.  
save\_pdf(upright, NO\_ROTATE\_PDF, rotate=0)  
# PDF B: bitmap stored rotated 90 degrees clockwise. /Rotate 270 to rotate the page  
sideways = upright.rotate(-90, expand=True)  
save\_pdf(sideways, WITH\_ROTATE\_PDF, rotate=270)

number = f"{random.randint(100000, 999999)}"  
generate\_pdfs(number)

---

<div class="post-metadata">

**Author:** ![OpenAI\_Support](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/openai_support/32/561845_2.png) [@OpenAI\_Support](https://community.openai.com/u/OpenAI_Support)\
**Post date:** [April 15, 2026, 10:11pm UTC](https://community.openai.com/t/chatgpt-bug-with-scanned-pdfs-that-use-rotate-flag-all-gpt-version/1378921/3 "2026-04-15T22:11:21Z")

</div>

Hey @sirk390, yeah, I can see why that’d be confusing especially with scanned PDFs where rotation actually matters for readability.

This looks like the /Rotate flag from the PDF spec isn’t being picked up properly right now, so pages that rely on it end up rendered incorrectly. You’re not the only one seeing this, it’s been raised and seems reproducible on similar files.

Good news is it’s already on the engineering team’s radar and they’re actively digging into it. No fix to share just yet, but this one’s being tracked.

In the meantime, a couple folks have had luck flattening the rotation (basically re-saving the PDF with the rotation applied instead of flagged) as a temporary workaround.

Will keep an eye on this thread and share updates when there’s movement.

-Mark G.

---

<div class="post-metadata">

**Author:** ![Mark\_G](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@Mark\_G](https://community.openai.com/u/Mark_G)\
**Post date:** [May 15, 2026, 8:01pm UTC](https://community.openai.com/t/chatgpt-bug-with-scanned-pdfs-that-use-rotate-flag-all-gpt-version/1378921/4 "2026-05-15T20:01:14Z")

</div>


