great-tables icon indicating copy to clipboard operation
great-tables copied to clipboard

save("file.pdf") generates JPEG image in PDF container

Open apparebit opened this issue 5 months ago • 0 comments

Prework

Description

When generating a PDF document with GT, I end up with a PDF container wrapping a pixel-based JPEG image and not a vector-based PDF. That effectively defeats the purpose of using PDF. Furthermore, at 1:1 pixel sizing, the image compression is strong enough to produce visible artifacts that make text look slightly soft and blurry. Just to be sure, I inspected the generated PDF file with a PDF debugger.

Reproducible example

from great_tables import GT
from great_tables.data import exibble
GT(exibble).save("exibble.pdf")
  • [x] Post a minimal reproducible example (MRE) so the maintainer can troubleshoot the problems you identify. A reproducible example is:
    • [x] Runnable: post enough code and data so any onlooker can create the error on their own computer.
    • [x] Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • [x] Readable: format your code according to the Style Guide for Python Code.

Expected result

I expect a PDF document of a textual table to contain vector-outlines not pixels.

Development environment

  • Operating System: macOS
  • great_tables Version: 0.18.0

apparebit avatar Jul 24 '25 18:07 apparebit