Created
February 19, 2012 20:12
-
-
Save bradediger/1865527 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obj = %{<< /Rect [ 330.521 116.285 346.958 128.321 ] /F 4 /T (Check Box1) /Subtype | |
/Widget /P 3 0 R /MK 139 0 R /AP 140 0 R /H /P /V / /AS /Off /FT /Btn /Type | |
/Annot >>} | |
buf = PDF::Reader::Buffer.new(StringIO.new(obj)) | |
parser = PDF::Reader::Parser.new(buf, nil) | |
parser.parse_token | |
# => {:Rect=>[330.521, 116.285, 346.958, 128.321], :F=>4, :T=>"Check Box1", :Subtype=>:Widget, :P=>#<PDF::Reader::Reference:0x000000012afd40 @id=3, @gen=0>, :MK=>#<PDF::Reader::Reference:0x000000012ad298 @id=139, @gen=0>, :AP=>#<PDF::Reader::Reference:0x000000012accd0 @id=140, @gen=0>, :H=>:P, :V=>:"", :AS=>:Off, :FT=>:Btn, :Type=>:Annot} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment