1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-05 01:28:39 +00:00

add a test script

This commit is contained in:
Lu Wang 2012-08-27 16:34:06 +08:00
parent 1ee8518096
commit 7a1983091a

18
test/test.py Executable file
View 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>')