Seasons.NET

ちょっとした技術ブログです

Adobe Acrobat SDKでPDFからサムネイルを作る

結局は、クリップボード経由しろってか。。。
元々入っていたデータの復元をつけて実装もしないとね。


せめてCopyToClipboardの前後にクリップボードのロックができるようにしてほしかった。

CodeProjectから引用:

Although it looks like the pdfPage object has a DrawEx method that can take an HDC I couldn't get the method to work in a consistently successful way. Calling DrawEx in the paint event of a Windows Forms application did work but it still wouldn't write to an off-screen bitmap directly. Therefore the clipboard method is used and if the process runs on a batch server it won't cause too much worry.

これは、自分も試みたのですが、コンパチブルビットマップを作成して、そこに転送し、
そこから画素情報をひっぱりサムネイルを作るつもりでした。
ですが、これはサポートされていない行為っぽいです。
実際メソッドが失敗して返ってきます・・・ちくしょ〜〜〜!!

だから最近のAcrobat Readerは、IExtractImageが実装されていないんでしょうか。。。
PreviewHandlerはバリバリ実装しているくせに・・・