Download source code

"PDFDesigner" is PDF editing class library of JavaScript. Function is PDF Editing (Combine, Split, Extraction, Remove, Rotation, Add Bookmark, Property & Display settings).

Because there is such as analysis class, you can add functionality.


Please read the "Open Source license" before downloading.


Normal version is the source code with comments. Compressed version is exactly the same as normal version and functionality. Shortening variable name and deleted the comment & space.

Accompanying files

"pdf-designer-inc-jp.js"(Japanese) and "pdf-designer-inc-en.js"(English) file is defines the error. You do not need to read these files at the time of release. Instead wrap in the "try .. finally" or "try .. catch".

How to use

How to use pdf-designer.js

Supported file

Files that have been created at such as "Microsoft Office, OpenOffice and Chrome". Format is a file that conforms to the PDF1.4 format (such as ISO 19005-1). PDF1.5 later file can not be basically correspondence. but, can read if Internally PDF1.4 format.


13 years ago of the code was transplanted. and first library in JavaScript. Logic is spaghetti :-)

compatibility with the browser

Chrome > IE11 > FireFox

Of January 2016 currently FireFox is because it has not been optimized for the CPU, it is a little slow. Also, other than the above browser does not confirm.

Conversion rate

Actually, it's faster than Windows application that was created in 2003.

JavaScript engine of the browser is good, and The compiled EXE file in "Delphi 5"(1999) is think from the "have not been optimized for recent CPU".

Class name

The top of the class name comes with a "T". This is the rule of Delphi.


Class that can not be ported from Delphi is "TPDFFontDecoder" "TPDFStreamDecoder" "TPDFTextDecoder". file size is about total 100k.

These are not implemented because it is required FlateDecode.

Known vulnerabilities?

Previously "while" syntax was faster than "for" syntax. So are using the "while". "too non-standard" PDF files may result in an endless loop.

But, Modern browsers to stop automatically when becomes an endless loop.



Various conversion class

Various conversion class is divided into three groups. Group A is "TPDFCombine、TPDFKnife、TPDFDeletePage", Group B is "TPDFRotatePage", Group C is "TPDFInfoMaker、TPDFOutLineMaker".

There was some intention, but I do not remember anymore.

try .. finally,try .. catch


At the end

Sorry, no warranty, no support. I think do not the version up.