unidoc / unipdf

Golang PDF library for creating and processing PDF files (pure go)
https://unidoc.io
Other
2.59k stars 253 forks source link

[BUG] Large file size with created report with Japanese text #321

Closed gunnsth closed 4 years ago

gunnsth commented 4 years ago

Description

A problem was reported via email.

NewCompositePdfFontFromTTFFile worked well. But, in this way file size becomes very large (about 4MB). I assume this cause embedding font data. => I attached sample file. Is there any way without embedding font ? (e.g. Adding text(japanese) by Acrotbat DC is needless to embed font. And file size is small.)

Expected Behavior

Expected file size to be small for simple report with text.

Actual Behavior

Report size was 4MB with full font file embedded.

Attachments

Files were provided to reproduce the case.

gunnsth commented 4 years ago

Related #17 . Addressed by #335