Open mon-jai opened 1 month ago
Hello @mon-jai Thank you for contacting us! This issue has already been discussed in the post #2739
@TatianaKirillova @Rita-Bubnova It doesn't seem like a duplication.
In my demo document, there are no form fields—just two lines of text. Yet, the entire font is included.
@mon-jai Yes, but you can always add them - at any time. Therefore, we are forced to save the font. If you do not plan to add form fields, then you can simply save docx->pdf
@TatianaKirillova
Yes, but you can always add them - at any time.
I found a PDF without form fields to be more like a non-editable format. In most cases, no one will attempt to edit it.
If you do not plan to add form fields, then you can simply save docx->pdf
Yeah, I just did that (either by "Save As" or "Print as PDF"), and in both cases, the resulting PDF is 13MB.
There is no known way to export a smaller PDF in OnlyOffice with only the used glyphs embedded (that's the whole point).
@mon-jai I save your document in pdf format in the ONLYOFFICE editor and it weighs 49 KB Demo.Document (1).pdf
The font used in the file is Source Han Sans TC v2.004 (https://github.com/adobe-fonts/source-han-sans/releases/download/2.004R/SourceHanSansHWTC.zip).
@TatianaKirillova Can you try again with Source Han Sans TC v2.004 installed?
This issue only occurs with third-party CJK fonts. Since you don’t have that font installed, OnlyOffice falls back to the system font, which may not be embedded in the generated PDF.
@mon-jai Yes, you're right. We try to save the file with text, not pictures (like other editors), which results in increased weight. I created a proposal # 71235 so that it would be possible to choose in which format to save the file - lighter weight or it is important that it be saved as text.
@TatianaKirillova Thank you! Could you reopen the issue?
Also, what happens if a user chooses the "lighter weight" option once it’s implemented? Will the font be subsetted?
PDFs generated by OnlyOffice are extremely large when third-party CJK fonts are used.
Please see the following demo document containing two lines of Chinese text: Demo Document.docx
The PDF generated by OnlyOffice is a massive 13MB: Demo Document.pdf
However, the same PDF is only 15.25KB when opened in LibreOffice Draw and re-exported: Demo Document - Libreoffice.pdf
The font used in the file is Source Han Sans TC v2.004 (https://github.com/adobe-fonts/source-han-sans/releases/download/2.004R/SourceHanSansHWTC.zip).