This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna! | |
| ([一-龯]) | |
| Regex for matching Hirgana or Katakana | |
| ([ぁ-んァ-ン]) | |
| Regex for matching Non-Hirgana or Non-Katakana | |
| ([^ぁ-んァ-ン]) | |
| Regex for matching Hirgana or Katakana or basic punctuation (、。’) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using System.Linq; | |
| using Hunspell; | |
| namespace ConsoleApplication5 | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Use MuPDF's JavaScript API to copy the "table of contents" / document outline from one pdf file to another | |
| * The script also copies styling information (italics / bold / color), by accessing this information via | |
| * mupdf's PDFObject-API. It is mainly intended as a proof of concept for this type of operation. | |
| * This is useful if you have to versions of the same pdf and want to copy the outline from one version to another | |
| * Warning: the script performs no checks whether the outlined targets exist or make sense in the new document. | |
| * Warning: this script removes existing outlines from the target document and overwrites it in place. | |
| * Always keep a copy of the target document in case something goes horribly wrong. | |
| * v.1 - 13.03.2025 | |
| * run as follows: node copytoc.mjs source.pdf target.pdf |