mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
add a test script
This commit is contained in:
parent
1ee8518096
commit
7a1983091a
18
test/test.py
Executable file
18
test/test.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
|
||||
outf = open('out.html','w')
|
||||
|
||||
outf.write('<html><body><div style="position:absolute;top:0;left:0;width:80%;height:100%;"><iframe width="100%" height="100%" name="pdf"></iframe></div><div style="position:absolute;top:0;right:0;width:21%;height:100%;">')
|
||||
|
||||
for f in os.listdir('pdf'):
|
||||
if not f.lower().endswith('.pdf'):
|
||||
continue
|
||||
print f
|
||||
#os.system('pdf2htmlEX -l 3 --dest-dir html pdf/%s' % (f,))
|
||||
ff = f[:-3]+'html'
|
||||
outf.write('<a href="html/%s" target="pdf">%s</a><br/>' % (ff,ff))
|
||||
outf.flush();
|
||||
|
||||
outf.write('</div></body></html>')
|
Loading…
Reference in New Issue
Block a user