Kevin,

 

Unfortunately i cannot send you a shorter pdf. I got the pdf from people using 
our software in Japan and complaining about iText not working. They sayd their 
pdfs are generated with some software, so I cannot recreate a shorter pdf.

But I attached the Unicode-file for the tic_dogu2 pdf (extracted with PDFlib, a 
commercial software).

 

Thanks + Greetings

 

Michael 

 

Dr. Michael Hoppe
ePublishing & eScience
Development & Applied Research
Phone +49 7247 808-251
Fax +49 7247 808-133
[email protected]


FIZ Karlsruhe
Hermann-von-Helmholtz-Platz 1
76344 Eggenstein-Leopoldshafen, Germany

www.fiz-karlsruhe.de <http://www.fiz-karlsruhe.de/> 

Von: Kevin Day [mailto:[email protected]] 
Gesendet: Freitag, 19. Dezember 2008 01:43
An: IText Questions
Betreff: Re: [iText-questions] extracting text from pdfs with japanese data

 

Michael-

 

Can you please send a PDF that uses the font in question, but is *simple* - 
maybe containing 2 lines with 3 or 4 words in each?

 

Also, please send a unicode file that has the text for those files.  I can't 
look at the fonts themselves and figure out whether the decoding I'm doing is 
actually working, but I can compare the results to a unicode file that has what 
the results should be.

 

- K

 

>      
>     ----------------------- Original Message -----------------------
>       
>     From: "Hoppe, Michael" <[email protected]> 
> <mailto:[email protected]>  
> <mailto:[email protected]> 
> <mailto:[email protected]>  
>     To: "Post all your questions about iText here" 
> <[email protected]> 
> <mailto:[email protected]>  
> <mailto:[email protected]> 
> <mailto:[email protected]>  
>     Cc: 
>     Date: Wed, 17 Dec 2008 17:12:58 +010 0
>     Subject: Re: [iText-questions] extracting text from 
> pdfs with japanese data
>       
>     Hi all,
>      
>     Attached see the Pdfs i had the problems with (I send 
> them once before)
>     content1.pdf gives : java.io.IOException: '>' not 
> expected at file pointer 39040
>     tic_dogu2.pdf gives java.lang.NullPointerException 
> because font is not embedded in pdf
>      
>     text from content1.pdf can get extracted with the adobe 
> viewer bean (another open source library that we don't want 
> to use for our project for various reasons) so I don't think 
> there is something wrong with the file itself.
>      
>    ;  Greetings
>      
>     Michael
>      
>     Dr. Michael Hoppe
>     ePublishing & eScience
>     Development & Applied Research
>     Phone +49 7247 808-251
>     Fax +49 7247 808-133
>     [email protected]
>     
>     
>     FIZ Karlsruhe
>     Hermann-von-Helmholtz-Platz 1
>     76344 Eggenstein-Leopoldshafen, Germany
>     
>     www.fiz-karlsruhe.de <http://www.fiz-karlsruhe.de/> 
> <http://www.f%0d%0a%20iz-karlsruhe.de/>  
>     Von: Kevin Day [mailto:[email protected]] 
> <mailto:[email protected]>  
>     Gesendet: Mittwoch, 17. Dezember 2008 15:31
>     An: IText Questions
>     Betreff: Re: [iText-questions] extracting text from 
> pdfs with japanese data
>      
>     CMapAwareDocumentFont has this parsing via the CMap 
> class - this encapsulates the parsing behind an object, and 
> makes it a lot easier to deal with.
>      
>     I think that the biggest thing here is actually finding 
> the appropriate CMap data byte stream (either from embedded 
> data in the PDF, or from the file system) - right now, 
> loca ting the CMap information is a weak point in the content parser.
>      
>     If the cmap data is included in a jar on the classpath, 
> then the CMap could absolutely be read from the jar.
>      
>     Can the OP please send a PDF that demonstrates the 
> issue?  I'll take a look at the font information and see how 
> tough it would be to add this type of lookup if TOUNICODE 
> isn't available.
>      
>     - K
>      
>     ----------------------- Original Message -----------------------
>       
>     From: "Paulo Soares" <[email protected]> <mailto:[email protected]>  
> <mailto:[email protected]> <mailto:psoa...@consist%0d%0a%20e.pt>  
>     To: "Post all your questions about iText here" 
> <[email protected]> 
> <mailto:[email protected]>  
> <mailto:[email protected]> 
> <mailto:[email protected]>  
>     Cc: 
>     Date: Tue, 16 Dec 2008 09:55:36 -0000
>     Subject: Re: [iText-questions] extracting text from 
> pdfs with japanese data
>       
>     There's code in PdfEncodings to parse and convert 
> to/from Unicode the cmaps. 
>     The font contains the cmap name.
>     
>     Paulo
>   &nb sp; 
>     ----- Original Message ----- 
>     From: "1T3XT info" <[email protected]> <mailto:[email protected]>  
> <mailto:[email protected]> <mailto:[email protected]>  
>     To: "Post all your questions about iText here" 
>     <[email protected]> 
> <mailto:[email protected]>  
> <mailto:[email protected]> 
> <mailto:[email protected]>  
>     Sent: Tuesday, December 16, 2008 9:19 AM
>     Subject: Re: [iText-questions] extracting text from 
> pdfs with japanese data
>     
>     
>     H oppe, Michael wro te:
>     > The CMap-files are included in the 
> iTextAsianCmaps.jar. So couldn't they
>     > be read from that jar in case there is no font 
> information in the pdf?
>     
>     I'm just thinking out loud here, I didn't dive into the 
> problem yet,
>     but: do you think it's possible for iText to find which 
> CMap-file is t o
>     be inspected based on the font information availa ble 
> in the PDF?
>     
>     As Kevin already said: this part of iText is pretty 
> new. We're all
>     excited about it, but for the moment it's all highly 
> experimental.
>     -- 
>     This answer is provided by 1T3XT BVBA
> &nbs p;   http://www.1t3xt.com/ - http://www.1t3xt.info


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, pleas e send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.




------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/

_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions 
<https://lists.sourceforge.net/lists/listinfo/itext-qu%0d%0a%20estions> 

Buy the iText book: http://www.1t3xt.com/docs/book.php



-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische 
Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 
101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinR Hermann Riehl.

は がくれ
◎エッセイ
技術者の道具箱 (2): Linux との巡り合わせは 葉隠 の如し
轟 眞市 物質・材料研究機構 光材料センター ∗
Shin-ichi TODOROKI
大雨の戒めということがある。道の途中でにわか
雨にあうと、濡れては困るとばかりに、急いで軒下
などに走ったりするが、濡れることには変わりない。
はじめから濡れてもかまわないと思っていれば、な
んの苦になることがあろうか。これはすべてのこと
に共通する心得である。
『葉隠』山本常朝、聞書第一 七九
さらば、Microsoft Windows
(現代語訳 本田有明 [1])
1999 年 6 月。今がその機だと確信した。学生時代
から愛用している組版処理システム、L ATEX を、それ
より後に使い始めた Windows 上で利用していたのだ
が、どうしても操作上の違和感を拭い去れないでい
た。しかし、それを上回る問題に直面し、覚悟を決
めた。
数年前から、ある学会の情報ネットワークを管理
する小委員会に参加していた。古株の先輩達は、会
員向けパソコン通信サービスを廃止し、代わりにイ
ンターネットのホームページによって情報発信する
体制を組みあげて、引退していった。
折りから、ネットワークに接続されたコンピュー
タのセキュリティ管理に注目が集まる様になり、管
理の甘さが深刻な問題を引き起こすことが認識され
始めていた。引き継いだサーバーは、導入当初こそ
画期的な存在だったものの、ネットワークが物騒に
なってしまったその時点では、とても満足に管理さ
れているとは思えないことが判明した。
現状の機能を維持して管理を外注するとなると、
少なくとも年間 300 万円は掛かるという。この学会
にそんな余裕は無い。となれば、自分が管理技術を
∗ 〒 305-0044 茨城県つくば市並木 1-1
fax 029-854-9060
URL: http://www.geocities.jp/tokyo 1406/
身に付けるしかない。しかし、Windows とは勝手が
異なる OS(オペレーティングシステム) が動いている
サーバーを手なずけられるだろうか?不安を抱えた
まま責任をかぶるのは精神衛生上よろしくない。そ
れならいっそ、進んで雨に濡れてしまおう。日常の
書き物や実験で使うパソコンも同じ OS にしてしま
えば、覚えるべき技術は一種類で済み、活用できる
局面は倍になる。
OS は Debian GNU/Linux に決めていた。原則とし
てフリーソフトウエアだけでまとめられた OS であ
り、その管理体制もボランティアベースではあるが
相当しっかりしている。加えて、日本語の解説本 [2]
が出版され始めた頃だった。早速、職場と自宅のパ
ソコンにインストールし、環境を整えていった。
Linux とは何か?
それは UNIX † と互換性を有する OS であり、1991
年にその最初のバージョンが公開された。開発したの
は、当時フィンランドの大学生だった Linus Torvalds
氏である。
彼はなぜ、既存の OS のクローンをわざわざ作っ
たのか?それは、UNIX のシンプルな美しさに魅せ
られた一方で、彼が大枚をはたいて購入した PC に、
唯一インストールできたある UNIX 互換 OS に満足
できなかったからだそうだ [3]。
フリーソフトウエアとして公開した Linux は一部
の熱狂的な支持を受け、世界中に散らばる有志によ
る草の根的共同開発の形で急速に進歩していった。
今では、パソコンを買うのに、Linux がプリインス
トールされたモデルを選ぶことができるまでに至っ
ている。
† 前回のエッセイ (2008 年 7 月号) で、筆者は UNIX を大学院
在籍中に使っていたことを述べた。
Materials Integration Vol.21 No.08 (2008) 65◎エッセイ
学会 Web サーバーの交換と改良
学会では新しい PC を購入してもらい、Debian
GNU/Linux をインストールして Web サーバーを立
ち上げた。古いサーバーの中身を移し替える作業等
を通じて、サーバ管理技術を身に付けていった。念
願の「ブラックボックスからの脱却」を果たし、時お
りアナウンスされるセキュリティ向上のためのアッ
プデートにも、すぐに追随できる体制を整えた。
次に取り組んだのが、会員限定で公開できるホー
ムページの仕組みづくりだった。特定のページを開
こうとするとパスワードの入力が求められる様にし
て、非会員との差別化を通じてサービスの充実を図
るのである。会員 ID とパスワードは既に会員に交
付してあり、学会の年会参加登録を業者がインター
ネット上でとりまとめるのに利用されていた。こち
ら側で追加すべき機能は、ID 情報を業者から自動的
に受け取ってパスワード認証に利用することだった。
Linux 上で使える秀逸なフリーソフトウエア達のお
蔭で、難なく実装することができた。
サーバ管理技術習得のご利益
認証機能付き Web サーバーを立ち上げるスキルを
身に付けたので、これを自分の仕事に活用すべく、実
験ノートの電子化に取り組んだ。研究所の LAN 内
にブログ ‡ サーバーを設置し、自分しかアクセス出来
ないようにパスワード認証機能を追加した。自宅の
PC とも同期する仕組みを整え、いつでもどこでも実
験ノートを記入・参照できるようになった。
それまでは、実験ノートをどこかに置き忘れたり、
昔の記述を捜し出すのに時間が掛かったりと、不便
を感じていた。電子化実験ノートでは全文検索機能
も使えるので、忘れて困ることは何でも書き留めて
おく習慣が付いた。
このノウハウをまとめて、材料関係の国際ワーク
ショップで発表した。ちょうど世界的にブログが注目
される時期と重なり、オンライン公開された英文予
稿にも自然と関心が集まった (和訳版は [4])。結果と
して、その雑誌のダウンロードランキング (2006 年
第 1 四半期) の 11 位に食い込むに至り、それが発端
‡ 2000 
年当時、ブログはまだ日本に上陸しておらず、日本で独
自に発展していた公開日記システムをインストールした。
図 1: 筆者が管理している現在の学会 Web サーバー。
となって、フリー百科事典『ウィキペディア』の実
験ノートの項目で紹介される事態にまで発展した。
先日、職場の若手研究者からぼやきを聞かされ
た。「雑用が僕んとこにばっかり降ってくるんです
よねー。」
説教じみてしまうので口にはしなかったが、筆者
の意見はひとつ。腰を据えて雨に濡れてみるのもま
た一興。
[参考文献]
[1] 本田 有明:“ヘタな人生論より葉隠”, 河出書房新
社 (2004).
[2] 芳尾 桂:“今日から Debian GNU/Linux”, オーム
社 (1999).
[3] リーナス トーバルズ, デイビッド ダイアモンド:
“それがぼくには楽しかったから”, 小学館プロダ
クション (2001). (風見 潤 訳、中島 洋 監訳).
[4] 轟 眞市, 小西 智也, 井上 悟:“ブログを基にした
実験ノート: 個人の研究活動を効率化する情報環
境”.
http://www.geocities.jp/tokyo 1406/04WCMST J.pdf
66 マテリアルインテグレーション Vol.21 No.08 (2008)
------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to