Module: PdfParadise

Defined in:
lib/pdf_paradise/fpdf/makefont.rb,
lib/pdf_paradise/base/base.rb,
lib/pdf_paradise/base/colours.rb,
lib/pdf_paradise/set_main_book.rb,
lib/pdf_paradise/set_pdf_title.rb,
lib/pdf_paradise/merge_pdf/menu.rb,
lib/pdf_paradise/colours/colours.rb,
lib/pdf_paradise/project/project.rb,
lib/pdf_paradise/version/version.rb,
lib/pdf_paradise/www/sinatra/app.rb,
lib/pdf_paradise/commandline/help.rb,
lib/pdf_paradise/commandline/menu.rb,
lib/pdf_paradise/main_pdf/main_pdf.rb,
lib/pdf_paradise/toplevel_methods/e.rb,
lib/pdf_paradise/constants/constants.rb,
lib/pdf_paradise/convert_text_to_pdf.rb,
lib/pdf_paradise/merge_pdf/merge_pdf.rb,
lib/pdf_paradise/remove_pdf_password.rb,
lib/pdf_paradise/toplevel_methods/misc.rb,
lib/pdf_paradise/gui/fox/split_pdf_file.rb,
lib/pdf_paradise/toplevel_methods/roebe.rb,
lib/pdf_paradise/utility_scripts/to_pdf.rb,
lib/pdf_paradise/utility_scripts/to_qdf.rb,
lib/pdf_paradise/commandline/commandline.rb,
lib/pdf_paradise/toplevel_methods/esystem.rb,
lib/pdf_paradise/utility_scripts/split_pdf.rb,
lib/pdf_paradise/compress/compress_via_qpdf.rb,
lib/pdf_paradise/utility_scripts/djvu_to_pdf.rb,
lib/pdf_paradise/utility_scripts/pdf_to_html.rb,
lib/pdf_paradise/sinatra/embeddable_interface.rb,
lib/pdf_paradise/compress/compress_via_hexapdf.rb,
lib/pdf_paradise/toplevel_methods/number_pages.rb,
lib/pdf_paradise/utility_scripts/pdf_optimizer.rb,
lib/pdf_paradise/utility_scripts/remove_images.rb,
lib/pdf_paradise/gui/gtk2/pdf_viewer/pdf_viewer.rb,
lib/pdf_paradise/gui/gtk3/controller/controller.rb,
lib/pdf_paradise/gui/gtk3/pdf_viewer/pdf_viewer.rb,
lib/pdf_paradise/utility_scripts/pdf_statistics.rb,
lib/pdf_paradise/compress/compress_this_pdf_file.rb,
lib/pdf_paradise/merge_then_open/merge_then_open.rb,
lib/pdf_paradise/utility_scripts/rotate_pdf_file.rb,
lib/pdf_paradise/toplevel_methods/query_pdf_title.rb,
lib/pdf_paradise/utility_scripts/extract_pdf_page.rb,
lib/pdf_paradise/toplevel_methods/opened_pdf_files.rb,
lib/pdf_paradise/gui/universal_widgets/to_pdf/to_pdf.rb,
lib/pdf_paradise/toplevel_methods/convert_ppt_to_pdf.rb,
lib/pdf_paradise/utility_scripts/automatic_pdf_title.rb,
lib/pdf_paradise/utility_scripts/convert_pdf_to_text.rb,
lib/pdf_paradise/toplevel_methods/convert_epub_to_pdf.rb,
lib/pdf_paradise/requires/batch_require_toplevel_files.rb,
lib/pdf_paradise/gui/gtk2/split_pdf_file/split_pdf_file.rb,
lib/pdf_paradise/gui/gtk3/split_pdf_file/split_pdf_file.rb,
lib/pdf_paradise/utility_scripts/combine_these_pdf_pages.rb,
lib/pdf_paradise/toplevel_methods/convert_markdown_to_pdf.rb,
lib/pdf_paradise/gui/libui/rotate_pdf_file/rotate_pdf_file.rb,
lib/pdf_paradise/utility_scripts/check_syntax_of_pdf_files.rb,
lib/pdf_paradise/gui/gtk2/statistics_widget/statistics_widget.rb,
lib/pdf_paradise/gui/shared_code/pdf_viewer/pdf_viewer_module.rb,
lib/pdf_paradise/gui/libui/statistics_widget/statistics_widget.rb,
lib/pdf_paradise/toplevel_methods/reduce_size_of_this_pdf_file.rb,
lib/pdf_paradise/utility_scripts/delete_last_page_of_this_pdf_file.rb,
lib/pdf_paradise/utility_scripts/delete_this_page_of_this_pdf_file.rb,
lib/pdf_paradise/gui/shared_code/split_pdf_file/split_pdf_file_module.rb,
lib/pdf_paradise/utility_scripts/extract_all_images_from_this_pdf_file.rb,
lib/pdf_paradise/gui/universal_widgets/statistics_widget/statistics_widget.rb,
lib/pdf_paradise/gui/universal_widgets/convert_pdf_to_text/convert_pdf_to_text.rb,
lib/pdf_paradise/gui/libui/extract_all_images_from_this_pdf_file/extract_all_images_from_this_pdf_file.rb,
lib/pdf_paradise/gui/jruby/remove_the_first_page_of_this_pdf_file/remove_the_first_page_of_this_pdf_file.rb,
lib/pdf_paradise/gui/libui/remove_the_first_page_of_this_pdf_file/remove_the_first_page_of_this_pdf_file.rb,
lib/pdf_paradise/utility_scripts/delete_the_first_page_of_this_pdf_file/delete_the_first_page_of_this_pdf_file.rb,
lib/pdf_paradise/gui/shared_code/remove_the_first_page_of_this_pdf_file_module/remove_the_first_page_of_this_pdf_file_module.rb,
lib/pdf_paradise/gui/jruby/delete_the_first_or_the_last_page_of_this_pdf_file/delete_the_first_or_the_last_page_of_this_pdf_file.rb,
lib/pdf_paradise/gui/universal_widgets/delete_the_first_or_the_last_page_of_this_pdf_file/delete_the_first_or_the_last_page_of_this_pdf_file.rb

Overview

#

PdfParadise::GUI::RemoveTheFirstPageOfThisPdfFileModule

#

require ‘pdf_paradise/gui/shared_code/remove_the_first_page_of_this_pdf_file_module/remove_the_first_page_of_this_pdf_file_module.rb’ include PdfParadise::GUI::RemoveTheFirstPageOfThisPdfFileModule

#

Defined Under Namespace

Modules: EmbeddableInterface, FOX, GUI Classes: AutomaticPdfTitle, Base, CheckSyntaxOfPdfFiles, CombineThesePdfPages, CompressThisPdfFile, ConvertPdfToText, ConvertTextToPdf, DeleteLastPageOfThisPdfFile, DeleteTheFirstPageOfThisPdfFile, DeleteThisPageOfThisPdfFile, DjvuToPdf, ExtractAllImagesFromThisPdfFile, ExtractPdfPage, MainPdf, MergePdf, MergeThenOpen, PdfOptimizer, PdfStatistics, PdfToHtml, QueryPdfTitle, RemoveImages, RemovePdfPassword, RotatePdfFile, SetMainBook, SetPdfTitle, Sinatra, SplitPdf, ToPdf, ToQdf

Constant Summary collapse

Charencodings =
#

PdfParadise::Charencodings

#
{
# Central Europe
  'cp1250' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    'Euro',       '.notdef',    'quotesinglbase', '.notdef',
    'quotedblbase',   'ellipsis',     'dagger',     'daggerdbl',
    '.notdef',    'perthousand',  'Scaron',     'guilsinglleft',
    'Sacute',     'Tcaron',     'Zcaron',     'Zacute',
    '.notdef',    'quoteleft',    'quoteright',   'quotedblleft',
    'quotedblright',  'bullet',     'endash',     'emdash',
    '.notdef',     'trademark',    'scaron',     'guilsinglright',
    'sacute',      'tcaron',     'zcaron',     'zacute',
    'space',       'caron',      'breve',      'Lslash',
    'currency',    'Aogonek',    'brokenbar',    'section',
    'dieresis',    'copyright',    'Scedilla',     'guillemotleft',
    'logicalnot',  'hyphen',     'registered',   'Zdotaccent',
    'degree',      'plusminus',    'ogonek',     'lslash',
    'acute',       'mu',       'paragraph',    'periodcentered',
    'cedilla',     'aogonek',    'scedilla',     'guillemotright',
    'Lcaron',      'hungarumlaut',   'lcaron',     'zdotaccent',
    'Racute',      'Aacute',     'Acircumflex',  'Abreve',
    'Adieresis',   'Lacute',     'Cacute',     'Ccedilla',
    'Ccaron',      'Eacute',     'Eogonek',    'Edieresis',
    'Ecaron',      'Iacute',     'Icircumflex',  'Dcaron',
    'Dcroat',      'Nacute',     'Ncaron',     'Oacute',
    'Ocircumflex',  'Ohungarumlaut',  'Odieresis',    'multiply',
    'Rcaron',     'Uring',      'Uacute',     'Uhungarumlaut',
    'Udieresis',    'Yacute',     'Tcommaaccent',   'germandbls',
    'racute',     'aacute',     'acircumflex',  'abreve',
    'adieresis',    'lacute',     'cacute',     'ccedilla',
    'ccaron',     'eacute',     'eogonek',    'edieresis',
    'ecaron',     'iacute',     'icircumflex',  'dcaron',
    'dcroat',     'nacute',     'ncaron',     'oacute',
    'ocircumflex',  'ohungarumlaut',  'odieresis',    'divide',
    'rcaron',     'uring',      'uacute',     'uhungarumlaut',
    'udieresis',    'yacute',     'tcommaaccent',   'dotaccent'
  ],
# Cyrillic
  'cp1251' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',  'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    'afii10051',    'afii10052',    'quotesinglbase', 'afii10100',
    'quotedblbase',   'ellipsis',     'dagger',     'daggerdbl',
    'Euro',       'perthousand',  'afii10058',    'guilsinglleft',
    'afii10059',    'afii10061',    'afii10060',    'afii10145',
    'afii10099',    'quoteleft',    'quoteright',   'quotedblleft',
    'quotedblright',  'bullet',     'endash',     'emdash',
    '.notdef',    'trademark',    'afii10106',    'guilsinglright',
    'afii10107',    'afii10109',    'afii10108',    'afii10193',
    'space',      'afii10062',    'afii10110',    'afii10057',
    'currency',     'afii10050',    'brokenbar',    'section',
    'afii10023',    'copyright',    'afii10053',    'guillemotleft',
    'logicalnot',   'hyphen',     'registered',   'afii10056',
    'degree',     'plusminus',    'afii10055',    'afii10103',
    'afii10098',    'mu',           'paragraph',    'periodcentered',
    'afii10071',    'afii61352',    'afii10101',    'guillemotright',
    'afii10105',    'afii10054',    'afii10102',    'afii10104',
    'afii10017',    'afii10018',    'afii10019',    'afii10020',
    'afii10021',    'afii10022',    'afii10024',    'afii10025',
    'afii10026',    'afii10027',    'afii10028',    'afii10029',
    'afii10030',    'afii10031',    'afii10032',    'afii10033',
    'afii10034',    'afii10035',    'afii10036',    'afii10037',
    'afii10038',    'afii10039',    'afii10040',    'afii10041',
    'afii10042',    'afii10043',    'afii10044',    'afii10045',
    'afii10046',    'afii10047',    'afii10048',    'afii10049',
    'afii10065',    'afii10066',    'afii10067',    'afii10068',
    'afii10069',    'afii10070',    'afii10072',    'afii10073',
    'afii10074',    'afii10075',    'afii10076',    'afii10077',
    'afii10078',    'afii10079',    'afii10080',    'afii10081',
    'afii10082',    'afii10083',    'afii10084',    'afii10085',
    'afii10086',    'afii10087',    'afii10088',    'afii10089',
    'afii10090',    'afii10091',    'afii10092',    'afii10093',
    'afii10094',    'afii10095',    'afii10096',    'afii10097'
  ],
# Western Europe
  'cp1252' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    'Euro',       '.notdef',    'quotesinglbase', 'florin',
    'quotedblbase',   'ellipsis',     'dagger',     'daggerdbl',
    'circumflex',   'perthousand',  'Scaron',     'guilsinglleft',
    'OE',       '.notdef',    'Zcaron',     '.notdef',
    '.notdef',    'quoteleft',    'quoteright',   'quotedblleft',
    'quotedblright',  'bullet',     'endash',     'emdash',
    'tilde',      'trademark',    'scaron',     'guilsinglright',
    'oe',       '.notdef',    'zcaron',     'Ydieresis',
    'space',      'exclamdown',   'cent',       'sterling',
    'currency',     'yen',      'brokenbar',    'section',
    'dieresis',     'copyright',    'ordfeminine',  'guillemotleft',
    'logicalnot',   'hyphen',     'registered',   'macron',
    'degree',     'plusminus',    'twosuperior',  'threesuperior',
    'acute',      'mu',       'paragraph',    'periodcentered',
    'cedilla',    'onesuperior',  'ordmasculine',   'guillemotright',
    'onequarter',   'onehalf',    'threequarters',  'questiondown',
    'Agrave',     'Aacute',     'Acircumflex',  'Atilde',
    'Adieresis',    'Aring',      'AE',       'Ccedilla',
    'Egrave',     'Eacute',     'Ecircumflex',  'Edieresis',
    'Igrave',     'Iacute',     'Icircumflex',  'Idieresis',
    'Eth',      'Ntilde',     'Ograve',     'Oacute',
    'Ocircumflex',  'Otilde',     'Odieresis',    'multiply',
    'Oslash',     'Ugrave',     'Uacute',     'Ucircumflex',
    'Udieresis',    'Yacute',     'Thorn',      'germandbls',
    'agrave',     'aacute',     'acircumflex',  'atilde',
    'adieresis',    'aring',      'ae',       'ccedilla',
    'egrave',     'eacute',     'ecircumflex',  'edieresis',
    'igrave',     'iacute',     'icircumflex',  'idieresis',
    'eth',      'ntilde',     'ograve',     'oacute',
    'ocircumflex',  'otilde',     'odieresis',    'divide',
    'oslash',     'ugrave',     'uacute',     'ucircumflex',
    'udieresis',    'yacute',     'thorn',      'ydieresis'
  ],
# Greek
  'cp1253' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    'Euro',       '.notdef',    'quotesinglbase', 'florin',
    'quotedblbase',   'ellipsis',     'dagger',     'daggerdbl',
    '.notdef',    'perthousand',  '.notdef',    'guilsinglleft',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    'quoteleft',    'quoteright',   'quotedblleft',
    'quotedblright',  'bullet',     'endash',     'emdash',
    '.notdef',    'trademark',    '.notdef',    'guilsinglright',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'dieresistonos',  'Alphatonos',   'sterling',
    'currency',     'yen',      'brokenbar',    'section',
    'dieresis',     'copyright',    '.notdef',    'guillemotleft',
    'logicalnot',   'hyphen',     'registered',   'afii00208',
    'degree',     'plusminus',    'twosuperior',  'threesuperior',
    'tonos',      'mu',       'paragraph',    'periodcentered',
    'Epsilontonos',   'Etatonos',     'Iotatonos',    'guillemotright',
    'Omicrontonos',   'onehalf',    'Upsilontonos',   'Omegatonos',
    'iotadieresistonos','Alpha',      'Beta',       'Gamma',
    'Delta',      'Epsilon',    'Zeta',       'Eta',
    'Theta',      'Iota',       'Kappa',      'Lambda',
    'Mu',       'Nu',       'Xi',       'Omicron',
    'Pi',       'Rho',      '.notdef',    'Sigma',
    'Tau',      'Upsilon',    'Phi',      'Chi',
    'Psi',      'Omega',      'Iotadieresis',   'Upsilondieresis',
    'alphatonos',   'epsilontonos',   'etatonos',     'iotatonos',
    'upsilondieresistonos','alpha',      'beta',       'gamma',
    'delta',      'epsilon',    'zeta',       'eta',
    'theta',      'iota',       'kappa',      'lambda',
    'mu',       'nu',       'xi',       'omicron',
    'pi',       'rho',      'sigma1',     'sigma',
    'tau',      'upsilon',    'phi',      'chi',
    'psi',      'omega',      'iotadieresis',   'upsilondieresis',
    'omicrontonos',   'upsilontonos',   'omegatonos',   '.notdef'
  ],
# Turkish
  'cp1254' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    'Euro',       '.notdef',    'quotesinglbase', 'florin',
    'quotedblbase',   'ellipsis',     'dagger',     'daggerdbl',
    'circumflex',   'perthousand',  'Scaron',     'guilsinglleft',
    'OE',       '.notdef',    '.notdef',    '.notdef',
    '.notdef',    'quoteleft',    'quoteright',   'quotedblleft',
    'quotedblright',  'bullet',     'endash',     'emdash',
    'tilde',      'trademark',    'scaron',     'guilsinglright',
    'oe',       '.notdef',    '.notdef',    'Ydieresis',
    'space',      'exclamdown',   'cent',       'sterling',
    'currency',     'yen',      'brokenbar',    'section',
    'dieresis',     'copyright',    'ordfeminine',  'guillemotleft',
    'logicalnot',   'hyphen',     'registered',   'macron',
    'degree',     'plusminus',    'twosuperior',  'threesuperior',
    'acute',      'mu',       'paragraph',    'periodcentered',
    'cedilla',    'onesuperior',  'ordmasculine',   'guillemotright',
    'onequarter',   'onehalf',    'threequarters',  'questiondown',
    'Agrave',     'Aacute',     'Acircumflex',  'Atilde',
    'Adieresis',    'Aring',      'AE',       'Ccedilla',
    'Egrave',     'Eacute',     'Ecircumflex',  'Edieresis',
    'Igrave',     'Iacute',     'Icircumflex',  'Idieresis',
    'Gbreve',     'Ntilde',     'Ograve',     'Oacute',
    'Ocircumflex',  'Otilde',     'Odieresis',    'multiply',
    'Oslash',     'Ugrave',     'Uacute',     'Ucircumflex',
    'Udieresis',    'Idotaccent',   'Scedilla',     'germandbls',
    'agrave',     'aacute',     'acircumflex',  'atilde',
    'adieresis',    'aring',      'ae',       'ccedilla',
    'egrave',     'eacute',     'ecircumflex',  'edieresis',
    'igrave',     'iacute',     'icircumflex',  'idieresis',
    'gbreve',     'ntilde',     'ograve',     'oacute',
    'ocircumflex',  'otilde',     'odieresis',    'divide',
    'oslash',     'ugrave',     'uacute',     'ucircumflex',
    'udieresis',    'dotlessi',     'scedilla',     'ydieresis'
  ],
# Hebrew
  'cp1255' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    'Euro',       '.notdef',    'quotesinglbase', 'florin',
    'quotedblbase',   'ellipsis',     'dagger',     'daggerdbl',
    'circumflex',   'perthousand',  '.notdef',    'guilsinglleft',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    'quoteleft',    'quoteright',   'quotedblleft',
    'quotedblright',  'bullet',     'endash',     'emdash',
    'tilde',      'trademark',    '.notdef',    'guilsinglright',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclamdown',   'cent',       'sterling',
    'afii57636',    'yen',      'brokenbar',    'section',
    'dieresis',     'copyright',    'multiply',     'guillemotleft',
    'logicalnot',   'sfthyphen',    'registered',   'macron',
    'degree',     'plusminus',    'twosuperior',  'threesuperior',
    'acute',      'mu',       'paragraph',    'middot',
    'cedilla',    'onesuperior',  'divide',     'guillemotright',
    'onequarter',   'onehalf',    'threequarters',  'questiondown',
    'afii57799',    'afii57801',    'afii57800',    'afii57802',
    'afii57793',    'afii57794',    'afii57795',    'afii57798',
    'afii57797',    'afii57806',    '.notdef',    'afii57796',
    'afii57807',    'afii57839',    'afii57645',    'afii57841',
    'afii57842',    'afii57804',    'afii57803',    'afii57658',
    'afii57716',    'afii57717',    'afii57718',    'gereshhebrew',
    'gershayimhebrew','.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'afii57664',    'afii57665',    'afii57666',    'afii57667',
    'afii57668',    'afii57669',    'afii57670',    'afii57671',
    'afii57672',    'afii57673',    'afii57674',    'afii57675',
    'afii57676',    'afii57677',    'afii57678',    'afii57679',
    'afii57680',    'afii57681',    'afii57682',    'afii57683',
    'afii57684',    'afii57685',    'afii57686',    'afii57687',
    'afii57688',    'afii57689',    'afii57690',    '.notdef',
    '.notdef',    'afii299',    'afii300',    '.notdef'
  ],
# Baltic
  'cp1257' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    'Euro',       '.notdef',    'quotesinglbase', '.notdef',
    'quotedblbase',   'ellipsis',     'dagger',     'daggerdbl',
    '.notdef',    'perthousand',  '.notdef',    'guilsinglleft',
    '.notdef',    'dieresis',     'caron',      'cedilla',
    '.notdef',    'quoteleft',    'quoteright',   'quotedblleft',
    'quotedblright',  'bullet',     'endash',     'emdash',
    '.notdef',    'trademark',    '.notdef',    'guilsinglright',
    '.notdef',    'macron',     'ogonek',     '.notdef',
    'space',      '.notdef',    'cent',       'sterling',
    'currency',     '.notdef',    'brokenbar',    'section',
    'Oslash',     'copyright',    'Rcommaaccent',   'guillemotleft',
    'logicalnot',   'hyphen',     'registered',   'AE',
    'degree',     'plusminus',    'twosuperior',  'threesuperior',
    'acute',      'mu',       'paragraph',    'periodcentered',
    'oslash',     'onesuperior',  'rcommaaccent',   'guillemotright',
    'onequarter',   'onehalf',    'threequarters',  'ae',
    'Aogonek',    'Iogonek',    'Amacron',    'Cacute',
    'Adieresis',    'Aring',      'Eogonek',    'Emacron',
    'Ccaron',     'Eacute',     'Zacute',     'Edotaccent',
    'Gcommaaccent',   'Kcommaaccent',   'Imacron',    'Lcommaaccent',
    'Scaron',     'Nacute',     'Ncommaaccent',   'Oacute',
    'Omacron',    'Otilde',     'Odieresis',    'multiply',
    'Uogonek',    'Lslash',     'Sacute',     'Umacron',
    'Udieresis',    'Zdotaccent',   'Zcaron',     'germandbls',
    'aogonek',    'iogonek',    'amacron',    'cacute',
    'adieresis',    'aring',      'eogonek',    'emacron',
    'ccaron',     'eacute',     'zacute',     'edotaccent',
    'gcommaaccent',   'kcommaaccent',   'imacron',    'lcommaaccent',
    'scaron',     'nacute',     'ncommaaccent',   'oacute',
    'omacron',    'otilde',     'odieresis',    'divide',
    'uogonek',    'lslash',     'sacute',     'umacron',
    'udieresis',    'zdotaccent',   'zcaron',     'dotaccent'
  ],
# Vietnamese
  'cp1258' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    'Euro',       '.notdef',    'quotesinglbase', 'florin',
    'quotedblbase',   'ellipsis',     'dagger',     'daggerdbl',
    'circumflex',   'perthousand',  '.notdef',    'guilsinglleft',
    'OE',       '.notdef',    '.notdef',    '.notdef',
    '.notdef',    'quoteleft',    'quoteright',   'quotedblleft',
    'quotedblright',  'bullet',     'endash',     'emdash',
    'tilde',      'trademark',    '.notdef',    'guilsinglright',
    'oe',       '.notdef',    '.notdef',    'Ydieresis',
    'space',      'exclamdown',   'cent',       'sterling',
    'currency',     'yen',      'brokenbar',    'section',
    'dieresis',     'copyright',    'ordfeminine',  'guillemotleft',
    'logicalnot',   'hyphen',     'registered',   'macron',
    'degree',     'plusminus',    'twosuperior',  'threesuperior',
    'acute',      'mu',       'paragraph',    'periodcentered',
    'cedilla',    'onesuperior',  'ordmasculine',   'guillemotright',
    'onequarter',   'onehalf',    'threequarters',  'questiondown',
    'Agrave',     'Aacute',     'Acircumflex',  'Abreve',
    'Adieresis',    'Aring',      'AE',       'Ccedilla',
    'Egrave',     'Eacute',     'Ecircumflex',  'Edieresis',
    'gravecomb',    'Iacute',     'Icircumflex',  'Idieresis',
    'Dcroat',     'Ntilde',     'hookabovecomb',  'Oacute',
    'Ocircumflex',  'Ohorn',      'Odieresis',    'multiply',
    'Oslash',     'Ugrave',     'Uacute',     'Ucircumflex',
    'Udieresis',    'Uhorn',      'tildecomb',    'germandbls',
    'agrave',     'aacute',     'acircumflex',  'abreve',
    'adieresis',    'aring',      'ae',       'ccedilla',
    'egrave',     'eacute',     'ecircumflex',  'edieresis',
    'acutecomb',    'iacute',     'icircumflex',  'idieresis',
    'dcroat',     'ntilde',     'dotbelowcomb',   'oacute',
    'ocircumflex',  'ohorn',      'odieresis',    'divide',
    'oslash',     'ugrave',     'uacute',     'ucircumflex',
    'udieresis',    'uhorn',      'dong',       'ydieresis'
  ],
# Thai
  'cp874' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    'Euro',       '.notdef',    '.notdef',    '.notdef',
    '.notdef',    'ellipsis',     '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    'quoteleft',    'quoteright',   'quotedblleft',
    'quotedblright',  'bullet',     'endash',     'emdash',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'kokaithai',    'khokhaithai',  'khokhuatthai',
    'khokhwaithai',   'khokhonthai',  'khorakhangthai', 'ngonguthai',
    'chochanthai',  'chochingthai',   'chochangthai',   'sosothai',
    'chochoethai',  'yoyingthai',   'dochadathai',  'topatakthai',
    'thothanthai',  'thonangmonthothai', 'thophuthaothai', 'nonenthai',
    'dodekthai',    'totaothai',    'thothungthai',   'thothahanthai',
    'thothongthai',   'nonuthai',     'bobaimaithai',   'poplathai',
    'phophungthai',   'fofathai',     'phophanthai',  'fofanthai',
    'phosamphaothai', 'momathai',     'yoyakthai',    'roruathai',
    'ruthai',     'lolingthai',   'luthai',     'wowaenthai',
    'sosalathai',   'sorusithai',   'sosuathai',    'hohipthai',
    'lochulathai',  'oangthai',     'honokhukthai',   'paiyannoithai',
    'saraathai',    'maihanakatthai', 'saraaathai',   'saraamthai',
    'saraithai',    'saraiithai',   'sarauethai',   'saraueethai',
    'sarauthai',    'sarauuthai',   'phinthuthai',  '.notdef',
    '.notdef',    '.notdef',    '.notdef',    'bahtthai',
    'saraethai',    'saraaethai',   'saraothai',    'saraaimaimuanthai',
    'saraaimaimalaithai', 'lakkhangyaothai', 'maiyamokthai', 'maitaikhuthai',
    'maiekthai',    'maithothai',   'maitrithai',   'maichattawathai',
    'thanthakhatthai', 'nikhahitthai',  'yamakkanthai',   'fongmanthai',
    'zerothai',     'onethai',    'twothai',    'threethai',
    'fourthai',     'fivethai',     'sixthai',    'seventhai',
    'eightthai',    'ninethai',     'angkhankhuthai', 'khomutthai',
    '.notdef',    '.notdef',    '.notdef',    '.notdef'
  ],
# Western Europe
  'ISO-8859-1' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclamdown',   'cent',       'sterling',
    'currency',     'yen',      'brokenbar',    'section',
    'dieresis',     'copyright',    'ordfeminine',  'guillemotleft',
    'logicalnot',   'hyphen',     'registered',   'macron',
    'degree',     'plusminus',    'twosuperior',  'threesuperior',
    'acute',      'mu',       'paragraph',    'periodcentered',
    'cedilla',    'onesuperior',  'ordmasculine',   'guillemotright',
    'onequarter',   'onehalf',    'threequarters',  'questiondown',
    'Agrave',     'Aacute',     'Acircumflex',  'Atilde',
    'Adieresis',    'Aring',      'AE',       'Ccedilla',
    'Egrave',     'Eacute',     'Ecircumflex',  'Edieresis',
    'Igrave',     'Iacute',     'Icircumflex',  'Idieresis',
    'Eth',      'Ntilde',     'Ograve',     'Oacute',
    'Ocircumflex',  'Otilde',     'Odieresis',    'multiply',
    'Oslash',     'Ugrave',     'Uacute',     'Ucircumflex',
    'Udieresis',    'Yacute',     'Thorn',      'germandbls',
    'agrave',     'aacute',     'acircumflex',  'atilde',
    'adieresis',    'aring',      'ae',       'ccedilla',
    'egrave',     'eacute',     'ecircumflex',  'edieresis',
    'igrave',     'iacute',     'icircumflex',  'idieresis',
    'eth',      'ntilde',     'ograve',     'oacute',
    'ocircumflex',  'otilde',     'odieresis',    'divide',
    'oslash',     'ugrave',     'uacute',     'ucircumflex',
    'udieresis',    'yacute',     'thorn',      'ydieresis'
  ],
# Central Europe
  'ISO-8859-2' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'Aogonek',    'breve',      'Lslash',
    'currency',     'Lcaron',     'Sacute',     'section',
    'dieresis',     'Scaron',     'Scedilla',     'Tcaron',
    'Zacute',     'hyphen',     'Zcaron',     'Zdotaccent',
    'degree',     'aogonek',    'ogonek',     'lslash',
    'acute',      'lcaron',     'sacute',     'caron',
    'cedilla',    'scaron',     'scedilla',     'tcaron',
    'zacute',     'hungarumlaut',   'zcaron',     'zdotaccent',
    'Racute',     'Aacute',     'Acircumflex',  'Abreve',
    'Adieresis',    'Lacute',     'Cacute',     'Ccedilla',
    'Ccaron',     'Eacute',     'Eogonek',    'Edieresis',
    'Ecaron',     'Iacute',     'Icircumflex',  'Dcaron',
    'Dcroat',     'Nacute',     'Ncaron',     'Oacute',
    'Ocircumflex',  'Ohungarumlaut',  'Odieresis',    'multiply',
    'Rcaron',     'Uring',      'Uacute',     'Uhungarumlaut',
    'Udieresis',    'Yacute',     'Tcommaaccent',   'germandbls',
    'racute',     'aacute',     'acircumflex',  'abreve',
    'adieresis',    'lacute',     'cacute',     'ccedilla',
    'ccaron',     'eacute',     'eogonek',    'edieresis',
    'ecaron',     'iacute',     'icircumflex',  'dcaron',
    'dcroat',     'nacute',     'ncaron',     'oacute',
    'ocircumflex',  'ohungarumlaut',  'odieresis',    'divide',
    'rcaron',     'uring',      'uacute',     'uhungarumlaut',
    'udieresis',    'yacute',     'tcommaaccent',   'dotaccent'
  ],
# Baltic
  'ISO-8859-4' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'Aogonek',    'kgreenlandic',   'Rcommaaccent',
    'currency',     'Itilde',     'Lcommaaccent',   'section',
    'dieresis',     'Scaron',     'Emacron',    'Gcommaaccent',
    'Tbar',       'hyphen',     'Zcaron',     'macron',
    'degree',     'aogonek',    'ogonek',     'rcommaaccent',
    'acute',      'itilde',     'lcommaaccent',   'caron',
    'cedilla',    'scaron',     'emacron',    'gcommaaccent',
    'tbar',       'Eng',      'zcaron',     'eng',
    'Amacron',    'Aacute',     'Acircumflex',  'Atilde',
    'Adieresis',    'Aring',      'AE',       'Iogonek',
    'Ccaron',     'Eacute',     'Eogonek',    'Edieresis',
    'Edotaccent',   'Iacute',     'Icircumflex',  'Imacron',
    'Dcroat',     'Ncommaaccent',   'Omacron',    'Kcommaaccent',
    'Ocircumflex',  'Otilde',     'Odieresis',    'multiply',
    'Oslash',     'Uogonek',    'Uacute',     'Ucircumflex',
    'Udieresis',    'Utilde',     'Umacron',    'germandbls',
    'amacron',    'aacute',     'acircumflex',  'atilde',
    'adieresis',    'aring',      'ae',       'iogonek',
    'ccaron',     'eacute',     'eogonek',    'edieresis',
    'edotaccent',   'iacute',     'icircumflex',  'imacron',
    'dcroat',     'ncommaaccent',   'omacron',    'kcommaaccent',
    'ocircumflex',  'otilde',     'odieresis',    'divide',
    'oslash',     'uogonek',    'uacute',     'ucircumflex',
    'udieresis',    'utilde',     'umacron',    'dotaccent'
  ],
# Cyrillic
  'ISO-8859-5' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'afii10023',    'afii10051',    'afii10052',
    'afii10053',    'afii10054',    'afii10055',    'afii10056',
    'afii10057',    'afii10058',    'afii10059',    'afii10060',
    'afii10061',    'hyphen',     'afii10062',    'afii10145',
    'afii10017',    'afii10018',    'afii10019',    'afii10020',
    'afii10021',    'afii10022',    'afii10024',    'afii10025',
    'afii10026',    'afii10027',    'afii10028',    'afii10029',
    'afii10030',    'afii10031',    'afii10032',    'afii10033',
    'afii10034',    'afii10035',    'afii10036',    'afii10037',
    'afii10038',    'afii10039',    'afii10040',    'afii10041',
    'afii10042',    'afii10043',    'afii10044',    'afii10045',
    'afii10046',    'afii10047',    'afii10048',    'afii10049',
    'afii10065',    'afii10066',    'afii10067',    'afii10068',
    'afii10069',    'afii10070',    'afii10072',    'afii10073',
    'afii10074',    'afii10075',    'afii10076',    'afii10077',
    'afii10078',    'afii10079',    'afii10080',    'afii10081',
    'afii10082',    'afii10083',    'afii10084',    'afii10085',
    'afii10086',    'afii10087',    'afii10088',    'afii10089',
    'afii10090',    'afii10091',    'afii10092',    'afii10093',
    'afii10094',    'afii10095',    'afii10096',    'afii10097',
    'afii61352',    'afii10071',    'afii10099',    'afii10100',
    'afii10101',    'afii10102',    'afii10103',    'afii10104',
    'afii10105',    'afii10106',    'afii10107',    'afii10108',
    'afii10109',    'section',    'afii10110',    'afii10193'
  ],
# Greek
  'ISO-8859-7' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'quoteleft',    'quoteright',   'sterling',
    '.notdef',    '.notdef',    'brokenbar',    'section',
    'dieresis',     'copyright',    '.notdef',    'guillemotleft',
    'logicalnot',   'hyphen',     '.notdef',    'afii00208',
    'degree',     'plusminus',    'twosuperior',  'threesuperior',
    'tonos',      'dieresistonos',  'Alphatonos',   'periodcentered',
    'Epsilontonos',   'Etatonos',     'Iotatonos',    'guillemotright',
    'Omicrontonos',   'onehalf',    'Upsilontonos',   'Omegatonos',
    'iotadieresistonos','Alpha',      'Beta',       'Gamma',
    'Delta',      'Epsilon',    'Zeta',       'Eta',
    'Theta',      'Iota',       'Kappa',      'Lambda',
    'Mu',       'Nu',       'Xi',       'Omicron',
    'Pi',       'Rho',      '.notdef',    'Sigma',
    'Tau',      'Upsilon',    'Phi',      'Chi',
    'Psi',      'Omega',      'Iotadieresis',   'Upsilondieresis',
    'alphatonos',   'epsilontonos',   'etatonos',     'iotatonos',
    'upsilondieresistonos','alpha',      'beta',       'gamma',
    'delta',      'epsilon',    'zeta',       'eta',
    'theta',      'iota',       'kappa',      'lambda',
    'mu',       'nu',       'xi',       'omicron',
    'pi',       'rho',      'sigma1',     'sigma',
    'tau',      'upsilon',    'phi',      'chi',
    'psi',      'omega',      'iotadieresis',   'upsilondieresis',
    'omicrontonos',   'upsilontonos',   'omegatonos',   '.notdef'
  ],
# Turkish
  'ISO-8859-9' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclamdown',   'cent',       'sterling',
    'currency',     'yen',      'brokenbar',    'section',
    'dieresis',     'copyright',    'ordfeminine',  'guillemotleft',
    'logicalnot',   'hyphen',     'registered',   'macron',
    'degree',     'plusminus',    'twosuperior',  'threesuperior',
    'acute',      'mu',       'paragraph',    'periodcentered',
    'cedilla',    'onesuperior',  'ordmasculine',   'guillemotright',
    'onequarter',   'onehalf',    'threequarters',  'questiondown',
    'Agrave',     'Aacute',     'Acircumflex',  'Atilde',
    'Adieresis',    'Aring',      'AE',       'Ccedilla',
    'Egrave',     'Eacute',     'Ecircumflex',  'Edieresis',
    'Igrave',     'Iacute',     'Icircumflex',  'Idieresis',
    'Gbreve',     'Ntilde',     'Ograve',     'Oacute',
    'Ocircumflex',  'Otilde',     'Odieresis',    'multiply',
    'Oslash',     'Ugrave',     'Uacute',     'Ucircumflex',
    'Udieresis',    'Idotaccent',   'Scedilla',     'germandbls',
    'agrave',     'aacute',     'acircumflex',  'atilde',
    'adieresis',    'aring',      'ae',       'ccedilla',
    'egrave',     'eacute',     'ecircumflex',  'edieresis',
    'igrave',     'iacute',     'icircumflex',  'idieresis',
    'gbreve',     'ntilde',     'ograve',     'oacute',
    'ocircumflex',  'otilde',     'odieresis',    'divide',
    'oslash',     'ugrave',     'uacute',     'ucircumflex',
    'udieresis',    'dotlessi',     'scedilla',     'ydieresis'
  ],
# Thai
  'ISO-8859-11' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'kokaithai',    'khokhaithai',  'khokhuatthai',
    'khokhwaithai',   'khokhonthai',  'khorakhangthai', 'ngonguthai',
    'chochanthai',  'chochingthai',   'chochangthai',   'sosothai',
    'chochoethai',  'yoyingthai',   'dochadathai',  'topatakthai',
    'thothanthai',  'thonangmonthothai','thophuthaothai', 'nonenthai',
    'dodekthai',    'totaothai',    'thothungthai',   'thothahanthai',
    'thothongthai',   'nonuthai',     'bobaimaithai',   'poplathai',
    'phophungthai',   'fofathai',     'phophanthai',  'fofanthai',
    'phosamphaothai', 'momathai',     'yoyakthai',    'roruathai',
    'ruthai',     'lolingthai',   'luthai',     'wowaenthai',
    'sosalathai',   'sorusithai',   'sosuathai',    'hohipthai',
    'lochulathai',  'oangthai',     'honokhukthai',   'paiyannoithai',
    'saraathai',    'maihanakatthai', 'saraaathai',   'saraamthai',
    'saraithai',    'saraiithai',   'sarauethai',   'saraueethai',
    'sarauthai',    'sarauuthai',   'phinthuthai',  '.notdef',
    '.notdef',    '.notdef',    '.notdef',    'bahtthai',
    'saraethai',    'saraaethai',   'saraothai',    'saraaimaimuanthai',
    'saraaimaimalaithai','lakkhangyaothai','maiyamokthai',   'maitaikhuthai',
    'maiekthai',    'maithothai',   'maitrithai',   'maichattawathai',
    'thanthakhatthai','nikhahitthai',   'yamakkanthai',   'fongmanthai',
    'zerothai',     'onethai',    'twothai',    'threethai',
    'fourthai',     'fivethai',     'sixthai',    'seventhai',
    'eightthai',    'ninethai',     'angkhankhuthai', 'khomutthai',
    '.notdef',    '.notdef',    '.notdef',    '.notdef'
  ],
# Western Europe
  'ISO-8859-15' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclamdown',   'cent',       'sterling',
    'Euro',       'yen',      'Scaron',     'section',
    'scaron',     'copyright',    'ordfeminine',  'guillemotleft',
    'logicalnot',   'hyphen',     'registered',   'macron',
    'degree',     'plusminus',    'twosuperior',  'threesuperior',
    'Zcaron',     'mu',       'paragraph',    'periodcentered',
    'zcaron',     'onesuperior',  'ordmasculine',   'guillemotright',
    'OE',       'oe',       'Ydieresis',    'questiondown',
    'Agrave',     'Aacute',     'Acircumflex',  'Atilde',
    'Adieresis',    'Aring',      'AE',       'Ccedilla',
    'Egrave',     'Eacute',     'Ecircumflex',  'Edieresis',
    'Igrave',     'Iacute',     'Icircumflex',  'Idieresis',
    'Eth',      'Ntilde',     'Ograve',     'Oacute',
    'Ocircumflex',  'Otilde',     'Odieresis',    'multiply',
    'Oslash',     'Ugrave',     'Uacute',     'Ucircumflex',
    'Udieresis',    'Yacute',     'Thorn',      'germandbls',
    'agrave',     'aacute',     'acircumflex',  'atilde',
    'adieresis',    'aring',      'ae',       'ccedilla',
    'egrave',     'eacute',     'ecircumflex',  'edieresis',
    'igrave',     'iacute',     'icircumflex',  'idieresis',
    'eth',      'ntilde',     'ograve',     'oacute',
    'ocircumflex',  'otilde',     'odieresis',    'divide',
    'oslash',     'ugrave',     'uacute',     'ucircumflex',
    'udieresis',    'yacute',     'thorn',      'ydieresis'
  ],
# Central Europe
  'ISO-8859-16' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'Aogonek',    'aogonek',    'Lslash',
    'Euro',       'quotedblbase',   'Scaron',     'section',
    'scaron',     'copyright',    'Scommaaccent',   'guillemotleft',
    'Zacute',     'hyphen',     'zacute',     'Zdotaccent',
    'degree',     'plusminus',    'Ccaron',     'lslash',
    'Zcaron',     'quotedblright',  'paragraph',    'periodcentered',
    'zcaron',     'ccaron',     'scommaaccent',   'guillemotright',
    'OE',       'oe',       'Ydieresis',    'zdotaccent',
    'Agrave',     'Aacute',     'Acircumflex',  'Abreve',
    'Adieresis',    'Cacute',     'AE',       'Ccedilla',
    'Egrave',     'Eacute',     'Ecircumflex',  'Edieresis',
    'Igrave',     'Iacute',     'Icircumflex',  'Idieresis',
    'Dcroat',     'Nacute',     'Ograve',     'Oacute',
    'Ocircumflex',  'Ohungarumlaut',  'Odieresis',    'Sacute',
    'Uhungarumlaut',  'Ugrave',     'Uacute',     'Ucircumflex',
    'Udieresis',    'Eogonek',    'Tcommaaccent',   'germandbls',
    'agrave',     'aacute',     'acircumflex',  'abreve',
    'adieresis',    'cacute',     'ae',       'ccedilla',
    'egrave',     'eacute',     'ecircumflex',  'edieresis',
    'igrave',     'iacute',     'icircumflex',  'idieresis',
    'dcroat',     'nacute',     'ograve',     'oacute',
    'ocircumflex',  'ohungarumlaut',  'odieresis',    'sacute',
    'uhungarumlaut',  'ugrave',     'uacute',     'ucircumflex',
    'udieresis',    'eogonek',    'tcommaaccent',   'ydieresis'
  ],
# Russian
  'KOI8-R' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    'SF100000',     'SF110000',     'SF010000',     'SF030000',
    'SF020000',     'SF040000',     'SF080000',     'SF090000',
    'SF060000',     'SF070000',     'SF050000',     'upblock',
    'dnblock',    'block',      'lfblock',    'rtblock',
    'ltshade',    'shade',      'dkshade',    'integraltp',
    'filledbox',    'periodcentered', 'radical',    'approxequal',
    'lessequal',    'greaterequal',   'space',      'integralbt',
    'degree',     'twosuperior',  'periodcentered', 'divide',
    'SF430000',     'SF240000',     'SF510000',     'afii10071',
    'SF520000',     'SF390000',     'SF220000',     'SF210000',
    'SF250000',     'SF500000',     'SF490000',     'SF380000',
    'SF280000',     'SF270000',     'SF260000',     'SF360000',
    'SF370000',     'SF420000',     'SF190000',     'afii10023',
    'SF200000',     'SF230000',     'SF470000',     'SF480000',
    'SF410000',     'SF450000',     'SF460000',     'SF400000',
    'SF540000',     'SF530000',     'SF440000',     'copyright',
    'afii10096',    'afii10065',    'afii10066',    'afii10088',
    'afii10069',    'afii10070',    'afii10086',    'afii10068',
    'afii10087',    'afii10074',    'afii10075',    'afii10076',
    'afii10077',    'afii10078',    'afii10079',    'afii10080',
    'afii10081',    'afii10097',    'afii10082',    'afii10083',
    'afii10084',    'afii10085',    'afii10072',    'afii10067',
    'afii10094',    'afii10093',    'afii10073',    'afii10090',
    'afii10095',    'afii10091',    'afii10089',    'afii10092',
    'afii10048',    'afii10017',    'afii10018',    'afii10040',
    'afii10021',    'afii10022',    'afii10038',    'afii10020',
    'afii10039',    'afii10026',    'afii10027',    'afii10028',
    'afii10029',    'afii10030',    'afii10031',    'afii10032',
    'afii10033',    'afii10049',    'afii10034',    'afii10035',
    'afii10036',    'afii10037',    'afii10024',    'afii10019',
    'afii10046',    'afii10045',    'afii10025',    'afii10042',
    'afii10047',    'afii10043',    'afii10041',    'afii10044'
  ],
# Ukrainian
  'KOI8-U' => [
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    '.notdef',    '.notdef',    '.notdef',    '.notdef',
    'space',      'exclam',     'quotedbl',     'numbersign',
    'dollar',     'percent',    'ampersand',    'quotesingle',
    'parenleft',    'parenright',   'asterisk',     'plus',
    'comma',      'hyphen',     'period',     'slash',
    'zero',       'one',      'two',      'three',
    'four',       'five',       'six',      'seven',
    'eight',      'nine',       'colon',      'semicolon',
    'less',       'equal',      'greater',    'question',
    'at',       'A',        'B',        'C',
    'D',        'E',        'F',        'G',
    'H',        'I',        'J',        'K',
    'L',        'M',        'N',        'O',
    'P',        'Q',        'R',        'S',
    'T',        'U',        'V',        'W',
    'X',        'Y',        'Z',        'bracketleft',
    'backslash',    'bracketright',   'asciicircum',  'underscore',
    'grave',      'a',        'b',        'c',
    'd',        'e',        'f',        'g',
    'h',        'i',        'j',        'k',
    'l',        'm',        'n',        'o',
    'p',        'q',        'r',        's',
    't',        'u',        'v',        'w',
    'x',        'y',        'z',        'braceleft',
    'bar',      'braceright',   'asciitilde',   '.notdef',
    'SF100000',     'SF110000',     'SF010000',     'SF030000',
    'SF020000',     'SF040000',     'SF080000',     'SF090000',
    'SF060000',     'SF070000',     'SF050000',     'upblock',
    'dnblock',    'block',      'lfblock',    'rtblock',
    'ltshade',    'shade',      'dkshade',    'integraltp',
    'filledbox',    'bullet',     'radical',    'approxequal',
    'lessequal',    'greaterequal',   'space',      'integralbt',
    'degree',     'twosuperior',  'periodcentered', 'divide',
    'SF430000',     'SF240000',     'SF510000',     'afii10071',
    'afii10101',    'SF390000',     'afii10103',    'afii10104',
    'SF250000',     'SF500000',     'SF490000',     'SF380000',
    'SF280000',     'afii10098',    'SF260000',     'SF360000',
    'SF370000',     'SF420000',     'SF190000',     'afii10023',
    'afii10053',    'SF230000',     'afii10055',    'afii10056',
    'SF410000',     'SF450000',     'SF460000',     'SF400000',
    'SF540000',     'afii10050',    'SF440000',     'copyright',
    'afii10096',    'afii10065',    'afii10066',    'afii10088',
    'afii10069',    'afii10070',    'afii10086',    'afii10068',
    'afii10087',    'afii10074',    'afii10075',    'afii10076',
    'afii10077',    'afii10078',    'afii10079',    'afii10080',
    'afii10081',    'afii10097',    'afii10082',    'afii10083',
    'afii10084',    'afii10085',    'afii10072',    'afii10067',
    'afii10094',    'afii10093',    'afii10073',    'afii10090',
    'afii10095',    'afii10091',    'afii10089',    'afii10092',
    'afii10048',    'afii10017',    'afii10018',    'afii10040',
    'afii10021',    'afii10022',    'afii10038',    'afii10020',
    'afii10039',    'afii10026',    'afii10027',    'afii10028',
    'afii10029',    'afii10030',    'afii10031',    'afii10032',
    'afii10033',    'afii10049',    'afii10034',    'afii10035',
    'afii10036',    'afii10037',    'afii10024',    'afii10019',
    'afii10046',    'afii10045',    'afii10025',    'afii10042',
    'afii10047',    'afii10043',    'afii10041',    'afii10044'
  ]
}
PROJECT_BASE_DIRECTORY =
#

PdfParadise::PROJECT_BASE_DIRECTORY

#
File.absolute_path("#{__dir__}/..")+'/'
VERSION =
#

VERSION

#
'0.3.20'
LAST_UPDATE =
#

LAST_UPDATE

#
'04.02.2024'
HOME_DIRECTORY_OF_USER_X =
'/home/x/'
MAIN_PDF_YAML_FILE =
#

MAIN_PDF_YAML_FILE

#
"#{HOME_DIRECTORY_OF_USER_X}programming/ruby/src/roebe/lib/roebe/yaml/"\
"main_pdf.yml"
FILE_ALL_CURRENTLY_OPENED_PDF_FILES =
#

FILE_ALL_CURRENTLY_OPENED_PDF_FILES

#
'/home/Temp/all_currently_opened_pdf_files.md'
AUTOCONVERT_PDF_FILES_RESIDING_IN_THIS_DIRECTORY =
#

AUTOCONVERT_PDF_FILES_RESIDING_IN_THIS_DIRECTORY

#
'/ingrid/pdf/'

Class Method Summary collapse

Class Method Details

.autoconvert_pdf_files_in_the_main_directory(target = "#{AUTOCONVERT_PDF_FILES_RESIDING_IN_THIS_DIRECTORY}*.pdf") ⇒ Object

#

PdfParadise.autoconvert_pdf_files_in_the_main_directory

#


62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/pdf_paradise/commandline/commandline.rb', line 62

def self.autoconvert_pdf_files_in_the_main_directory(
    target = "#{AUTOCONVERT_PDF_FILES_RESIDING_IN_THIS_DIRECTORY}*.pdf"
  )
  require 'pdf_paradise/utility_scripts/split_pdf.rb'
  all_pdf_files = Dir[target]
  if all_pdf_files.empty?
    e "No files found at #{target}."
  else
    all_pdf_files.each {|this_pdf_file|
      PdfParadise.split_this_pdf_file(
        this_pdf_file,
        1,
        AUTOCONVERT_PDF_FILES_RESIDING_IN_THIS_DIRECTORY
      )
    }
  end
end

.automatic_pdf_title(of_this_pdf_file = ARGV) ⇒ Object

#

PdfParadise.automatic_pdf_title

This method will automatically set the title of a .pdf file to its filename, with all ‘_’ tokens replaced by ‘ ’ tokens.

The input to this method should be .pdf files that are existing locally.

#


92
93
94
95
96
97
98
# File 'lib/pdf_paradise/utility_scripts/automatic_pdf_title.rb', line 92

def self.automatic_pdf_title(
    of_this_pdf_file = ARGV
  )
  [of_this_pdf_file].flatten.compact.each {|this_pdf_file|
    PdfParadise::AutomaticPdfTitle.new(this_pdf_file)
  }
end

.batch_require_toplevel_filesObject

#

PdfParadise.batch_require_toplevel_files

Batch require all .rb files that are part of the project.

#


14
15
16
17
18
19
20
# File 'lib/pdf_paradise/requires/batch_require_toplevel_files.rb', line 14

def self.batch_require_toplevel_files
  files = Dir["#{PdfParadise.project_base_dir?}*.rb"]
  files.reject! {|entry| entry.include? 'merge_pdf_namespace' }
  files.each {|file|
    require "pdf_paradise/#{File.basename(file)}"
  }
end

.burst(i = ARGV, split_into_n_pages = :max, store_in_this_directory = :default) ⇒ Object

#

PdfParadise.burst

This will “burst” all pdf files out of a single .pdf file.

#


340
341
342
343
344
345
346
347
348
349
350
# File 'lib/pdf_paradise/utility_scripts/split_pdf.rb', line 340

def self.burst(
    i                       = ARGV,
    split_into_n_pages      = :max,
    store_in_this_directory = :default
  )
  _ = PdfParadise::SplitPdf.new(i) {{
    split_into_n_pages:      split_into_n_pages,
    store_in_this_directory: store_in_this_directory
  }}
  _ # Return the object here.
end

.cd_to_the_log_directoryObject

#

PdfParadise.cd_to_the_log_directory

#


137
138
139
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 137

def self.cd_to_the_log_directory
  Dir.chdir(PdfParadise.log_dir?)
end

.commandline_arguments?Boolean

#

PdfParadise.commandline_arguments?

#

Returns:

  • (Boolean)


43
44
45
# File 'lib/pdf_paradise/commandline/commandline.rb', line 43

def self.commandline_arguments?
  @commandline_arguments
end

.compress_this_pdf_file(i = ARGV) ⇒ Object

#

PdfParadise.compress_this_pdf_file

#


100
101
102
# File 'lib/pdf_paradise/compress/compress_this_pdf_file.rb', line 100

def self.compress_this_pdf_file(i = ARGV)
  PdfParadise::CompressThisPdfFile.new(i)
end

.compress_via_pdf(this_file = 'foobar.pdf') ⇒ Object

#

PdfParadise.compress_via_pdf

#


13
14
15
16
17
18
19
20
21
# File 'lib/pdf_paradise/compress/compress_via_hexapdf.rb', line 13

def self.compress_via_pdf(
    this_file = 'foobar.pdf'
  )
  if this_file.is_a? Array
    this_file = this_file.first
  end
  require 'pdf_paradise/hexapdf/hexapdf.rb'
  HexaPDF.optimize_this_pdf_file(this_file)
end

.compress_via_qpdf(this_file = 'foobar.pdf') ⇒ Object

#

PdfParadise.compress_via_qpdf

#


15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/pdf_paradise/compress/compress_via_qpdf.rb', line 15

def self.compress_via_qpdf(
    this_file = 'foobar.pdf'
  )
  if this_file.is_a? Array
    this_file = this_file.first
  end
  e
  esystem 'qpdf --compress-streams=y --object-streams=generate '\
          '--recompress-flate --optimize-images --compression-level=9 '+
          this_file+' compressed_output_'+File.basename(this_file)
  e
end

.convert(pdf_files) ⇒ Object

#

PdfParadise.convert

#


355
356
357
358
# File 'lib/pdf_paradise/utility_scripts/split_pdf.rb', line 355

def self.convert(pdf_files)
  handle = PdfParadise.split_this_pdf_file(pdf_files)
  handle.path? # Return the file path as well.
end

.convert_epub_to_pdf(i) ⇒ Object

#

PdfParadise.convert_epub_to_pdf

This method allows us to convert an .epub file to .pdf format, if pandoc is available.

#


15
16
17
18
19
20
21
# File 'lib/pdf_paradise/toplevel_methods/convert_epub_to_pdf.rb', line 15

def self.convert_epub_to_pdf(i)
  i = [i].flatten.compact
  i.each {|entry|
    _ = 'pandoc -s -t latex --toc --chapters --latex-engine=lualatex '+entry+' -o '+entry+'.pdf'
    esystem _
  }
end

.convert_markdown_to_pdf(this_markdown_file) ⇒ Object

#

PdfParadise.convert_markdown_to_pdf

This method can be used to convert a markdown .md file into a .pdf file.

This functionality depends on kramdown, and kramdown-pdf-converter.

#


19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/pdf_paradise/toplevel_methods/convert_markdown_to_pdf.rb', line 19

def self.convert_markdown_to_pdf(
    this_markdown_file
  )
  require 'kramdown'
  require 'kramdown/converter/pdf'
  begin
    require 'save_file'
  rescue LoadError; end
  require 'colours'
  [this_markdown_file].flatten.compact.each {|markdown_file|
    if File.exist? markdown_file
      text = File.read(markdown_file)
      dataset = Kramdown::Document.new(text).to_pdf
      target = markdown_file.sub(/#{File.extname(markdown_file)}$/,'')+'.pdf'
      e 'Storing into the file `'+Colours.sfile(target)+'`.'
      SaveFile.write_what_into(dataset, target)
    else
      e 'No file exists at '+Colours.sfile(markdown_file)+'.'
    end
  }
end

.convert_postscript_to_pdf(i = 'filein.ps') ⇒ Object

#

PdfParadise.convert_postscript_to_pdf

This method will convert a postscript-file into a .pdf file.

#


183
184
185
186
187
188
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 183

def self.convert_postscript_to_pdf(
    i = 'filein.ps'
  )
  _ = 'gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=fileout.pdf '+i
  esystem(_)
end

.convert_this_pdf_file_into_a_png_file(this_pdf_file) ⇒ Object

#

PdfParadise.convert_this_pdf_file_into_a_png_file

#


167
168
169
170
171
172
173
174
175
176
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 167

def self.convert_this_pdf_file_into_a_png_file(
    this_pdf_file
  )
  _ = 'gs -dNOPAUSE -q -r300 -sPAPERSIZE=a4 -dTextAlphaBits=4 -dDownScaleFactor=3 '.dup
  _ << '-dGraphicsAlphaBits=4 -dUseTrimBox -sDEVICE=png16m -dBATCH '
  _ << '-sOutputFile="C:\ingrid\pdf\outputfile%d.png" '
  _ << '-c \"30000000 setvmthreshold\" '
  _ << '-f "'+this_pdf_file+'" '
  esystem _
end

.convert_this_ppt_file_to_a_pdf_file(i, use_this_format = 'pptx') ⇒ Object

#

PdfParadise.convert_this_ppt_file_to_a_pdf_file

This method will make use of libreoffice to convert .pptx or ppt files into .pdf files.

#


17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/pdf_paradise/toplevel_methods/convert_ppt_to_pdf.rb', line 17

def self.convert_this_ppt_file_to_a_pdf_file(
    i, use_this_format = 'pptx'
  )
  if i.is_a? Array
    i.each {|entry|
      convert_this_ppt_file_to_a_pdf_file(entry, use_this_format)
    }
  else
    cmd = 'libreoffice --headless --invisible --convert-to pdf *.'+use_this_format
    esystem cmd
  end
end

.darkolivegreen(i = '') ⇒ Object

#

PdfParadise.darkolivegreen

#


16
17
18
# File 'lib/pdf_paradise/colours/colours.rb', line 16

def self.darkolivegreen(i = '')
  ::Colours.darkolivegreen(i)
end

.delete_first_page_of_this_pdf_file(i = ARGV, &block) ⇒ Object

#

PdfParadise.delete_first_page_of_this_pdf_file

Easier method-way to invoke the above class.

#


417
418
419
420
421
# File 'lib/pdf_paradise/utility_scripts/delete_the_first_page_of_this_pdf_file/delete_the_first_page_of_this_pdf_file.rb', line 417

def self.delete_first_page_of_this_pdf_file(
    i = ARGV, &block
  )
  PdfParadise::DeleteTheFirstPageOfThisPdfFile.new(i, &block)
end

.delete_last_page_of_this_pdf_file(i = ARGV) ⇒ Object

#

PdfParadise.delete_last_page_of_this_pdf_file

Easier method-way to invoke the above class.

#


171
172
173
# File 'lib/pdf_paradise/utility_scripts/delete_last_page_of_this_pdf_file.rb', line 171

def self.delete_last_page_of_this_pdf_file(i = ARGV)
  PdfParadise::DeleteLastPageOfThisPdfFile.new(i)
end

.djvu_to_pdf(i) ⇒ Object

#

PdfParadise.djvu_to_pdf

This method can be used to convert a .djvu file to a .pdf file.

#


67
68
69
70
71
72
73
74
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 67

def self.djvu_to_pdf(i)
  if i.is_a? Array
    i = i.join(' ').strip
  end
  output_file = 'output_file.pdf'
  esystem "djvups #{i} | ps2pdf - #{output_file}"
  return output_file
end

.do_require_the_utility_scriptsObject

#

PdfParadise.do_require_the_utility_scripts

#


144
145
146
147
148
149
150
151
152
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 144

def self.do_require_the_utility_scripts
  Dir[project_base_directory?+'utility_scripts/*.rb'].each {|entry|
    require "pdf_paradise/utility_scripts/#{File.basename(entry)}"
  }
  # ======================================================================= #
  # And some ad-hoc requires:
  # ======================================================================= #
  require 'pdf_paradise/utility_scripts/delete_the_first_page_of_this_pdf_file/delete_the_first_page_of_this_pdf_file.rb'
end

.does_this_pdf_file_have_a_title?(i) ⇒ Boolean

#

PdfParadise.does_this_pdf_file_have_a_title?

This method can be used to query whether a given .pdf file has a title or whether it does not.

Usage examples:

PdfParadise.does_this_pdf_file_have_a_title? "foobar.pdf" # => true
PdfParadise.has_title? "foobar.pdf" # => true
#

Returns:

  • (Boolean)


162
163
164
# File 'lib/pdf_paradise/toplevel_methods/query_pdf_title.rb', line 162

def self.does_this_pdf_file_have_a_title?(i)
  !query_pdf_title(i).empty?
end

.e(i = '') ⇒ Object

#

PdfParadise.e

#


12
13
14
# File 'lib/pdf_paradise/toplevel_methods/e.rb', line 12

def self.e(i = '')
  puts i
end

.embeddable_interfaceObject

#

PdfParadise.embeddable_interface

This method can be used to “embed” a fake-object that implements the module defined above.

#


383
384
385
386
387
# File 'lib/pdf_paradise/sinatra/embeddable_interface.rb', line 383

def self.embeddable_interface
  object = Object.new
  object.extend(PdfParadise::EmbeddableInterface)
  return object
end

.ensure_that_the_log_directory_existsObject

#

PdfParadise.ensure_that_the_log_directory_exists

#


123
124
125
126
127
128
129
130
131
132
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 123

def self.ensure_that_the_log_directory_exists
  require 'fileutils'
  log_dir = PdfParadise.log_dir?
  unless File.directory? log_dir
    begin
      FileUtils.mkdir_p(log_dir)
      return log_dir # And return it here, just in case.
    rescue LoadError; end
  end
end

.esystem(i) ⇒ Object

#

PdfParadise.esystem

#


15
16
17
18
# File 'lib/pdf_paradise/toplevel_methods/esystem.rb', line 15

def self.esystem(i)
  e "#{rev}#{i}"
  system i
end

.file_all_currently_opened_pdf_files?Boolean

#

PdfParadise.file_all_currently_opened_pdf_files?

#

Returns:

  • (Boolean)


140
141
142
# File 'lib/pdf_paradise/toplevel_methods/opened_pdf_files.rb', line 140

def self.file_all_currently_opened_pdf_files?
  FILE_ALL_CURRENTLY_OPENED_PDF_FILES
end

.file_main_pdf_yaml_file?Boolean

#

PdfParadise.file_main_pdf_yaml_file?

This method will return a String such as ‘/home/x/programming/ruby/src/roebe/lib/roebe/yaml/main_pdf.yml’.

#

Returns:

  • (Boolean)


49
50
51
# File 'lib/pdf_paradise/constants/constants.rb', line 49

def self.file_main_pdf_yaml_file?
  MAIN_PDF_YAML_FILE
end

.file_working_on_these_pdf_filesObject

#

PdfParadise.file_working_on_these_pdf_files

This method will return a String such as ‘/usr/lib/ruby/site_ruby/3.1.0/pdf_paradise/yaml/working_on_these_pdf_files.yml’.

#


59
60
61
62
63
64
65
# File 'lib/pdf_paradise/constants/constants.rb', line 59

def self.file_working_on_these_pdf_files
  unless ::PdfParadise.respond_to?(:project_base_directory?)
    require 'pdf_paradise/project/project.rb'
  end
  project_base_directory?+
  'yaml/working_on_these_pdf_files.yml'
end

.gold(i = '') ⇒ Object

#

PdfParadise.gold

#


12
13
14
15
16
17
# File 'lib/pdf_paradise/commandline/help.rb', line 12

def self.gold(i = '')
  if Object.const_defined? :Colours
    i = Colours.gold(i)
  end
  return i
end

.is_on_roebe?Boolean

#

PdfParadise.is_on_roebe?

#

Returns:

  • (Boolean)


13
14
15
# File 'lib/pdf_paradise/toplevel_methods/roebe.rb', line 13

def self.is_on_roebe?
  ENV['IS_ROEBE'].to_s == '1'
end

.is_on_windows?Boolean

#

PdfParadise.is_on_windows?

#

Returns:

  • (Boolean)


193
194
195
196
197
198
199
200
201
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 193

def self.is_on_windows?
  case RUBY_PLATFORM
  when /win/,
       /mingw/
    true
  else
    false
  end
end

.log_dir?Boolean

#

PdfParadise.log_dir?

This method must return a proper temp-dir (temporary directory), both on a Linux system, as well as on a windows system.

Why is this necessary?

Some operations of the pdf_paradise gem require access to such a a temp-directory.

#

Returns:

  • (Boolean)


215
216
217
218
219
220
221
222
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 215

def self.log_dir?
  _ = '/tmp/pdf_paradise/' # This is the default. It should work on Linux.
  _ = Dir.tmpdir
  _ = ENV['TEMP_DIR'].dup if ENV['TEMP_DIR']
  _ = _.dup
  _ << '/pdf_paradise/' unless _.end_with? 
  return _.squeeze('/')
end

.main_directory?Boolean

#

PdfParadise.main_directory?

#

Returns:

  • (Boolean)


39
40
41
# File 'lib/pdf_paradise/constants/constants.rb', line 39

def self.main_directory?
  AUTOCONVERT_PDF_FILES_RESIDING_IN_THIS_DIRECTORY
end

.main_pdf(i = ARGV, &block) ⇒ Object

#

PdfParadise.main_pdf

#


459
460
461
# File 'lib/pdf_paradise/main_pdf/main_pdf.rb', line 459

def self.main_pdf(i = ARGV, &block)
  ::PdfParadise::MainPdf.new(i, &block)
end

.mega_check_every_pdf_file_in_the_current_directoryObject

#

PdfParadise.mega_check_every_pdf_file_in_the_current_directory

#


17
18
19
20
# File 'lib/pdf_paradise/commandline/commandline.rb', line 17

def self.mega_check_every_pdf_file_in_the_current_directory
  require 'pdf_paradise/utility_scripts/check_syntax_of_pdf_files.rb'
  PdfParadise::CheckSyntaxOfPdfFiles.new(:work_on_every_pdf_file_in_the_current_working_directory)
end
#

PdfParadise.menu (menu tag)

#


19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/pdf_paradise/commandline/menu.rb', line 19

def self.menu(i)
  if i.is_a? Array
    i.each {|entry| menu(entry) }
  else
    case i # case tag
    # ===================================================================== #
    # === pdfpa --mega-checker
    #
    # Invocation examples:
    #
    #   pdf_paradise --mega-checker
    #   pdf_paradise --super-check
    #   pdf_paradise --check-every-pdf-file
    #
    # ===================================================================== #
    when /^-?-?mega(-|_)?checker$/i,
         /^-?-?super(-|_)?check$/i,
         /^-?-?check(-|_)?every(-|_)?pdf(-|_)?file$/i
      mega_check_every_pdf_file_in_the_current_directory
    # ===================================================================== #
    # === pdfpa --jruby
    #
    # Invocation example:
    #
    #   jruby /usr/bin/pdf_paradise --jruby1
    #
    # ===================================================================== #
    when /^-?-?jruby1?$/
      require 'pdf_paradise/gui/jruby/delete_the_first_or_the_last_page_of_this_pdf_file/delete_the_first_or_the_last_page_of_this_pdf_file.rb'
      start_the_jruby_interface_for_deleting_pages_in_a_pdf_file
    # ===================================================================== #
    # === pdfpa --libui1
    # ===================================================================== #
    when /^-?-?libui1$/
      require 'pdf_paradise/gui/libui/remove_the_first_page_of_this_pdf_file/remove_the_first_page_of_this_pdf_file.rb'
      PdfParadise::GUI::LibUI::RemoveTheFirstPageOfThisPdfFile.new      
    # ===================================================================== #
    # === pdfpa --libui
    #
    # This entry point will always refer to the most important 
    # libui widget.
    # ===================================================================== #
    when /^-?-?libui$/
      start_the_most_important_libui_wrapper(commandline_arguments?)
    # ===================================================================== #
    # === pdfpa --open-pdf-files
    # ===================================================================== #
    when /^-?-?open(-|_)?pdf(-|_)?files$/
      open_the_default_pdf_files
    # ===================================================================== #
    # === pdfparadise --controller
    # ===================================================================== #
    when /^-?-?controller$/
      require 'pdf_paradise/gui/gtk3/controller/controller.rb'
      PdfParadise::GUI::Gtk::Controller.run
    # ===================================================================== #
    # === --use-this-pdf-file=DONE_Life_History_Evolution_WS_17_4.pdf
    # ===================================================================== #
    when /^-?-?use(-|_)?this(-|_)?pdf(-|_)?file=(.+)$/, # === $4
         /^-?-?set(-|_)?pdf(-|_)?title=(.+)$/,          # === $3
         /^-?-?use(-|_)?this(-|_)?title=(.+)$/          # === $4
      i = $3 # <- This is for the second line ^^^.
      i = $4 if $4 # <- And this is for the first line.
      set_use_this_pdf_file(i)
    # ===================================================================== #
    # === pdf_paradise --sinatra
    # ===================================================================== #
    when /^-?-?sinatra$/i,
         /^-?-?www$/i # === pdf_paradise --www
      require 'pdf_paradise/www/sinatra/app.rb'
      PdfParadise.start_sinatra_interface
    # ===================================================================== #
    # === pdf_paradise --autoconvert
    # ===================================================================== #
    when /^-?-?autoconvert$/i
      autoconvert_pdf_files_in_the_main_directory
    # ===================================================================== #
    # === pdf_paradise --gui
    # === pdf_paradise --gtk
    # ===================================================================== #
    when /^-?-?gui$/,
         /^-?-?gtk$/
      require 'pdf_paradise/gui/gtk2/split_pdf_file/split_pdf_file.rb'
      PdfParadise.start_gtk_gui
    # ===================================================================== #
    # === pdf_paradise --show_last_opened_pdf_files
    # ===================================================================== #
    when /^-?-?show(-|_)?last(-|_)?opened(-|_)?pdf(-|_)?files$/i,
         /^-?-?pdf(-|_)?file(-|_)?content$/i, # pdfparadise --pdf-file-content
         /^-?-?last(-|_)?open(-|_)?pdf\??$/i,
         /^-?-?last-pdf$/i,
         /^-?-?last\??$/i,
         /^-?-?pdf\??$/i # pdfparadise --pdf?
      PdfParadise.show_last_opened_pdf_files
    # ===================================================================== #
    # === pdfparadise --store-open-pdf-files
    # ===================================================================== #
    when /^-?-?store(-|_| )?open(-|_| )?pdf(-|_| )?files$/,
         /^-?-?store(-|_| )?open(-|_| )?pdfs?$/,
         /^-?-?store(-|_| )?pdf(-|_| )?files$/,
         /^-?-?store(-|_| )?pdfs$/
      PdfParadise.store_all_currently_open_pdf_files
    # ===================================================================== #
    # === pdf_paradise --array-all-currently-opened-pdf-files
    # ===================================================================== #
    when /^-?-?array(-|_| )?all(-|_| )?currently(-|_| )?opened(-|_| )?pdf(-|_| )?files$/i,
         /^-?-?show(-|_| )?currently(-|_| )?open(-|_| )?pdf(-|_| )?files$/i
      PdfParadise.return_array_of_all_currently_opened_pdf_files(:do_not_run_locate).each {|entry|
        e entry
      }
    # ===================================================================== #
    # === pdfparadise --open-last-pdf-files
    # ===================================================================== #
    when /^-?-?open(-|_| )?last(-|_| )?pdf(-|_| )?files$/,
         /^-?-?open(-|_| )?last(-|_| )?opened(-|_| )?pdf(-|_| )?files$/,
         /^-?-?open(-|_| )?last(-|_| )?pdfs$/,
         /^-?-?main$/, # <- This is the main task (main tag)
         /^-?-?restore$/
      PdfParadise.open_last_opened_pdf_files
    # ===================================================================== #
    # === pdf_paradise --shrink-pdf-size-of=foobar.pdf
    # ===================================================================== #
    when /^-?-?shrink(-|_)?pdf(-|_)?size(-|_)?of=(.+)/i,
         /^-?-?shrink=(.+)/i
      this_file = $1.to_s.dup
      this_file = $4.to_s.dup if $4
      reduce_size_of_this_pdf_file(this_file)
    # ===================================================================== #
    # === pdf_paradise --help
    # ===================================================================== #
    when /^-?-?help/
      show_help
    # ===================================================================== #
    # === --set_title="Hello world!"
    # ===================================================================== #
    when /^--set(-|_)?title=(.+)$/,
         /^--title=(.+)$/
      # =================================================================== #
      # @use_this_pdf_file has to have been set properly before calling
      # this method.
      # =================================================================== #
      i = $1
      i = $2 if $2
      PdfParadise.set_title_of_this_pdf_file(@use_this_pdf_file, i)
    else
      e "Unknown command: #{i}" unless File.exist?(i)
    end
  end
end

.n_pdf_files_in_this_directory(i) ⇒ Object

#

PdfParadise.n_pdf_files_in_this_directory

#


56
57
58
59
60
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 56

def self.n_pdf_files_in_this_directory(
    i
  )
  Dir[i+'**/**.pdf'].size
end

.number_pages(*these_pdf_files) ⇒ Object

#

PdfParadise.number_pages

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/pdf_paradise/toplevel_methods/number_pages.rb', line 14

def self.number_pages(*these_pdf_files)
  begin
    require 'combine_pdf'
  rescue LoadError; end
  use_this_font_size = 30
  these_pdf_files.flatten.each {|this_pdf_file|
    pdf = CombinePDF.load(this_pdf_file)
    pdf.number_pages(
      location: :bottom_right,
      font_size: use_this_font_size,
      number_format: ' %s ',
      margin_from_height:  5, # The default here is 45 normally.
      margin_from_side:   10  # The default here is 15 normally. 
    )
    store_into = this_pdf_file.sub(/\.pdf$/,'')+'_numbered.pdf'
    e "Storing into #{store_into}"
    pdf.save store_into
  }
end

.number_this_pdf_file(this_pdf_file, font_size_to_use = 30) ⇒ Object

#

PdfParadise.number_this_pdf_file

This method can be used to number a given .pdf file - that is to add numbers to this file, typically on the bottom right area (by default).

Specific usage example:

PdfParadise.number_this_pdf_file('foobar.pdf')
#


87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 87

def self.number_this_pdf_file(
    this_pdf_file,
    font_size_to_use = 30
  )
  [this_pdf_file].flatten.each {|pdf_file|
    x = pdf_file
    require 'combine_pdf'
    pdf = CombinePDF.load(x)
    pdf.number_pages(
      location:      [:bottom_right],
      number_format: ' %s ',
      border_width:  1,
      font_size:     font_size_to_use
    )
    pdf.save "numbered_pages.pdf"
  }
end

.open_last_opened_pdf_files(pdf_viewer_to_use = PdfParadise.pdf_viewer?) ⇒ Object

#

PdfParadise.open_last_opened_pdf_files (open tag)

This method will try to open all the last opened .pdf files. This functionality depends on having stored these .pdf files in a local file, which presently has to be done manually (e. g. via the commandline) rather than automatically.

Invocation example from the commandline:

pdfparadise --open-last-pdf-files
#


99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/pdf_paradise/toplevel_methods/opened_pdf_files.rb', line 99

def self.open_last_opened_pdf_files(
    pdf_viewer_to_use = PdfParadise.pdf_viewer?
  )
  _ = FILE_ALL_CURRENTLY_OPENED_PDF_FILES
  if File.exist? _
    dataset = YAML.load_file(_)
    dataset.each {|this_pdf_file|
      if File.exist? this_pdf_file
        esystem pdf_viewer_to_use+' "'+this_pdf_file+'" &'
      else
        e "No file exists at `#{::Colours.sfile(this_pdf_file)}`."
      end
    }
  else
    e 'No file exists at `'+sfile(_)+'`.'
  end
end

.open_the_default_pdf_files(use_this_file = ::PdfParadise.file_working_on_these_pdf_files) ⇒ Object

#

PdfParadise.open_the_default_pdf_files

To invoke this method, do:

pdfpa --open-pdf-files
#


88
89
90
91
92
93
94
95
96
97
# File 'lib/pdf_paradise/commandline/commandline.rb', line 88

def self.open_the_default_pdf_files(
    use_this_file = ::PdfParadise.file_working_on_these_pdf_files
  )
  if File.exist? use_this_file
    dataset = YAML.load_file(use_this_file)
    dataset.each {|file|
      esystem "atril #{file} &"
    }
  end
end

.pdf_has_no_title?(i) ⇒ Boolean

#

PdfParadise.pdf_has_no_title?

#

Returns:

  • (Boolean)


169
170
171
# File 'lib/pdf_paradise/toplevel_methods/query_pdf_title.rb', line 169

def self.pdf_has_no_title?(i)
  !does_this_pdf_file_have_a_title?(i)
end

.pdf_to_text(i = ARGV) ⇒ Object

#

PdfParadise.pdf_to_text

#


171
172
173
# File 'lib/pdf_paradise/utility_scripts/convert_pdf_to_text.rb', line 171

def self.pdf_to_text(i = ARGV)
  PdfParadise::ConvertPdfToText.new(i)
end

.pdf_viewer?(i = file_main_pdf_yaml_file?) ) ⇒ Boolean

#

PdfParadise.pdf_viewer?

Use the default and registered .pdf viewer.

#

Returns:

  • (Boolean)


72
73
74
# File 'lib/pdf_paradise/constants/constants.rb', line 72

def self.pdf_viewer?(i = file_main_pdf_yaml_file?)
  YAML.load_file(i)
end

.project_base_dir?Boolean

#

PdfParadise.project_base_dir?

#

Returns:

  • (Boolean)


18
19
20
# File 'lib/pdf_paradise/project/project.rb', line 18

def self.project_base_dir?
  PROJECT_BASE_DIRECTORY
end

.query_pdf_title(i) ⇒ Object

#

PdfParadise.query_pdf_title

The input to this method should be an existing .pdf file.

It will call class QueryPdfTitle to determine the title of the .pdf file at hand.

This method will return a String if a title can be found in the .pdf file at hand.

Usage example:

title = PdfParadise.query_pdf_title('/foobar.pdf') # => "Lecture 2 - Scaling"
title = PdfParadise.return_title_of_this_pdf_file('')
#


190
191
192
# File 'lib/pdf_paradise/toplevel_methods/query_pdf_title.rb', line 190

def self.query_pdf_title(i)
  PdfParadise::QueryPdfTitle.new(i) { :be_quiet }.string?
end

.reduce_size_of_this_pdf_file(this_pdf_file) ⇒ Object

#

PdfParadise.reduce_size_of_this_pdf_file

This method can be used to reduce the size of the passed .pdf file.

This functionality depends on ghostscript (on the “gs” binary, specifically).

#


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/pdf_paradise/toplevel_methods/reduce_size_of_this_pdf_file.rb', line 23

def self.reduce_size_of_this_pdf_file(this_pdf_file)
  if this_pdf_file.is_a? Array
    this_pdf_file.each {|entry|
      reduce_size_of_this_pdf_file(entry)
    }
  else
    guessed_name = File.basename(this_pdf_file).sub(/#{File.extname(this_pdf_file)}$/,'').dup
    name_of_the_output_file = "output_#{guessed_name}".dup
    name_of_the_output_file << '.pdf' unless name_of_the_output_file.end_with?('.pdf')
    e
    e 'Trying to reduce the size of the file '+this_pdf_file+' next:'
    e
    _ = 'gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 '\
        '-dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH '\
        '-sOutputFile='+name_of_the_output_file+' '+this_pdf_file
    Esystem.esystem(_)
  end
end

.remove_html(i) ⇒ Object

#

PdfParadise.remove_html

Usage example:

PdfParadise.remove_html('<one>two</three>')
#


113
114
115
116
117
118
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 113

def self.remove_html(i)
  i.gsub(
    %r{<[^>]+>},
    ''
  )
end

.remove_image(from_this_pdf_file = ARGV) ⇒ Object

#

PdfParadise.remove_image

#


102
103
104
# File 'lib/pdf_paradise/utility_scripts/remove_images.rb', line 102

def self.remove_image(from_this_pdf_file = ARGV)
  RemoveImage.new(from_this_pdf_file)
end

.remove_this_page_of_that_pdf_file(this_page, that_pdf_file, &block) ⇒ Object

#

PdfParadise.remove_this_page_of_that_pdf_file

This method must be able to respond to symbols, such as :do_not_overwrite_the_original_pdf_file.

#


319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/pdf_paradise/utility_scripts/delete_this_page_of_this_pdf_file.rb', line 319

def self.remove_this_page_of_that_pdf_file(
    this_page,
    that_pdf_file,
    &block
  )
  _ = PdfParadise::DeleteThisPageOfThisPdfFile.new { :do_not_run_yet } 
  _.set_pdf_file(that_pdf_file)
  _.set_remove_this_pdf_page(this_page)
  # ========================================================================= #
  # === Handle blocks given to this method
  # ========================================================================= #
  if block_given?
    yielded = yield
    case yielded
    # ======================================================================= #
    # === :do_not_overwrite_the_original_pdf_file
    # ======================================================================= #
    when :do_not_overwrite_the_original_pdf_file
      _.do_not_overwrite_the_original_pdf_file
    end
  end
  _.run
end

.report_which_pdf_viewer_is_in_useObject

#

PdfParadise.report_which_pdf_viewer_is_in_use

This method will simply report which pdf-viewer is in use.

#


159
160
161
162
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 159

def self.report_which_pdf_viewer_is_in_use
  e "#{Colours.rev}The current pdf-viewer in use is "\
    "#{Colours.sfancy(PdfParadise.pdf_viewer?)}."
end

.return_array_of_all_currently_opened_pdf_files(also_run_locate = false) ⇒ Object

#

PdfParadise.return_array_of_all_currently_opened_pdf_files

To view this array on the commandline, do:

pdf_paradise --array-all-currently-opened-pdf-files

The second argument is a bit buggy and slow, so I disabled it as of 27.12.2018. It may be re-enabled at a later time (or removed altogether).

Usage example from ruby code:

array = PdfParadise.return_array_of_all_currently_opened_pdf_files(:extensive)
#


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/pdf_paradise/toplevel_methods/opened_pdf_files.rb', line 37

def self.return_array_of_all_currently_opened_pdf_files(
    also_run_locate = false
  )
  case also_run_locate
  # ======================================================================= #
  # === :make_use_of_locate
  # ======================================================================= #
  when :make_use_of_locate,
       :extensive
    also_run_locate = true
  # ======================================================================= #
  # === :do_not_run_locate
  # ======================================================================= #
  when :do_not_run_locate
    also_run_locate = false
  end
  ps_ax_result = `ps ax`.split("\n").map(&:strip)
  array = ps_ax_result.select {|line|
    line.include? '.pdf'
  }.map {|inner_liner|
    # ===================================================================== #
    # A line here may look like this:
    #   10970 pts/25   Sl     0:38 evince DONE_MolBiol_?bungen_SS2017_Transfection_english_060220.pdf
    # For now we split on ' ' and just use the last part.
    # ===================================================================== #
    inner_line = inner_liner.split(' ').last.strip
    # ===================================================================== #
    # We will also try to locate the file, via "locate". This functionality
    # depends on findutils' "locate" binary and a prior run of "updatedb".
    # ===================================================================== #
    if also_run_locate
      run_this_command = "locate #{inner_line} 2>&1"
      # =================================================================== #
      # The command above ^^^ may look like this:
      #
      #   locate DONE_foobar_abc_2006.pdf 2>&1
      #
      # =================================================================== #
      result = `#{run_this_command}`.strip
      inner_line = result if result and result.include? inner_line
      if inner_line.include?('?') and !File.exist?(inner_line)
        inner_line.tr!('?','ä')
      end
    end
    inner_line
  }
  return array
end

.return_widget_about_this_pdf_fileObject

#

PdfParadise.return_widget_about_this_pdf_file

#


399
400
401
# File 'lib/pdf_paradise/gui/universal_widgets/statistics_widget/statistics_widget.rb', line 399

def self.return_widget_about_this_pdf_file
  ::PdfParadise::GUI::Gtk::StatisticsWidget.new
end

.return_widget_remove_first_page_of_pdf_fileObject

#

PdfParadise.return_widget_remove_first_page_of_pdf_file

#


752
753
754
# File 'lib/pdf_paradise/gui/universal_widgets/delete_the_first_or_the_last_page_of_this_pdf_file/delete_the_first_or_the_last_page_of_this_pdf_file.rb', line 752

def self.return_widget_remove_first_page_of_pdf_file
  ::PdfParadise::GUI::Gtk::DeleteTheFirstOrTheLastPageOfThisPdfFile.new
end

.revObject

#

PdfParadise.rev

#


23
24
25
# File 'lib/pdf_paradise/colours/colours.rb', line 23

def self.rev
  ::Colours.rev
end

.set_author(of_this_pdf_file, this_author = 'foobar') ⇒ Object

#

PdfParadise.set_author

This method can be used to set the author of a given .pdf file.

The external tool called “exiftool” is required for this.

#


45
46
47
48
49
50
51
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 45

def self.set_author(
    of_this_pdf_file,
    this_author = 'foobar'
  )
  _ = 'exiftool -Author="'+this_author+'" '+of_this_pdf_file
  esystem(_)
end

.set_commandline_arguments(i) ⇒ Object

#

PdfParadise.set_commandline_arguments

#


25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/pdf_paradise/commandline/commandline.rb', line 25

def self.set_commandline_arguments(i)
  i = [i].flatten.compact
  # ======================================================================= #
  # We will also check if a file with that name exists. If so we
  # will replace it via File.absolute_path().
  # ======================================================================= #
  i.map! {|entry|
    if File.exist?(entry)
      entry = File.absolute_path(entry)
    end
    entry
  }
  @commandline_arguments = i
end

.set_title_of_this_pdf_file(this_pdf_file, this_title = '') ⇒ Object

#

PdfParadise.set_title_of_this_pdf_file

You need to pass in two arguments to this module-method.

The first argument is the path to the .pdf file in question that you want to manipulate - that is, to change the title of said .pdf file.

The second argument is the new title of this .pdf file.

#


209
210
211
212
213
214
# File 'lib/pdf_paradise/set_pdf_title.rb', line 209

def self.set_title_of_this_pdf_file(
    this_pdf_file,
    this_title = ''
  )
  SetPdfTitle.new(this_pdf_file, this_title)
end

.set_use_this_file(i) ⇒ Object

#

PdfParadise.set_use_this_file

#


34
35
36
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 34

def self.set_use_this_file(i)
  @use_this_file = i
end

.set_use_this_pdf_file(i) ⇒ Object

#

PdfParadise.set_use_this_pdf_file

#


55
56
57
# File 'lib/pdf_paradise/commandline/commandline.rb', line 55

def self.set_use_this_pdf_file(i)
  @use_this_pdf_file = i.to_s.dup
end

.show_helpObject

#

PdfParadise.show_help

Show the documented help options of the PdfParadise project.

To invoke this method from the commandline, do:

pdf_paradise --help
#


29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/pdf_paradise/commandline/help.rb', line 29

def self.show_help
  e 'The available options are:'
  e
  e gold('  pdf_paradise --use-this-pdf-file=foobar.pdf --set_title="Hello world!"')
  e
  e "    ^^^ this can be used to modify a .pdf's title"
  e
  e gold('  pdf_paradise --shrink-pdf-size-of=foobar.pdf')
  e
  e "    ^^^ this can be used to shrinke a .pdf file"
  e
  e gold('  pdf_paradise --store-open-pdf-files')
  e
  e '    ^^^ store all currently open .pdf files into a local file.'
  e
  e gold('  pdf_paradise --open-last-pdf-files')
  e
  e '    ^^^ open the last opened .pdf files via a local PDF reader.'
  e
  e gold('  pdf_paradise --mega-checker') # === pdf_paradise --mega-checker
  e
  e '    ^^^ check every .pdf file in the current working directory for errors.'
  e
  e gold('  pdf_paradise --show_last_opened_pdf_files')
  e
  e '    ^^^ show which .pdf files were last open.'
  e
  e gold('  pdf_paradise --gui')
  e gold('  pdf_paradise --gtk')
  e
  e '    ^^^ to start the ruby-gtk2 bindings for the pdf_paradise.'
  e
  e gold('  pdf_paradise --autoconvert')
  e
  e '    ^^^ to autoconvert all .pdf files in the main directory '\
    'into standalone .pdf files.'
  e
  e gold('  pdf_paradise --sinatra')
  e
  e '    ^^^ start the (minimal) sinatra-interface of the pdf_paradise '\
    'project'
  e
  e gold('  pdf_paradise --libui')
  e
  e '    ^^^ start the libui GUI'
  e
end

.show_last_opened_pdf_filesObject

#

PdfParadise.show_last_opened_pdf_files

#


120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/pdf_paradise/toplevel_methods/opened_pdf_files.rb', line 120

def self.show_last_opened_pdf_files
  _ = FILE_ALL_CURRENTLY_OPENED_PDF_FILES
  if File.exist? _
    dataset = YAML.load_file(_)
    if dataset.empty?
      e 'No .pdf files have been registered as having been opened.'
    else
      e 'The following .pdf files have been opened:'
      e
      dataset.each {|this_pdf_file| e "  #{Colours.sfile(this_pdf_file)}" }
      e
    end
  else
    e 'No file exists at `'+_+'`.'
  end
end

.split_this_pdf_file(i = ARGV, split_into_n_pages = 1, store_in_this_directory = :default) ⇒ Object

#

PdfParadise.split_this_pdf_file

The first argument to this method should be the path to a locally existing .pdf file.

#


323
324
325
326
327
328
329
330
331
332
333
# File 'lib/pdf_paradise/utility_scripts/split_pdf.rb', line 323

def self.split_this_pdf_file(
    i                       = ARGV,
    split_into_n_pages      = 1,
    store_in_this_directory = :default
  )
  _ = PdfParadise::SplitPdf.new(i) {{
    split_into_n_pages:      split_into_n_pages,
    store_in_this_directory: store_in_this_directory
  }}
  _ # Return the object here.
end

.start_fox_guiObject

#

PdfParadise.start_fox_gui

#


65
66
67
68
69
70
71
# File 'lib/pdf_paradise/gui/fox/split_pdf_file.rb', line 65

def self.start_fox_gui
  Fox::FXApp.new { |app|
    PdfParadise::FOX::SplitPdfFile.new(app)
    app.create
    app.run
  }
end

.start_gtk_gui_remove_first_page_of_pdf_fileObject

#

PdfParadise.start_gtk_gui_remove_first_page_of_pdf_file

This is a simple toplevel method that can be used to start the gtk3-GUI.

#


762
763
764
765
766
767
768
769
770
# File 'lib/pdf_paradise/gui/universal_widgets/delete_the_first_or_the_last_page_of_this_pdf_file/delete_the_first_or_the_last_page_of_this_pdf_file.rb', line 762

def self.start_gtk_gui_remove_first_page_of_pdf_file
  require 'gtk_paradise/run'
  _ = PdfParadise::GUI::Gtk::DeleteTheFirstOrTheLastPageOfThisPdfFile.new
  r = ::Gtk.run
  _.set_parent_widget(r)
  r.easy_exit
  r << _
  r.top_left_then_run
end

.start_gtk_gui_statistics_widgetObject

#

PdfParadise.start_gtk_gui_statistics_widget

#


386
387
388
389
390
391
392
393
394
# File 'lib/pdf_paradise/gui/universal_widgets/statistics_widget/statistics_widget.rb', line 386

def self.start_gtk_gui_statistics_widget
  require 'gtk_paradise/run'
  r = ::Gtk.run
  _ = PdfParadise::GUI::Gtk::StatisticsWidget.new(r)
  r << _
  r.automatic_size
  r.automatic_title
  r.top_left_then_run
end

.start_sinatra_interfaceObject

#

PdfParadise.start_sinatra_interface

This method can be used to start the sinatra interface of the PdfParadise project.

#


295
296
297
298
# File 'lib/pdf_paradise/www/sinatra/app.rb', line 295

def self.start_sinatra_interface
  e 'Starting the sinatra-interface of the PdfParadise project next.'
  ::PdfParadise::Sinatra.run!
end

.start_the_jruby_interface_for_deleting_pages_of_a_pdf_fileObject

#

PdfParadise.start_the_jruby_interface_for_deleting_pages_of_a_pdf_file

#


157
158
159
# File 'lib/pdf_paradise/gui/jruby/delete_the_first_or_the_last_page_of_this_pdf_file/delete_the_first_or_the_last_page_of_this_pdf_file.rb', line 157

def self.start_the_jruby_interface_for_deleting_pages_of_a_pdf_file
  PdfParadise::GUI::Jruby::DeleteTheFirstOrTheLastPageOfThisPdfFile.new(ARGV).is_visible
end

.start_the_most_important_libui_wrapper(optional_commandline_arguments = nil) ⇒ Object

#

PdfParadise.start_the_most_important_libui_wrapper

#


102
103
104
105
106
107
# File 'lib/pdf_paradise/commandline/commandline.rb', line 102

def self.start_the_most_important_libui_wrapper(
    optional_commandline_arguments = nil
  )
  require 'pdf_paradise/gui/libui/extract_all_images_from_this_pdf_file/extract_all_images_from_this_pdf_file.rb'
  PdfParadise::GUI::LibUI::ExtractAllImagesFromThisPdfFile.new(optional_commandline_arguments)
end

.store_all_currently_opened_pdf_filesObject

#

PdfParadise.store_all_currently_opened_pdf_files

To invoke this method from the commandline, do:

pdfparadise --store-open-pdf-files
#


152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/pdf_paradise/toplevel_methods/opened_pdf_files.rb', line 152

def self.store_all_currently_opened_pdf_files
  begin
    require 'save_file'
  rescue LoadError; end
  array = return_array_of_all_currently_opened_pdf_files(:extensive)
  if array.empty?
    e 'No .pdf file is currently empty.'
  else
    # ===================================================================== #
    # Designate where to store the open .pdf files.
    # ===================================================================== #
    into = FILE_ALL_CURRENTLY_OPENED_PDF_FILES
    e 'All currently opened .pdf files will be stored into the file'
    e
    e "  `#{Colours.sfile(into)}`."
    e
    e 'These are the .pdf files that will be stored:'
    e
    array.each {|this_file|
      e "  #{Colours.sfile(this_file)}"
    }
    e
    what = YAML.dump(array)
    SaveFile.write_what_into(what, into)
    if is_on_roebe?
      update_main_pdf_entries(array)
      into = '/home/x/programming/ruby/src/pdf_paradise/lib/pdf_paradise/yaml/working_on_these_pdf_files.yml'
      e 'As we are on roebe, we will also store into the pdf-paradise'
      e "project's designated yaml file at:"
      e
      e "  #{Colours.sfile(into)}"
      e
      SaveFile.write_what_into(what, into)
    end
  end
end

.to_pdf(these_pdf_files = ARGV) ⇒ Object

#

PdfParadise.to_pdf

This method can, by using soffice, convert a file such as .docx into the corresponding .pdf file - all on the commandline.

#


106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/pdf_paradise/utility_scripts/to_pdf.rb', line 106

def self.to_pdf(
    these_pdf_files = ARGV
  )
  [these_pdf_files].flatten.compact.map {|this_pdf_file|
    if File.exist? this_pdf_file
      # ===================================================================== #
      # The soffice binary must exist in order for this functionality
      # to work.
      # ===================================================================== #
      _ = "soffice --headless --invisible --convert-to pdf #{this_pdf_file}"
      e _
      system _
      this_pdf_file # Return the path here, in case it has to be used.
    else
      e "No file exists at `#{this_pdf_file}.`"
      nil
    end
  }
end

.update_main_pdf_entries(use_this_array = :try_to_use_the_main_file) ⇒ Object

#

PdfParadise.update_main_pdf_entries

This method will update entries for e. g. openpdf1, openpdf2 and so forth.

#


196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/pdf_paradise/toplevel_methods/opened_pdf_files.rb', line 196

def self.update_main_pdf_entries(
    use_this_array = :try_to_use_the_main_file
  )
  begin
    require 'roebe/classes/open_pdf.rb'
  rescue LoadError; end
  unless use_this_array.is_a? Array
    case use_this_array
    when :try_to_use_the_main_file
      _ = file_all_currently_opened_pdf_files?
      if File.exist? _
        use_this_array = File.readlines(_).map(&:strip)
      end
    end
  end
  use_this_array.each_with_index {|pdf_location, pdf_number_to_use| pdf_number_to_use += 1
    Roebe.set_pdf_for_this_number(pdf_number_to_use, pdf_location)
  }
end

.use_which_file?Boolean

#

PdfParadise.use_which_file?

#

Returns:

  • (Boolean)


27
28
29
# File 'lib/pdf_paradise/toplevel_methods/misc.rb', line 27

def self.use_which_file?
  @use_this_file
end

.use_which_pdf_application_for_deleting_the_first_page_of_a_pdf_file?Boolean

#

PdfParadise.use_which_pdf_application_for_deleting_the_first_page_of_a_pdf_file?

Usage example:

PdfParadise.use_which_pdf_application_for_deleting_the_first_page_of_a_pdf_file? # => :hexapdf
#

Returns:

  • (Boolean)


407
408
409
410
# File 'lib/pdf_paradise/utility_scripts/delete_the_first_page_of_this_pdf_file/delete_the_first_page_of_this_pdf_file.rb', line 407

def self.use_which_pdf_application_for_deleting_the_first_page_of_a_pdf_file?
  _ = PdfParadise::DeleteTheFirstPageOfThisPdfFile.new(:do_not_run_yet)
  return _.use_this_pdf_application?
end

.use_which_pdf_viewer?Boolean

#

PdfParadise.use_which_pdf_viewer?

#

Returns:

  • (Boolean)


466
467
468
# File 'lib/pdf_paradise/main_pdf/main_pdf.rb', line 466

def self.use_which_pdf_viewer?
  return YAML.load_file(MAIN_PDF_YAML_FILE)
end