1- import pdf2html = require( ' pdf2html' ) ;
2- import { Readable } from ' stream' ;
1+ import pdf2html = require( " pdf2html" ) ;
2+ import { Readable } from " stream" ;
33
44// Test async conversion with callback
5- pdf2html ( ' test.pdf' , ( error , html ) => {
5+ pdf2html ( " test.pdf" , ( error , html ) => {
66 if ( error ) {
77 console . error ( error ) ;
88 return ;
@@ -12,17 +12,17 @@ pdf2html('test.pdf', (error, html) => {
1212
1313// Test async conversion with options
1414const options = {
15- binary : ' /usr/local/bin/pdftohtml' ,
15+ binary : " /usr/local/bin/pdftohtml" ,
1616 first_page : 1 ,
1717 last_page : 10 ,
1818 complex : true ,
1919 single_page : false ,
2020 no_background : true ,
2121 no_frames : true ,
22- zoom : 1.5
22+ zoom : 1.5 ,
2323} ;
2424
25- pdf2html ( ' test.pdf' , options , ( error , html ) => {
25+ pdf2html ( " test.pdf" , options , ( error , html ) => {
2626 if ( error ) {
2727 console . error ( error ) ;
2828 return ;
@@ -31,12 +31,12 @@ pdf2html('test.pdf', options, (error, html) => {
3131} ) ;
3232
3333// Test sync conversion
34- const htmlSync = pdf2html . pdf2htmlSync ( ' test.pdf' ) ;
34+ const htmlSync = pdf2html . pdf2htmlSync ( " test.pdf" ) ;
3535console . log ( htmlSync ) ;
3636
3737// Test with stream input
3838const stream = new Readable ( ) ;
39- stream . push ( ' PDF content' ) ;
39+ stream . push ( " PDF content" ) ;
4040stream . push ( null ) ;
4141
4242pdf2html ( stream , ( error , html ) => {
@@ -50,6 +50,6 @@ pdf2html(stream, (error, html) => {
5050// Test sync conversion with stream and options
5151const htmlStreamSync = pdf2html . pdf2htmlSync ( stream , {
5252 complex : true ,
53- zoom : 2.0
53+ zoom : 2.0 ,
5454} ) ;
55- console . log ( htmlStreamSync ) ;
55+ console . log ( htmlStreamSync ) ;
0 commit comments