add samples, fixed silly bugs.

git-svn-id: https://pdfminerr.googlecode.com/svn/trunk/pdfminer@8 1aa58f4a-7d42-0410-adbc-911cccaed67c
pull/1/head
yusuke.shinyama.dummy 2007-12-31 05:02:15 +00:00
parent d558d31f26
commit a8bae61c25
5 changed files with 4 additions and 2 deletions

View File

@ -52,7 +52,8 @@ $ ./dumppdf.py foo.pdf
<p> <p>
<strong>Extract the text:</strong> <strong>Extract the text:</strong>
<blockquote><pre> <blockquote><pre>
$ ./pdf2txt.py foo.pdf &gt; foo.xml $ ./pdf2txt.py samples/naacl06-shinyama.pdf
$ ./pdf2txt.py -c euc-jp samples/jo.pdf
</pre></blockquote> </pre></blockquote>
<hr> <hr>

View File

@ -23,7 +23,7 @@ def dumpcdb(cmap, cdbfile, verbose=1):
def convert_cmap(files, cmapdir, cdbcmapdir, force=False): def convert_cmap(files, cmapdir, cdbcmapdir, force=False):
from cmap import CMapDB from cmap import CMapDB
CMapDB.initialize(cmapdir) CMapDB.initialize(cmapdir)
for fname in fiels: for fname in files:
cmapname = os.path.basename(fname) cmapname = os.path.basename(fname)
cdbname = os.path.join(cdbcmapdir, cmapname+'.cmap.cdb') cdbname = os.path.join(cdbcmapdir, cmapname+'.cmap.cdb')
if not force and os.path.exists(cdbname): if not force and os.path.exists(cdbname):

BIN
samples/jo.pdf Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
from struct import pack, unpack
## Utilities ## Utilities
## ##