pdftk supports Chinese path now

Pdftk is a simple command line tool for doing everyday things with PDF documents. Use it to merge PDF documents, split PDF pages into a new document, decrypt input as necessary (password required), encrypt output as desired, fill PDF forms with FDF data and/or flatten forms, apply a background watermark, report on PDF metrics, update PDF metadata, attach files to PDF pages or the PDF document, unpack PDF attachments, burst a PDF document into single pages, decompress and re-compress page streams, and repair corrupted PDF files (where possible).

If PDF is electronic paper, then pdftk is an electronic staple-remover, hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a simple tool for doing everyday things with PDF documents. Keep one in the top drawer of your desktop and use it to:

  • Merge PDF Documents

  • Split PDF Pages into a New Document

  • Rotate PDF Pages or Documents

  • Decrypt Input as Necessary (Password Required)

  • Encrypt Output as Desired

  • Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms

  • Apply a Background Watermark or a Foreground Stamp

  • Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels

  • Update PDF Metadata

  • Attach Files to PDF Pages or the PDF Document

  • Unpack PDF Attachments

  • Burst a PDF Document into Single Pages

  • Uncompress and Re-Compress Page Streams

  • Repair Corrupted PDF (Where Possible)

Pdftk allows you to manipulate PDF easily and freely. It does not require Acrobat, and it runs on Windows, Linux, Mac OS X, FreeBSD and Solaris.

Pdftk is very powerful as described as above, but Pdftk does not support multi-byte path, such as Chinese, Japanese, Korean and so on, it is a problem,
so I decided to do some job and now it supports multi-byte path. you can download the modification source code of pdftk.cc and Windows program.
precompiled version(windows 32) and source code(only pdftk.cc)

Related resource:

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

5 Responses to “pdftk supports Chinese path now

  • 1
    spierrard
    August 15th, 2007 00:13

    I was desperately looking for a solution to used pdftk with utf8 text when I saw your blog. What a relief it was. I’m using ubuntu and I tried to compile your fixed pdftk.gcc. I use the Debian make file and the compilation before the multibyte fix works. But with the multibyte fix, I have this error:
    g++-4.1 pdftk.cc -I../java_libs -O3 -DPATH_DELIM=0×2f -DASK_ABOUT_WARNINGS=false -fdollars-in-identifiers -DPDFTK_VER=\”1.41\” -c
    pdftk.cc:3314:2: warning: no newline at end of file
    pdftk.cc:2677: error: expected initializer before ‘Convert’
    make: *** [pdftk.o] Error 1
    Would you know, by any chance, what creates the error?

  • 2
    rubypdf
    August 15th, 2007 09:30

    sorry, I forgot removing the test method “int __stdcall Convert(int argc,char** argv)”, feel free to remove it.

  • 3
    spierrard
    August 16th, 2007 19:39

    Thanks a lot. It compiles perfectly. Time to test the UTF8…

  • 4
    spierrard
    September 3rd, 2007 14:37

    I tried the UTF8, but it doesn’t seem to work. I’m sure it’s something I haven’t done properly: can you send me some example I could try on my own?

  • 5
    rubypdf
    September 4th, 2007 14:27

    I am a newbie in C/C++, but I will test it if I have time.

Leave a Reply

You must be logged in to post a comment.