BytescoutPDF.js documentation:

What is BytescoutPDF.js? This script made with pure javascript code allows you to generate PDF documents with text, images, and drawings.
No server-side code is required

SAMPLE CODE (see /Examples/ folder for more samples):

ONLINE DEMO SAMPLES (the copy from /Examples/ in the downloadable script)

  1. Add image from canvas
  2. Add image from URL
  3. Using alpha channel for graphics
  4. Drawing symbols in PDF
  5. Drawing PDF invoice with table and logo
  6. Drawing lines in PDF
  7. Drawing rectangles in PDF
  8. Writing text with German umlauts symbols
  9. Setting the header and the footer for pages in PDF
  10. Using HTML formatting for text in PDF
  11. Rotating images in PDF
  12. Adding outlines with bookmarks to pages and http links in PDF
  13. Setting page orientation in PDF
  14. Setting page size in PDF
  15. Set PDF document properties (title, keywords, author etc)
  16. Setting font name for text in PDF
  17. Setting font style for text in PDF
  18. Setting align for text in PDF
  19. Drawing text as columns in PDF
  20. Drawing images, lines with different colors, text with formatting
  21. Using rich text formatting for PDF
  22. Rotating text in PDF
  23. Wrapping text in PDF
Please make sure you are viewing BytescoutPDF.js samples through a local server, not just by opening the html file from folder
To run a local server:
- if you don't know how to run local server then download free Mangoose server for Windows from
- copy mongoose.exe into the sample folder and run it by double-clicking. This will make this folder available as http://localhost:8080/
- then open http://localhost:8080/ in the browser and browse samples

Main class: BytescoutPDF

BytescoutPDF class methods and properties:



Font and style:

Text output (single line)

Text output (multiline)


Lines and graphics: