Data Merge randomly exports identical vector document 10x larger (Content Streams duplicated)
I believe I have found a reproducible bug in the InDesign PDF export engine.
Environment
InDesign 21.4.1
PDF Compatibility: Acrobat 5 (PDF 1.4)
Data Merge document
Approximately 200 records (400 pages)
Expected behaviour
Exporting the same document repeatedly should always generate a PDF of approximately the same size.
Actual behaviour
The same document, exported multiple times using exactly the same PDF preset, randomly produces either:
a normal PDF (around 3–5 MB), or
a much larger PDF (30–50 MB).
No document changes are made between exports.
Important observations
Both PDFs are fully vector.
No images are rasterized.
Acrobat PDF Optimizer reports that almost all additional size comes from Content Streams.
Fonts contribute almost nothing.
Images contribute almost nothing.
Metadata is negligible.
Already tested
Linked Illustrator artwork replaced with linked PDF.
Artwork simplified.
No transparency.
No text stroke.
No appearance effects.
Saved as IDML and rebuilt.
New document created from IDML.
Same Data Merge source.
Same PDF preset.
The behaviour remains random.
Additional information
I have other Data Merge jobs with 1000 records that consistently export to 3–5 MB.
This specific job, with only 200 records, randomly exports between 5 MB and 47 MB.
I can provide:
INDD
IDML
source artwork
good PDF
bad PDF
generated from the same document.