Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!-- inside examples/ folder -->
<!-- run `gulp dist-install` -->
<html>
<head>
<script src="../node_modules/pdfjs-dist/build/pdf.js"></script>
</head>
<body>
<script>
PDFJS.cMapUrl = "../node_modules/pdfjs-dist/cmaps/";
//PDFJS.cMapUrl = "https://npmcdn.com/pdfjs-dist/cmaps/";
//PDFJS.cMapUrl = "https://cdn.jsdelivr.net/package/npm/pdfjs-dist/cmaps/";
PDFJS.cMapPacked = true;
var data = new Uint8Array([37,80,68,70,45,49,46,51,10,51,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,80,97,103,101,10,47,80,97,114,101,110,116,32,49,32,48,32,82,10,47,82,101,115,111,117,114,99,101,115,32,50,32,48,32,82,10,47,67,111,110,116,101,110,116,115,32,52,32,48,32,82,62,62,10,101,110,100,111,98,106,10,52,32,48,32,111,98,106,10,60,60,47,70,105,108,116,101,114,32,47,70,108,97,116,101,68,101,99,111,100,101,32,47,76,101,110,103,116,104,32,55,55,62,62,10,115,116,114,101,97,109,10,120,156,51,82,240,226,50,208,51,53,87,40,231,114,10,81,208,119,51,84,48,50,208,51,48,80,8,73,83,112,13,1,9,25,89,232,25,155,42,152,91,26,235,25,155,43,132,164,40,104,156,187,116,248,248,182,61,167,142,239,186,117,230,233,245,107,154,10,33,89,32,149,0,152,1,23,53,10,101,110,100,115,116,114,101,97,109,10,101,110,100,111,98,106,10,49,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,80,97,103,101,115,10,47,75,105,100,115,32,91,51,32,48,32,82,32,93,10,47,67,111,117,110,116,32,49,10,47,77,101,100,105,97,66,111,120,32,91,48,32,48,32,53,57,53,46,50,56,32,56,52,49,46,56,57,93,10,62,62,10,101,110,100,111,98,106,10,53,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,10,47,83,117,98,116,121,112,101,32,47,84,121,112,101,48,10,47,66,97,115,101,70,111,110,116,32,47,186,218,204,229,45,71,66,75,112,45,69,85,67,45,72,10,47,69,110,99,111,100,105,110,103,32,47,71,66,75,112,45,69,85,67,45,72,10,47,68,101,115,99,101,110,100,97,110,116,70,111,110,116,115,32,91,54,32,48,32,82,93,10,62,62,10,101,110,100,111,98,106,10,54,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,10,47,83,117,98,116,121,112,101,32,47,67,73,68,70,111,110,116,84,121,112,101,48,10,47,66,97,115,101,70,111,110,116,32,47,186,218,204,229,10,47,67,73,68,83,121,115,116,101,109,73,110,102,111,32,60,60,47,82,101,103,105,115,116,114,121,32,40,65,100,111,98,101,41,32,47,79,114,100,101,114,105,110,103,32,40,71,66,49,41,32,47,83,117,112,112,108,101,109,101,110,116,32,50,62,62,10,47,70,111,110,116,68,101,115,99,114,105,112,116,111,114,32,55,32,48,32,82,10,47,87,32,91,49,32,91,50,48,55,32,50,55,48,32,51,52,50,32,52,54,55,32,52,54,50,32,55,57,55,32,55,49,48,32,50,51,57,32,51,55,52,32,51,55,52,32,52,50,51,32,54,48,53,32,50,51,56,32,51,55,53,32,50,51,56,32,51,51,52,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,50,51,56,32,50,51,56,32,54,48,53,32,54,48,53,32,54,48,53,32,51,52,52,32,55,52,56,32,54,56,52,32,53,54,48,32,54,57,53,32,55,51,57,32,53,54,51,32,53,49,49,32,55,50,57,32,55,57,51,32,51,49,56,32,51,49,50,32,54,54,54,32,53,50,54,32,56,57,54,32,55,53,56,32,55,55,50,32,53,52,52,32,55,55,50,32,54,50,56,32,52,54,53,32,54,48,55,32,55,53,51,32,55,49,49,32,57,55,50,32,54,52,55,32,54,50,48,32,54,48,55,32,51,55,52,32,51,51,51,32,51,55,52,32,54,48,54,32,53,48,48,32,50,51,57,32,52,49,55,32,53,48,51,32,52,50,55,32,53,50,57,32,52,49,53,32,50,54,52,32,52,52,52,32,53,49,56,32,50,52,49,32,50,51,48,32,52,57,53,32,50,50,56,32,55,57,51,32,53,50,55,32,53,50,52,32,53,50,52,32,53,48,52,32,51,51,56,32,51,51,54,32,50,55,55,32,53,49,55,32,52,53,48,32,54,53,50,32,52,54,54,32,52,53,50,32,52,48,55,32,51,55,48,32,50,53,56,32,51,55,48,32,54,48,53,93,93,62,62,10,101,110,100,111,98,106,10,55,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,68,101,115,99,114,105,112,116,111,114,10,47,70,111,110,116,78,97,109,101,32,47,186,218,204,229,10,47,70,108,97,103,115,32,54,10,47,70,111,110,116,66,66,111,120,32,91,48,32,45,50,48,48,32,49,48,48,48,32,57,48,48,93,10,47,73,116,97,108,105,99,65,110,103,108,101,32,48,10,47,65,115,99,101,110,116,32,56,48,48,10,47,68,101,115,99,101,110,116,32,45,50,48,48,10,47,67,97,112,72,101,105,103,104,116,32,56,48,48,10,47,83,116,101,109,86,32,53,48,10,62,62,10,101,110,100,111,98,106,10,56,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,10,47,83,117,98,116,121,112,101,32,47,84,121,112,101,48,10,47,66,97,115,101,70,111,110,116,32,47,186,218,204,229,44,66,111,108,100,45,71,66,75,112,45,69,85,67,45,72,10,47,69,110,99,111,100,105,110,103,32,47,71,66,75,112,45,69,85,67,45,72,10,47,68,101,115,99,101,110,100,97,110,116,70,111,110,116,115,32,91,57,32,48,32,82,93,10,62,62,10,101,110,100,111,98,106,10,57,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,10,47,83,117,98,116,121,112,101,32,47,67,73,68,70,111,110,116,84,121,112,101,48,10,47,66,97,115,101,70,111,110,116,32,47,186,218,204,229,44,66,111,108,100,10,47,67,73,68,83,121,115,116,101,109,73,110,102,111,32,60,60,47,82,101,103,105,115,116,114,121,32,40,65,100,111,98,101,41,32,47,79,114,100,101,114,105,110,103,32,40,71,66,49,41,32,47,83,117,112,112,108,101,109,101,110,116,32,50,62,62,10,47,70,111,110,116,68,101,115,99,114,105,112,116,111,114,32,49,48,32,48,32,82,10,47,87,32,91,49,32,91,50,48,55,32,50,55,48,32,51,52,50,32,52,54,55,32,52,54,50,32,55,57,55,32,55,49,48,32,50,51,57,32,51,55,52,32,51,55,52,32,52,50,51,32,54,48,53,32,50,51,56,32,51,55,53,32,50,51,56,32,51,51,52,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,50,51,56,32,50,51,56,32,54,48,53,32,54,48,53,32,54,48,53,32,51,52,52,32,55,52,56,32,54,56,52,32,53,54,48,32,54,57,53,32,55,51,57,32,53,54,51,32,53,49,49,32,55,50,57,32,55,57,51,32,51,49,56,32,51,49,50,32,54,54,54,32,53,50,54,32,56,57,54,32,55,53,56,32,55,55,50,32,53,52,52,32,55,55,50,32,54,50,56,32,52,54,53,32,54,48,55,32,55,53,51,32,55,49,49,32,57,55,50,32,54,52,55,32,54,50,48,32,54,48,55,32,51,55,52,32,51,51,51,32,51,55,52,32,54,48,54,32,53,48,48,32,50,51,57,32,52,49,55,32,53,48,51,32,52,50,55,32,53,50,57,32,52,49,53,32,50,54,52,32,52,52,52,32,53,49,56,32,50,52,49,32,50,51,48,32,52,57,53,32,50,50,56,32,55,57,51,32,53,50,55,32,53,50,52,32,53,50,52,32,53,48,52,32,51,51,56,32,51,51,54,32,50,55,55,32,53,49,55,32,52,53,48,32,54,53,50,32,52,54,54,32,52,53,50,32,52,48,55,32,51,55,48,32,50,53,56,32,51,55,48,32,54,48,53,93,93,62,62,10,101,110,100,111,98,106,10,49,48,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,68,101,115,99,114,105,112,116,111,114,10,47,70,111,110,116,78,97,109,101,32,47,186,218,204,229,44,66,111,108,100,10,47,70,108,97,103,115,32,54,10,47,70,111,110,116,66,66,111,120,32,91,48,32,45,50,48,48,32,49,48,48,48,32,57,48,48,93,10,47,73,116,97,108,105,99,65,110,103,108,101,32,48,10,47,65,115,99,101,110,116,32,56,48,48,10,47,68,101,115,99,101,110,116,32,45,50,48,48,10,47,67,97,112,72,101,105,103,104,116,32,56,48,48,10,47,83,116,101,109,86,32,53,48,10,62,62,10,101,110,100,111,98,106,10,49,49,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,10,47,83,117,98,116,121,112,101,32,47,84,121,112,101,48,10,47,66,97,115,101,70,111,110,116,32,47,186,218,204,229,44,73,116,97,108,105,99,45,71,66,75,112,45,69,85,67,45,72,10,47,69,110,99,111,100,105,110,103,32,47,71,66,75,112,45,69,85,67,45,72,10,47,68,101,115,99,101,110,100,97,110,116,70,111,110,116,115,32,91,49,50,32,48,32,82,93,10,62,62,10,101,110,100,111,98,106,10,49,50,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,10,47,83,117,98,116,121,112,101,32,47,67,73,68,70,111,110,116,84,121,112,101,48,10,47,66,97,115,101,70,111,110,116,32,47,186,218,204,229,44,73,116,97,108,105,99,10,47,67,73,68,83,121,115,116,101,109,73,110,102,111,32,60,60,47,82,101,103,105,115,116,114,121,32,40,65,100,111,98,101,41,32,47,79,114,100,101,114,105,110,103,32,40,71,66,49,41,32,47,83,117,112,112,108,101,109,101,110,116,32,50,62,62,10,47,70,111,110,116,68,101,115,99,114,105,112,116,111,114,32,49,51,32,48,32,82,10,47,87,32,91,49,32,91,50,48,55,32,50,55,48,32,51,52,50,32,52,54,55,32,52,54,50,32,55,57,55,32,55,49,48,32,50,51,57,32,51,55,52,32,51,55,52,32,52,50,51,32,54,48,53,32,50,51,56,32,51,55,53,32,50,51,56,32,51,51,52,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,50,51,56,32,50,51,56,32,54,48,53,32,54,48,53,32,54,48,53,32,51,52,52,32,55,52,56,32,54,56,52,32,53,54,48,32,54,57,53,32,55,51,57,32,53,54,51,32,53,49,49,32,55,50,57,32,55,57,51,32,51,49,56,32,51,49,50,32,54,54,54,32,53,50,54,32,56,57,54,32,55,53,56,32,55,55,50,32,53,52,52,32,55,55,50,32,54,50,56,32,52,54,53,32,54,48,55,32,55,53,51,32,55,49,49,32,57,55,50,32,54,52,55,32,54,50,48,32,54,48,55,32,51,55,52,32,51,51,51,32,51,55,52,32,54,48,54,32,53,48,48,32,50,51,57,32,52,49,55,32,53,48,51,32,52,50,55,32,53,50,57,32,52,49,53,32,50,54,52,32,52,52,52,32,53,49,56,32,50,52,49,32,50,51,48,32,52,57,53,32,50,50,56,32,55,57,51,32,53,50,55,32,53,50,52,32,53,50,52,32,53,48,52,32,51,51,56,32,51,51,54,32,50,55,55,32,53,49,55,32,52,53,48,32,54,53,50,32,52,54,54,32,52,53,50,32,52,48,55,32,51,55,48,32,50,53,56,32,51,55,48,32,54,48,53,93,93,62,62,10,101,110,100,111,98,106,10,49,51,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,68,101,115,99,114,105,112,116,111,114,10,47,70,111,110,116,78,97,109,101,32,47,186,218,204,229,44,73,116,97,108,105,99,10,47,70,108,97,103,115,32,54,10,47,70,111,110,116,66,66,111,120,32,91,48,32,45,50,48,48,32,49,48,48,48,32,57,48,48,93,10,47,73,116,97,108,105,99,65,110,103,108,101,32,48,10,47,65,115,99,101,110,116,32,56,48,48,10,47,68,101,115,99,101,110,116,32,45,50,48,48,10,47,67,97,112,72,101,105,103,104,116,32,56,48,48,10,47,83,116,101,109,86,32,53,48,10,62,62,10,101,110,100,111,98,106,10,49,52,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,10,47,83,117,98,116,121,112,101,32,47,84,121,112,101,48,10,47,66,97,115,101,70,111,110,116,32,47,186,218,204,229,44,66,111,108,100,73,116,97,108,105,99,45,71,66,75,112,45,69,85,67,45,72,10,47,69,110,99,111,100,105,110,103,32,47,71,66,75,112,45,69,85,67,45,72,10,47,68,101,115,99,101,110,100,97,110,116,70,111,110,116,115,32,91,49,53,32,48,32,82,93,10,62,62,10,101,110,100,111,98,106,10,49,53,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,10,47,83,117,98,116,121,112,101,32,47,67,73,68,70,111,110,116,84,121,112,101,48,10,47,66,97,115,101,70,111,110,116,32,47,186,218,204,229,44,66,111,108,100,73,116,97,108,105,99,10,47,67,73,68,83,121,115,116,101,109,73,110,102,111,32,60,60,47,82,101,103,105,115,116,114,121,32,40,65,100,111,98,101,41,32,47,79,114,100,101,114,105,110,103,32,40,71,66,49,41,32,47,83,117,112,112,108,101,109,101,110,116,32,50,62,62,10,47,70,111,110,116,68,101,115,99,114,105,112,116,111,114,32,49,54,32,48,32,82,10,47,87,32,91,49,32,91,50,48,55,32,50,55,48,32,51,52,50,32,52,54,55,32,52,54,50,32,55,57,55,32,55,49,48,32,50,51,57,32,51,55,52,32,51,55,52,32,52,50,51,32,54,48,53,32,50,51,56,32,51,55,53,32,50,51,56,32,51,51,52,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,52,54,50,32,50,51,56,32,50,51,56,32,54,48,53,32,54,48,53,32,54,48,53,32,51,52,52,32,55,52,56,32,54,56,52,32,53,54,48,32,54,57,53,32,55,51,57,32,53,54,51,32,53,49,49,32,55,50,57,32,55,57,51,32,51,49,56,32,51,49,50,32,54,54,54,32,53,50,54,32,56,57,54,32,55,53,56,32,55,55,50,32,53,52,52,32,55,55,50,32,54,50,56,32,52,54,53,32,54,48,55,32,55,53,51,32,55,49,49,32,57,55,50,32,54,52,55,32,54,50,48,32,54,48,55,32,51,55,52,32,51,51,51,32,51,55,52,32,54,48,54,32,53,48,48,32,50,51,57,32,52,49,55,32,53,48,51,32,52,50,55,32,53,50,57,32,52,49,53,32,50,54,52,32,52,52,52,32,53,49,56,32,50,52,49,32,50,51,48,32,52,57,53,32,50,50,56,32,55,57,51,32,53,50,55,32,53,50,52,32,53,50,52,32,53,48,52,32,51,51,56,32,51,51,54,32,50,55,55,32,53,49,55,32,52,53,48,32,54,53,50,32,52,54,54,32,52,53,50,32,52,48,55,32,51,55,48,32,50,53,56,32,51,55,48,32,54,48,53,93,93,62,62,10,101,110,100,111,98,106,10,49,54,32,48,32,111,98,106,10,60,60,47,84,121,112,101,32,47,70,111,110,116,68,101,115,99,114,105,112,116,111,114,10,47,70,111,110,116,78,97,109,101,32,47,186,218,204,229,44,66,111,108,100,73,116,97,108,105,99,10,47,70,108,97,103,115,32,54,10,47,70,111,110,116,66,66,111,120,32,91,48,32,45,50,48,48,32,49,48,48,48,32,57,48,48,93,10,47,73,116,97,108,105,99,65,110,103,108,101,32,48,10,47,65,115,99,101,110,116,32,56,48,48,10,47,68,101,115,99,101,110,116,32,45,50,48,48,10,47,67,97,112,72,101,105,103,104,116,32,56,48,48,10,47,83,116,101,109,86,32,53,48,10,62,62,10,101,110,100,111,98,106,10,50,32,48,32,111,98,106,10,60,60,47,80,114,111,99,83,101,116,32,91,47,80,68,70,32,47,84,101,120,116,32,47,73,109,97,103,101,66,32,47,73,109,97,103,101,67,32,47,73,109,97,103,101,73,93,10,47,70,111,110,116,32,60,60,10,47,70,49,32,53,32,48,32,82,10,47,70,50,32,56,32,48,32,82,10,47,70,51,32,49,49,32,48,32,82,10,47,70,52,32,49,52,32,48,32,82,10,62,62,10,62,62,10,101,110,100,111,98,106,10,49,55,32,48,32,111,98,106,10,60,60,10,47,80,114,111,100,117,99,101,114,32,40,70,80,68,70,32,49,46,53,50,41,10,47,67,114,101,97,116,105,111,110,68,97,116,101,32,40,68,58,50,48,49,51,48,55,50,57,48,49,53,57,51,50,41,10,62,62,10,101,110,100,111,98,106,10,49,56,32,48,32,111,98,106,10,60,60,10,47,84,121,112,101,32,47,67,97,116,97,108,111,103,10,47,80,97,103,101,115,32,49,32,48,32,82,10,47,79,112,101,110,65,99,116,105,111,110,32,91,51,32,48,32,82,32,47,70,105,116,72,32,110,117,108,108,93,10,47,80,97,103,101,76,97,121,111,117,116,32,47,79,110,101,67,111,108,117,109,110,10,62,62,10,101,110,100,111,98,106,10,120,114,101,102,10,48,32,49,57,10,48,48,48,48,48,48,48,48,48,48,32,54,53,53,51,53,32,102,32,10,48,48,48,48,48,48,48,50,51,51,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,51,55,50,53,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,48,48,48,57,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,48,48,56,55,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,48,51,50,48,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,48,52,52,50,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,48,57,57,48,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,49,49,53,49,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,49,50,55,56,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,49,56,51,50,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,49,57,57,57,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,50,49,51,48,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,50,54,56,55,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,50,56,53,54,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,50,57,57,49,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,51,53,53,50,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,51,56,52,53,32,48,48,48,48,48,32,110,32,10,48,48,48,48,48,48,51,57,50,50,32,48,48,48,48,48,32,110,32,10,116,114,97,105,108,101,114,10,60,60,10,47,83,105,122,101,32,49,57,10,47,82,111,111,116,32,49,56,32,48,32,82,10,47,73,110,102,111,32,49,55,32,48,32,82,10,62,62,10,115,116,97,114,116,120,114,101,102,10,52,48,50,54,10,37,37,69,79,70,10]);
PDFJS.getDocument(data).then(doc => doc.getPage(1)).
then(p => p.getTextContent()).
then(t => console.log(t.items[0].str));
</script>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.