0

C# を使用して、PDF ページで特定のチェック ボックスがオンになっているかどうかを確認したいと考えています。PDFファイルはフォームファイルではありません

PDF は次のようなものです。ここに画像の説明を入力

サンプル ファイルは次のとおりです: MDS30ResidentP2.pdf (このサンプル ファイルでは、質問 A1000 のチェック ボックス「E」がオンになっていることを何とか理解したいと思います。繰り返しますが、PDF は「フォーム」形式ではありません!)。

PS:次の投稿のどれも私の問題を解決しませんでした:

4

1 に答える 1

1

OCR is probably the only way. From the PDF perspective, there's a rectangle and some of those rectangles have two lines drawn through them. They're not even images but actual vector drawing commands. You could possibly look for that extra drawing of an "x" but it is unrelated to the text that appears beside it so'd have to write some fuzzy logic to estimate what "x" goes to what "text" and I think you'd end up with a bunch of false positives. If you've got a bunch of these PDFs it might be worth writing something, otherwise OCR or manual entry.

If you want to parse the PDF you can try something like this which is a little ugly but if you're parsing the same PDF over and over again it might work OK. If you want something more generic and reusable I would check out the creator of iText's post here. His post is for optional content groups but it should give you some ideas to start with.

于 2014-08-11T13:12:45.613 に答える