coherentgraphics / cpdf-binaries

PDF Command Line Tools binaries for Linux, Mac, Windows
GNU Affero General Public License v3.0
593 stars 42 forks source link

-split-bookmarks with non-ASCII bookmarks yields error #74

Closed ooker777 closed 1 year ago

ooker777 commented 1 year ago

I use this with Vietnamese:

cpdf -split-bookmarks 0 '.\file scan.pdf' -raw -o `@B.pdf

Result:

B�o c�o t�i ch�nh.pdf
file scan.pdf
��Bi�n nh�n   Nguy�n Th� Minh Trang.pdf
��Bi�n nh�n   Nguy�n Th� Trinh.pdf
��B�ng k� chi ti�n h� tr�.pdf
��Danh s�ch tham d�.pdf
��Ho� �n b�n l�.pdf
��H�p �ng   L� Minh Nh�t.pdf
��H�p �ng   Nguy�n Th� Minh Trang.pdf
��H�p �ng   Nguy�n Th� Trinh.pdf
��H�p �ng   Ph�m Nguy�n ng Tuy�n.pdf
johnwhitington commented 1 year ago

In current versions of cpdf, -raw is not obeyed by -split-bookmarks.

Unicode filenames for @ B are fixed in the development version of cpdf. From the Changes file:

o Allow -utf8 with -split-bookmarks -o @B.pdf to produce UTF8 filenames

If you're a commercial customer, I can send you a preview executable. If not, I'm afraid you'll have to build cpdf yourself, or wait for the v2.6 release.