File Coverage

blib/lib/WWW/Patent/Page/USPTO.pm
Criterion Covered Total %
statement 171 221 77.3
branch 42 82 51.2
condition 14 24 58.3
subroutine 16 17 94.1
pod n/a
total 243 344 70.6


line stmt bran cond sub pod time code
1              
2             package WWW::Patent::Page::USPTO;
3              
4             # Version 2006-04-04 H. Schier
5 5     5   32 use strict;
  5         10  
  5         485  
6 5     5   35 use warnings;
  5         9  
  5         170  
7 5     5   28 use diagnostics;
  5         10  
  5         48  
8 5     5   149 use Carp;
  5         21  
  5         352  
9             use subs
10 5         48 qw( methods USPTO_country_known USPTO_htm USPTO_tif USPTO_pdf USPTO_terms )
11 5     5   28 ; #USPTO_pdf
  5         12  
12 5     5   424 use LWP::UserAgent 2.003;
  5         169  
  5         230  
13             require HTTP::Request;
14 5     5   3712 use HTML::HeadParser;
  5         47735  
  5         159  
15 5     5   4361 use HTML::TokeParser;
  5         21657  
  5         218  
16 5     5   4635 use PDF::API2 2.00;
  5         1368654  
  5         201  
17 5     5   6405 use File::Temp 0.17;
  5         61472  
  5         601  
18             #use Data::Dumper;
19              
20             $| = 1 ;
21              
22 5     5   48 use vars qw/ $VERSION @ISA/;
  5         12  
  5         22189  
23              
24             $VERSION = "0.30";
25              
26             sub methods {
27             return (
28 5     5   58 'USPTO_htm' => \&USPTO_htm,
29             'USPTO_tif' => \&USPTO_tif,
30             'USPTO_pdf' => \&USPTO_pdf,
31             'USPTO_country_known' => \&USPTO_country_known,
32              
33             # 'USPTO_parse_doc_id' => \&USPTO_parse_doc_id,
34             'USPTO_terms' => \&USPTO_terms,
35             );
36              
37             }
38              
39             # sub USPTO_parse_doc_id{
40             # "All patent numbers must be 7 characters in length"
41             # well, maybe 7 or less...
42             # USPTO will give 692,301 for request of 692301 or 0692301
43             # Will respond to PN/D339456 (but not PN/D0339456)
44             # PN/D039456
45             # and PN/D39456 and 1 and 01
46             # Utility -- 5,146,634 6923014 0000001
47             # Design -- D339,456 D321987 D000152
48             # Plant -- PP08,901 PP07514 PP00003
49             # Reissue -- RE35,312 RE12345 RE00007
50             # Defensive Publication -- T109,201 T855019 T100001
51             # Statutory Invention Registration -- H001,523 H001234 H000001
52             # Re-examination -- RX29,194 RE29183 RE00125
53             # Additional Improvement -- AI00,002 AI000318 AI00007
54             # }
55              
56             sub USPTO_country_known {
57 0     0   0 my $self = shift @_;
58 0         0 my $country = shift;
59 0 0       0 if ( 'US' eq uc($country) ) { return ('1790 on'); }
  0         0  
60 0         0 else { carp 'US only!'; return undef }
  0         0  
61             }
62              
63             sub USPTO_htm {
64 12     12   16 my ( $self, $page_response ) = @_;
65 12         21 my $request;
66             my $request_text;
67 12 100 100     97 if ( ( !$self->{'patent'}->{'doc_type'} )
    100          
68             && ( length( $self->{'patent'}{'number'} ) == 11 ) )
69             {
70              
71             # Application (11 digits)
72 1         4 $request_text = 'http://appft1.uspto.gov/netacgi/nph-Parser?TERM1='
73             . $self->{'patent'}{'number'}
74             . '&Sect1=PTO1&Sect2=HITOFF&d=PG01&p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.html&r=0&f=S&l=50';
75 1         10 $request = HTTP::Request->new( 'GET' => $request_text );
76 1         145 my $intermediate = $self->request($request);
77 1         10 my $p = HTML::TokeParser->new( \$intermediate->content );
78 1         213 while ( my $token = $p->get_tag("a") ) {
79 19   100     3868 my $url = $token->[1]{href} || "-";
80 19         52 my $text = $p->get_trimmed_text("/a");
81 19 100 100     2132 if ( ( $url =~ m/$self->{'patent'}{'number'}/ )
82             && ( $text =~ m/$self->{'patent'}{'number'}/ ) )
83             {
84              
85             #warn "fully qualified? '$url'\n";
86 1         4 $request_text = 'http://appft1.uspto.gov/' . $url;
87 1         15 $request = HTTP::Request->new( 'GET' => $request_text );
88             }
89             }
90             }
91              
92             #http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PG01&p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.html&r=1&f=G&l=50&s1=%2220010000044%22.PGNR.&OS=DN/20010000044&RS=DN/20010000044
93             elsif ( $self->{'patent'}->{'doc_type'} ) {
94              
95             # Non-Utility Patent
96 7         31 $request_text
97             = "http://patft.uspto.gov/netacgi/nph-Parser?patentnumber=$self->{'patent'}->{'doc_type'}$self->{'patent'}{'number'}";
98 7         88 $request = HTTP::Request->new( 'GET' => $request_text );
99             }
100             else {
101              
102             #Standard Utility Patent
103 4         11 $request_text
104             = "http://patft.uspto.gov/netacgi/nph-Parser?patentnumber=$self->{'patent'}{'number'}";
105 4         46 $request = HTTP::Request->new( 'GET' => $request_text );
106             }
107              
108             # print "\nAlmost $self->{'retrieved_identifier'}->{'number'} \n";
109 12         21066 my $response = $self->request($request)
110             ; # use the agent to make the request and get the response
111             # print "\there\n";
112 12 50       54 if ( $response->is_success ) {
113 12         142 my $html = $response->content;
114              
115             # print "\n$html\n";
116 12         477 my $p = HTML::HeadParser->new;
117 12         2553 $p->parse( $response->content );
118 12         2978 my $entry;
119 12 100       53 if ( $entry = $p->header('Refresh') )
120             { # carp "no refresh seen via '$self->{'patent'}{'number'}' in \n'$html' " }
121 10         433 $entry =~ s/^.*?URL=//;
122 10         34 $entry = 'http://patft.uspto.gov' . $entry;
123              
124             # print "$entry\n";
125 10 50       173 $request = new HTTP::Request( 'GET' => "$entry" )
126             or carp "bad refresh";
127 10         3347 $response = $self->request($request);
128 10         274 $html = $response->content;
129             }
130              
131 12 100       803 if ( $html =~ m/No patents have matched your query/ ) {
132 1         9 $page_response->set_parameter( 'is_success', undef );
133 1         5 $page_response->set_parameter( 'message',
134             'No patents have matched your query' )
135             ; # No patents have matched your query
136 1         24 return $page_response;
137             }
138              
139 11 50       376 unless ( $html
140             =~ s/.*?.*?/\n\nUS /is </td> </tr> <tr> <td class="h" > <a name="141">141</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ) </td> </tr> <tr> <td class="h" > <a name="142">142</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { </td> </tr> <tr> <td class="h" > <a name="143">143</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> carp "header weird A \n"; </td> </tr> <tr> <td class="h" > <a name="144">144</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="145">145</a> </td> <td class="c3" > 11 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#145-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 3037 </td> <td class="s"> unless ( $html </td> </tr> <tr> <td class="h" > <a name="146">146</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =~ s/<head>.*(<title>)\D+/<head><!-- Modified by perl module WWW::Patent::Page from information provided by http:\/\/www.uspto.gov ; dedicated to public ; use at own risk -->\n<title>US /is </td> </tr> <tr> <td class="h" > <a name="147">147</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ) </td> </tr> <tr> <td class="h" > <a name="148">148</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { </td> </tr> <tr> <td class="h" > <a name="149">149</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> carp "header weird B \n"; </td> </tr> <tr> <td class="h" > <a name="150">150</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="151">151</a> </td> <td class="c3" > 11 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#151-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 280 </td> <td class="s"> unless ( $html =~ s/<title>\D+/<title>US /is ) { </td> </tr> <tr> <td class="h" > <a name="152">152</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> carp "header weird C \n$html\n"; </td> </tr> <tr> <td class="h" > <a name="153">153</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="154">154</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="155">155</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #warn " type is $self->{'patent'}->{'doc_type'}'\n"; </td> </tr> <tr> <td class="h" > <a name="156">156</a> </td> <td class="c3" > 11 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#156-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 341 </td> <td class="s"> unless ( $html =~ s/<body.*?<hr>/<body><HR>/is ) { </td> </tr> <tr> <td class="h" > <a name="157">157</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> carp "front weird \n$html\n"; </td> </tr> <tr> <td class="h" > <a name="158">158</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="159">159</a> </td> <td class="c3" > 11 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#159-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 1095 </td> <td class="s"> unless ( $html =~ s/(.*)<hr>(.*)body>/$1<\/body>/is ) { </td> </tr> <tr> <td class="h" > <a name="160">160</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> carp "end weird \n$html\n"; </td> </tr> <tr> <td class="h" > <a name="161">161</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="162">162</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $html </td> </tr> <tr> <td class="h" > <a name="163">163</a> </td> <td class="c3" > 11 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1073 </td> <td class="s"> =~ s|"/netacgi/nph-Parser|"http://patft.uspto.gov/netacgi/nph-Parser|gi; </td> </tr> <tr> <td class="h" > <a name="164">164</a> </td> <td class="c3" > 11 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 98 </td> <td class="s"> $page_response->set_parameter( 'content', $html ); </td> </tr> <tr> <td class="h" > <a name="165">165</a> </td> <td class="c3" > 11 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 361 </td> <td class="s"> return $page_response; </td> </tr> <tr> <td class="h" > <a name="166">166</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="167">167</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="168">168</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> carp "Unsuccessful response: \n'" </td> </tr> <tr> <td class="h" > <a name="169">169</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> . $response->status_line </td> </tr> <tr> <td class="h" > <a name="170">170</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> . "'\n\nfrom request:\n'$request_text'\n"; </td> </tr> <tr> <td class="h" > <a name="171">171</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> return undef; </td> </tr> <tr> <td class="h" > <a name="172">172</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="173">173</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="174">174</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="175">175</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub USPTO_tif { </td> </tr> <tr> <td class="h" > <a name="176">176</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--subroutine.html#176-1"> 1 </a> </td> <td >   </td> <td > 3 </td> <td class="s"> my ( $self, $page_response ) = @_; </td> </tr> <tr> <td class="h" > <a name="177">177</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s"> my ( $request, $base, $zero_fill ); </td> </tr> <tr> <td class="h" > <a name="178">178</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="179">179</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#179-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 8 </td> <td class="s"> if ( $self->{'patent'}{'number'} =~ m/(0|1|2|3|4)\d$/ ) { </td> </tr> <tr> <td class="h" > <a name="180">180</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="181">181</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # 0-4 is on one server, 5-9 is on another </td> </tr> <tr> <td class="h" > <a name="182">182</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $base = 'patimg1.uspto.gov'; </td> </tr> <tr> <td class="h" > <a name="183">183</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="184">184</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s"> else { $base = 'patimg2.uspto.gov'; } </td> </tr> <tr> <td class="h" > <a name="185">185</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 7 </td> <td class="s"> my $zerofill = sprintf '%0.8u', $self->{'patent'}{'number'}; </td> </tr> <tr> <td class="h" > <a name="186">186</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="187">187</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print "\nZerofill: $zerofill\n"; </td> </tr> <tr> <td class="h" > <a name="188">188</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#188-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 6 </td> <td class="s"> if ( $self->{'patent'}->{'doc_type'} ) { </td> </tr> <tr> <td class="h" > <a name="189">189</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $request = HTTP::Request->new( 'GET' => </td> </tr> <tr> <td class="h" > <a name="190">190</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "http://$base/.piw?Docid=$self->{'patent'}->{'doc_type'}$zerofill\&idkey=NONE" </td> </tr> <tr> <td class="h" > <a name="191">191</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="192">192</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="193">193</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="194">194</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 16 </td> <td class="s"> $request = HTTP::Request->new( </td> </tr> <tr> <td class="h" > <a name="195">195</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'GET' => "http://$base/.piw?Docid=$zerofill\&idkey=NONE" ); </td> </tr> <tr> <td class="h" > <a name="196">196</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="197">197</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="198">198</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print "\nAlmost $self->{'retrieved_identifier'}->{'number'} \n"; </td> </tr> <tr> <td class="h" > <a name="199">199</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 168 </td> <td class="s"> my $response = $self->request($request); </td> </tr> <tr> <td class="h" > <a name="200">200</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="201">201</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 7 </td> <td class="s"> my $html = $response->content; </td> </tr> <tr> <td class="h" > <a name="202">202</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="203">203</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { # page numbers </td> </tr> <tr> <td class="h" > <a name="204">204</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="205">205</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#205-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 14 </td> <td class="s"> if ( $html =~ m/NumPages=(\d+)/ ) { </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 22 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="206">206</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 11 </td> <td class="s"> $page_response->set_parameter( 'pages', $1 ); </td> </tr> <tr> <td class="h" > <a name="207">207</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="208">208</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="209">209</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> elsif ( $html =~ m/(\d+)\s+of\s+(\d+)\s+pages/ ) { </td> </tr> <tr> <td class="h" > <a name="210">210</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $page_response->set_parameter( 'pages', $2 ); </td> </tr> <tr> <td class="h" > <a name="211">211</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="212">212</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print "Pages: $2\n"; </td> </tr> <tr> <td class="h" > <a name="213">213</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="214">214</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="215">215</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> carp </td> </tr> <tr> <td class="h" > <a name="216">216</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "no maximum page number found in $self->{'patent'}{'country'}$self->{'patent'}{'number'}: \n$html"; </td> </tr> <tr> <td class="h" > <a name="217">217</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="218">218</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="219">219</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 14 </td> <td class="s"> my $p = HTML::TokeParser->new( \$html ); </td> </tr> <tr> <td class="h" > <a name="220">220</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 211 </td> <td class="s"> my $url; </td> </tr> <tr> <td class="h" > <a name="221">221</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $token; </td> </tr> <tr> <td class="h" > <a name="222">222</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 8 </td> <td class="s"> FINDPAGE: while ( $token = $p->get_tag("a") ) { </td> </tr> <tr> <td class="h" > <a name="223">223</a> </td> <td class="c3" > 2 </td> <td >   </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--condition.html#223-1"> 50 </a> </td> <td >   </td> <td >   </td> <td > 1743 </td> <td class="s"> $url = $token->[1]{href} || "-"; #very strange or construct ??? </td> </tr> <tr> <td class="h" > <a name="224">224</a> </td> <td class="c3" > 2 </td> <td class="c3" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#224-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 39 </td> <td class="s"> if ( $url =~ m/$self->{'patent'}{'number'}/ ) { last FINDPAGE; } </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="225">225</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="226">226</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print "$url\n"; </td> </tr> <tr> <td class="h" > <a name="227">227</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="228">228</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s"> undef $p; </td> </tr> <tr> <td class="h" > <a name="229">229</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="230">230</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 27 </td> <td class="s"> $url =~ s/PageNum=(\d+)/PageNum=$self->{'patent'}{'page'}/; </td> </tr> <tr> <td class="h" > <a name="231">231</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # $url = "http://$base$url"; </td> </tr> <tr> <td class="h" > <a name="232">232</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="233">233</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # warn "URL = '$url'\n"; </td> </tr> <tr> <td class="h" > <a name="234">234</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # exit; </td> </tr> <tr> <td class="h" > <a name="235">235</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#235-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 14 </td> <td class="s"> $request = new HTTP::Request( 'GET' => "$url" ) </td> </tr> <tr> <td class="h" > <a name="236">236</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> or carp "bad numbered page $self->{'patent'}{'page'} fetch $url"; </td> </tr> <tr> <td class="h" > <a name="237">237</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 182 </td> <td class="s"> $response = $self->request($request); </td> </tr> <tr> <td class="h" > <a name="238">238</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 25 </td> <td class="s"> $html = $response->content; </td> </tr> <tr> <td class="h" > <a name="239">239</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="240">240</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 112 </td> <td class="s"> $p = HTML::TokeParser->new( \$html ); </td> </tr> <tr> <td class="h" > <a name="241">241</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="242">242</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 324 </td> <td class="s"> FINDPAGE: while ( $token = $p->get_tag("embed") ) { </td> </tr> <tr> <td class="h" > <a name="243">243</a> </td> <td class="c0" > 0 </td> <td >   </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--condition.html#243-1"> 0 </a> </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $url = $token->[1]->{src} || "-"; </td> </tr> <tr> <td class="h" > <a name="244">244</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#244-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> if ( $url =~ m/image\/tiff/ ) { last FINDPAGE; } </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="245">245</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="246">246</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="247">247</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get tiff image </td> </tr> <tr> <td class="h" > <a name="248">248</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # $url = "http://$base$url"; </td> </tr> <tr> <td class="h" > <a name="249">249</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#249-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 14219 </td> <td class="s"> $request = new HTTP::Request( 'GET' => "$url" ) </td> </tr> <tr> <td class="h" > <a name="250">250</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> or carp "Coudn't retrieve the tiff image fetch $url"; </td> </tr> <tr> <td class="h" > <a name="251">251</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 345 </td> <td class="s"> $response = $self->request($request); </td> </tr> <tr> <td class="h" > <a name="252">252</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="253">253</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print "\nPage response\n$response->content\n\n"; </td> </tr> <tr> <td class="h" > <a name="254">254</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 23 </td> <td class="s"> $page_response->set_parameter( 'content', $response->content ); </td> </tr> <tr> <td class="h" > <a name="255">255</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="256">256</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 34 </td> <td class="s"> return $page_response; </td> </tr> <tr> <td class="h" > <a name="257">257</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="258">258</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="259">259</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub USPTO_pdf { </td> </tr> <tr> <td class="h" > <a name="260">260</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--subroutine.html#260-1"> 1 </a> </td> <td >   </td> <td > 3 </td> <td class="s"> my ( $self, $page_response ) = @_; </td> </tr> <tr> <td class="h" > <a name="261">261</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1 </td> <td class="s"> my ( $request, $base, $zero_fill ); </td> </tr> <tr> <td class="h" > <a name="262">262</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="263">263</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#263-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 4 </td> <td class="s"> my $tempdir = $self->{'patent'}->{'tempdir'} </td> </tr> <tr> <td class="h" > <a name="264">264</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ( $self->{'patent'}->{'tempdir'} ); </td> </tr> <tr> <td class="h" > <a name="265">265</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s"> my $fn_template = $self->{'patent'}->{'doc_id'} . "_XXXX"; </td> </tr> <tr> <td class="h" > <a name="266">266</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="267">267</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 9 </td> <td class="s"> my $pdf_file = new File::Temp( </td> </tr> <tr> <td class="h" > <a name="268">268</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> TEMPLATE => $fn_template, </td> </tr> <tr> <td class="h" > <a name="269">269</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> DIR => $tempdir, </td> </tr> <tr> <td class="h" > <a name="270">270</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> SUFFIX => '.pdf', </td> </tr> <tr> <td class="h" > <a name="271">271</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> UNLINK => 1, </td> </tr> <tr> <td class="h" > <a name="272">272</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="273">273</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 745 </td> <td class="s"> my $pdf_fn = $pdf_file->filename; </td> </tr> <tr> <td class="h" > <a name="274">274</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 16 </td> <td class="s"> my $pdf = new PDF::API2(); </td> </tr> <tr> <td class="h" > <a name="275">275</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 840 </td> <td class="s"> print $pdf_file $pdf->stringify; </td> </tr> <tr> <td class="h" > <a name="276">276</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 14077 </td> <td class="s"> close $pdf_file; </td> </tr> <tr> <td class="h" > <a name="277">277</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="278">278</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 60 </td> <td class="s"> my $currenttime = localtime(); </td> </tr> <tr> <td class="h" > <a name="279">279</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 10 </td> <td class="s"> my $short_id </td> </tr> <tr> <td class="h" > <a name="280">280</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> = $self->{'patent'}{'country'} . $self->{'patent'}->{'number'}; </td> </tr> <tr> <td class="h" > <a name="281">281</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="282">282</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # my $pdf = new PDF::API2(-file => "$tempdir/$self->{'patent'}{'doc_id'}".".pdf"); </td> </tr> <tr> <td class="h" > <a name="283">283</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # my $pdf = new PDF::API2(-file => $pdf_fn); </td> </tr> <tr> <td class="h" > <a name="284">284</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 10 </td> <td class="s"> $pdf = PDF::API2->open($pdf_fn); </td> </tr> <tr> <td class="h" > <a name="285">285</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 11806 </td> <td class="s"> my %h = $pdf->info( </td> </tr> <tr> <td class="h" > <a name="286">286</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'Author' => "Programatically Produced from Public Information", </td> </tr> <tr> <td class="h" > <a name="287">287</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'CreationDate' => $currenttime, </td> </tr> <tr> <td class="h" > <a name="288">288</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'ModDate' => $currenttime, </td> </tr> <tr> <td class="h" > <a name="289">289</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'Creator' => "WWW::Patent::Page::USPTO_pdf", </td> </tr> <tr> <td class="h" > <a name="290">290</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'Producer' => "US Patent Office and PDF::API2", </td> </tr> <tr> <td class="h" > <a name="291">291</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'Title' => "$short_id", </td> </tr> <tr> <td class="h" > <a name="292">292</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'Subject' => "patent", </td> </tr> <tr> <td class="h" > <a name="293">293</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'Keywords' => "$short_id WWW::Patent::Page" </td> </tr> <tr> <td class="h" > <a name="294">294</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="295">295</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 838 </td> <td class="s"> my $page = $pdf->page(); </td> </tr> <tr> <td class="h" > <a name="296">296</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 560 </td> <td class="s"> $page->mediabox('A4'); </td> </tr> <tr> <td class="h" > <a name="297">297</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="298">298</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="299">299</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#299-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 211 </td> <td class="s"> if ( $self->{'patent'}{'number'} =~ m/(0|1|2|3|4)\d$/ ) { </td> </tr> <tr> <td class="h" > <a name="300">300</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="301">301</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # 0-4 is on one server, 5-9 is on another </td> </tr> <tr> <td class="h" > <a name="302">302</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $base = 'patimg1.uspto.gov'; </td> </tr> <tr> <td class="h" > <a name="303">303</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="304">304</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s"> else { $base = 'patimg2.uspto.gov'; } </td> </tr> <tr> <td class="h" > <a name="305">305</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 11 </td> <td class="s"> my $zerofill = sprintf '%0.8u', $self->{'patent'}{'number'}; </td> </tr> <tr> <td class="h" > <a name="306">306</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="307">307</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#307-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 5 </td> <td class="s"> if ( $self->{'patent'}->{'doc_type'} ) { </td> </tr> <tr> <td class="h" > <a name="308">308</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $request = HTTP::Request->new( 'GET' => </td> </tr> <tr> <td class="h" > <a name="309">309</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "http://$base/.piw?Docid=$self->{'patent'}->{'doc_type'}$zerofill\&idkey=NONE" </td> </tr> <tr> <td class="h" > <a name="310">310</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="311">311</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="312">312</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="313">313</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 16 </td> <td class="s"> $request = HTTP::Request->new( </td> </tr> <tr> <td class="h" > <a name="314">314</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'GET' => "http://$base/.piw?Docid=$zerofill\&idkey=NONE" ); </td> </tr> <tr> <td class="h" > <a name="315">315</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="316">316</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="317">317</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 17843 </td> <td class="s"> my $response = $self->request($request); </td> </tr> <tr> <td class="h" > <a name="318">318</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="319">319</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 10 </td> <td class="s"> my $html = $response->content; </td> </tr> <tr> <td class="h" > <a name="320">320</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # warn "html = $html\n"; </td> </tr> <tr> <td class="h" > <a name="321">321</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { # page numbers </td> </tr> <tr> <td class="h" > <a name="322">322</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="323">323</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#323-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 13 </td> <td class="s"> if ( $html =~ m/NumPages=(\d+)/ ) { </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 12 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="324">324</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 9 </td> <td class="s"> $page_response->set_parameter( 'pages', $1 ); </td> </tr> <tr> <td class="h" > <a name="325">325</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="326">326</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> elsif ( $html =~ m/(\d+)\s+of\s+(\d+)\s+pages/ ) { </td> </tr> <tr> <td class="h" > <a name="327">327</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $page_response->set_parameter( 'pages', $2 ); </td> </tr> <tr> <td class="h" > <a name="328">328</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="329">329</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print "Pages: $2\n"; </td> </tr> <tr> <td class="h" > <a name="330">330</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="331">331</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="332">332</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> carp </td> </tr> <tr> <td class="h" > <a name="333">333</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "no maximum page number found in $self->{'patent'}{'country'}$self->{'patent'}{'number'}: \n$html"; </td> </tr> <tr> <td class="h" > <a name="334">334</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="335">335</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="336">336</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 13 </td> <td class="s"> my $p = HTML::TokeParser->new( \$html ); </td> </tr> <tr> <td class="h" > <a name="337">337</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 194 </td> <td class="s"> my $url; </td> </tr> <tr> <td class="h" > <a name="338">338</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $token; </td> </tr> <tr> <td class="h" > <a name="339">339</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 6 </td> <td class="s"> FINDPAGE: while ( $token = $p->get_tag("a") ) { </td> </tr> <tr> <td class="h" > <a name="340">340</a> </td> <td class="c3" > 2 </td> <td >   </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--condition.html#340-1"> 50 </a> </td> <td >   </td> <td >   </td> <td > 1055 </td> <td class="s"> $url = $token->[1]{href} || "-"; #very strange or construct ??? </td> </tr> <tr> <td class="h" > <a name="341">341</a> </td> <td class="c3" > 2 </td> <td class="c3" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#341-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 40 </td> <td class="s"> if ( $url =~ m/$self->{'patent'}{'number'}/ ) { last FINDPAGE; } </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="342">342</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="343">343</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="344">344</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4 </td> <td class="s"> undef $p; </td> </tr> <tr> <td class="h" > <a name="345">345</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="346">346</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#346-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 22 </td> <td class="s"> if ( defined( $self->{'patent'}{'page'} ) ) { </td> </tr> <tr> <td class="h" > <a name="347">347</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4 </td> <td class="s"> $url =~ s/PageNum=(\d+)/PageNum=$self->{'patent'}{'page'}/; </td> </tr> <tr> <td class="h" > <a name="348">348</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="349">349</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="350">350</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print "\n\$self->{'patent'}->{'page'} = '$self->{'patent'}->{'page'}' |$url = '$url' \@ 391 \n"; </td> </tr> <tr> <td class="h" > <a name="351">351</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="352">352</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #$url = "http://$base$url"; </td> </tr> <tr> <td class="h" > <a name="353">353</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#353-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 11 </td> <td class="s"> $request = new HTTP::Request( 'GET' => "$url" ) </td> </tr> <tr> <td class="h" > <a name="354">354</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> or carp "bad numbered page $self->{'patent'}{'page'} fetch $url"; </td> </tr> <tr> <td class="h" > <a name="355">355</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#355-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 188 </td> <td class="s"> $response = $self->request($request) or carp "bad request" ; </td> </tr> <tr> <td class="h" > <a name="356">356</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 39 </td> <td class="s"> $html = $response->content; </td> </tr> <tr> <td class="h" > <a name="357">357</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="358">358</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # open( my $fh,">", "1.html"); print $fh $html; close $fh; </td> </tr> <tr> <td class="h" > <a name="359">359</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="360">360</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 454 </td> <td class="s"> $p = HTML::TokeParser->new( \$html ); </td> </tr> <tr> <td class="h" > <a name="361">361</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # warn "base = $base, URL1 = '$url'\n"; </td> </tr> <tr> <td class="h" > <a name="362">362</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="363">363</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 500 </td> <td class="s"> $url = ""; </td> </tr> <tr> <td class="h" > <a name="364">364</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="365">365</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 7 </td> <td class="s"> FINDIMAGE: while($token = $p->get_tag("a") ) { </td> </tr> <tr> <td class="h" > <a name="366">366</a> </td> <td class="c3" > 10 </td> <td >   </td> <td class="c3" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--condition.html#366-1"> 100 </a> </td> <td >   </td> <td >   </td> <td > 3234 </td> <td class="s"> $url = $token->[1]->{href} || "-" ; </td> </tr> <tr> <td class="h" > <a name="367">367</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # warn "\ntoken 1 href = ", $token->[1]->{href} , "\n" ; </td> </tr> <tr> <td class="h" > <a name="368">368</a> </td> <td class="c3" > 10 </td> <td class="c3" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#368-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 56 </td> <td class="s"> if ($url =~ m/View\+first\+page/) {last FINDIMAGE; } </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="369">369</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="370">370</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # warn "URL2 = '$url'\n"; </td> </tr> <tr> <td class="h" > <a name="371">371</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="372">372</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="373">373</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#373-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 17 </td> <td class="s"> $request = new HTTP::Request( 'GET' => "$url" ) </td> </tr> <tr> <td class="h" > <a name="374">374</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> or carp "bad numbered page $self->{'patent'}{'page'} fetch $url"; </td> </tr> <tr> <td class="h" > <a name="375">375</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#375-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 226 </td> <td class="s"> $response = $self->request($request) or carp "bad request" ; </td> </tr> <tr> <td class="h" > <a name="376">376</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 20 </td> <td class="s"> $html = $response->content; </td> </tr> <tr> <td class="h" > <a name="377">377</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 10461 </td> <td class="s"> $p = HTML::TokeParser->new( \$html ); </td> </tr> <tr> <td class="h" > <a name="378">378</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="379">379</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #open( my $fh1,">", "2.html"); print $fh1 $html; close $fh1; </td> </tr> <tr> <td class="h" > <a name="380">380</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="381">381</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="382">382</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 256 </td> <td class="s"> FINDTIF: while ( $token = $p->get_tag("embed") ) { </td> </tr> <tr> <td class="h" > <a name="383">383</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print "\ntoken = ", Dumper($token), "\n" ; </td> </tr> <tr> <td class="h" > <a name="384">384</a> </td> <td class="c3" > 1 </td> <td >   </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--condition.html#384-1"> 50 </a> </td> <td >   </td> <td >   </td> <td > 4618 </td> <td class="s"> $url = $token->[1]->{src} || "-"; </td> </tr> <tr> <td class="h" > <a name="385">385</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#385-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 14 </td> <td class="s"> if ( $url =~ m/tif$/ ) { last FINDTIF; } </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="386">386</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="387">387</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="388">388</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get tiff image </td> </tr> <tr> <td class="h" > <a name="389">389</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 249 </td> <td class="s"> $url = "http://$base$url"; $url =~ s/\n//; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="390">390</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#390-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 9 </td> <td class="s"> if ( defined( $self->{'patent'}{'page'} ) ) { </td> </tr> <tr> <td class="h" > <a name="391">391</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 5 </td> <td class="s"> $url =~ s/PageNum=(\d+)/PageNum=$self->{'patent'}{'page'}/; </td> </tr> <tr> <td class="h" > <a name="392">392</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="393">393</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="394">394</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # warn "URL3 = '$url'\n"; </td> </tr> <tr> <td class="h" > <a name="395">395</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s"> my $tif_url = $url; </td> </tr> <tr> <td class="h" > <a name="396">396</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#396-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 15 </td> <td class="s"> $request = new HTTP::Request( 'GET' => "$url" ) </td> </tr> <tr> <td class="h" > <a name="397">397</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> or carp "Coudn't retrieve the tiff image fetch $url"; </td> </tr> <tr> <td class="h" > <a name="398">398</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="399">399</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="400">400</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # prepare to store tif image </td> </tr> <tr> <td class="h" > <a name="401">401</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 215 </td> <td class="s"> my $pat_page = 1; </td> </tr> <tr> <td class="h" > <a name="402">402</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#402-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 7 </td> <td class="s"> if ( defined( $self->{'patent'}{'page'} ) ) { </td> </tr> <tr> <td class="h" > <a name="403">403</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4 </td> <td class="s"> $pat_page = $self->{'patent'}{'page'}; </td> </tr> <tr> <td class="h" > <a name="404">404</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="405">405</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="406">406</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print "\n\$self->{'patent'}->{'doc_id'} = '$self->{'patent'}->{'doc_id'}' \@ 413 \n"; </td> </tr> <tr> <td class="h" > <a name="407">407</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="408">408</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 6 </td> <td class="s"> $fn_template = $self->{'patent'}->{'doc_id'} . "_p" . $pat_page . "_XXXX"; </td> </tr> <tr> <td class="h" > <a name="409">409</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # warn "TEMPLATE => $fn_template, DIR => $tempdir\n" ; </td> </tr> <tr> <td class="h" > <a name="410">410</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 16 </td> <td class="s"> my $temp_tif = new File::Temp( </td> </tr> <tr> <td class="h" > <a name="411">411</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> TEMPLATE => $fn_template, </td> </tr> <tr> <td class="h" > <a name="412">412</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> DIR => $tempdir, </td> </tr> <tr> <td class="h" > <a name="413">413</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> SUFFIX => '.tif', </td> </tr> <tr> <td class="h" > <a name="414">414</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> UNLINK => 1, </td> </tr> <tr> <td class="h" > <a name="415">415</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="416">416</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="417">417</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 997 </td> <td class="s"> my $done = 0; </td> </tr> <tr> <td class="h" > <a name="418">418</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4 </td> <td class="s"> my $trys = 0; </td> </tr> <tr> <td class="h" > <a name="419">419</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#419-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--condition.html#419-1"> 33 </a> </td> <td >   </td> <td >   </td> <td > 13 </td> <td class="s"> if ( !$done and $trys < 5 ) { </td> </tr> <tr> <td class="h" > <a name="420">420</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 10 </td> <td class="s"> $response = $self->request($request); </td> </tr> <tr> <td class="h" > <a name="421">421</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $trys++; </td> </tr> <tr> <td class="h" > <a name="422">422</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#422-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--condition.html#422-1"> 0 </a> </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> if ( $response->is_success and $response->content ) { </td> </tr> <tr> <td class="h" > <a name="423">423</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> print $temp_tif $response->content; </td> </tr> <tr> <td class="h" > <a name="424">424</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # open( my $th,">", "2.html"); print $th $response->content; close $th; </td> </tr> <tr> <td class="h" > <a name="425">425</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="426">426</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $done = 1; </td> </tr> <tr> <td class="h" > <a name="427">427</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="428">428</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="429">429</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> carp </td> </tr> <tr> <td class="h" > <a name="430">430</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "attempt $trys response failed or content empty, no temporary tiff can be made- possibly network problem or timeout, will try again"; </td> </tr> <tr> <td class="h" > <a name="431">431</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="432">432</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="433">433</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> else { carp "too many attempts, giving up."; return (0); } </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="434">434</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="435">435</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # close $temp_tif; </td> </tr> <tr> <td class="h" > <a name="436">436</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="437">437</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # convert to pdf </td> </tr> <tr> <td class="h" > <a name="438">438</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> my $gfx = $page->gfx(); </td> </tr> <tr> <td class="h" > <a name="439">439</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print Dumper($temp_tif); </td> </tr> <tr> <td class="h" > <a name="440">440</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $gfx->image( $pdf->image_tiff($temp_tif), 0, 0, 0.23 ); </td> </tr> <tr> <td class="h" > <a name="441">441</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="442">442</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # one page only </td> </tr> <tr> <td class="h" > <a name="443">443</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#443-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> if ( $self->{'patent'}{'page'} ) { </td> </tr> <tr> <td class="h" > <a name="444">444</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $page_response->set_parameter( 'content', $pdf->stringify ); </td> </tr> <tr> <td class="h" > <a name="445">445</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> return $page_response; </td> </tr> <tr> <td class="h" > <a name="446">446</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="447">447</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="448">448</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # retrieve all pages </td> </tr> <tr> <td class="h" > <a name="449">449</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> my $maxpage = $page_response->get_parameter('pages'); </td> </tr> <tr> <td class="h" > <a name="450">450</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> for ( my $i = 2; $i <= $maxpage; $i++ ) { </td> </tr> <tr> <td class="h" > <a name="451">451</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $tif_url =~ s/PageNum=(\d+)/PageNum=$i/; </td> </tr> <tr> <td class="h" > <a name="452">452</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--branch.html#452-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $request = new HTTP::Request( 'GET' => "$tif_url" ) </td> </tr> <tr> <td class="h" > <a name="453">453</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> or carp "Couldn't retrieve the tiff image fetch $tif_url"; </td> </tr> <tr> <td class="h" > <a name="454">454</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $response = $self->request($request); </td> </tr> <tr> <td class="h" > <a name="455">455</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="456">456</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # store tif image </td> </tr> <tr> <td class="h" > <a name="457">457</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $fn_template = $self->{'patent'}->{'doc_id'} . "_p" . $i . "_XXXX"; </td> </tr> <tr> <td class="h" > <a name="458">458</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $temp_tif = new File::Temp( </td> </tr> <tr> <td class="h" > <a name="459">459</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> TEMPLATE => $fn_template, </td> </tr> <tr> <td class="h" > <a name="460">460</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> DIR => $tempdir, </td> </tr> <tr> <td class="h" > <a name="461">461</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> SUFFIX => '.tif', </td> </tr> <tr> <td class="h" > <a name="462">462</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> UNLINK => 1, </td> </tr> <tr> <td class="h" > <a name="463">463</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="464">464</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> print $temp_tif $response->content; </td> </tr> <tr> <td class="h" > <a name="465">465</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="466">466</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # close $temp_tif; </td> </tr> <tr> <td class="h" > <a name="467">467</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="468">468</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # convert to pdf </td> </tr> <tr> <td class="h" > <a name="469">469</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $page = $pdf->page(0); </td> </tr> <tr> <td class="h" > <a name="470">470</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $gfx = $page->gfx(); </td> </tr> <tr> <td class="h" > <a name="471">471</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $gfx->image( $pdf->image_tiff($temp_tif), 0, 0, 0.23 ); </td> </tr> <tr> <td class="h" > <a name="472">472</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="473">473</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="474">474</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # return pdf as string </td> </tr> <tr> <td class="h" > <a name="475">475</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $page_response->set_parameter( 'content', $pdf->stringify ); </td> </tr> <tr> <td class="h" > <a name="476">476</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="477">477</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # $pdf->save; </td> </tr> <tr> <td class="h" > <a name="478">478</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # $pdf->saveas("$tempdir/$self->{'patent'}->{'doc_id'}".".pdf"); </td> </tr> <tr> <td class="h" > <a name="479">479</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="480">480</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> return $page_response; </td> </tr> <tr> <td class="h" > <a name="481">481</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="482">482</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="483">483</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub USPTO_terms { </td> </tr> <tr> <td class="h" > <a name="484">484</a> </td> <td class="c3" > 2 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-WWW-Patent-Page-USPTO-pm--subroutine.html#484-1"> 2 </a> </td> <td >   </td> <td > 4 </td> <td class="s"> my ($self) = @_; </td> </tr> <tr> <td class="h" > <a name="485">485</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return ( </td> </tr> <tr> <td class="h" > <a name="486">486</a> </td> <td class="c3" > 2 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 17 </td> <td class="s"> "WWW::Patent::Page utilizes the USPTO web site.\n </td> </tr> <tr> <td class="h" > <a name="487">487</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Refer to http://www.USPTO.gov for terms and conditions of use of that site. </td> </tr> <tr> <td class="h" > <a name="488">488</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="489">489</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Note that as of September 1, 2004, </td> </tr> <tr> <td class="h" > <a name="490">490</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> http://www.uspto.gov/patft/help/notices.htm and the like state in part: </td> </tr> <tr> <td class="h" > <a name="491">491</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="492">492</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> These databases are intended for use by the general public. </td> </tr> <tr> <td class="h" > <a name="493">493</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Due to limitations of equipment and bandwidth, they are not </td> </tr> <tr> <td class="h" > <a name="494">494</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> intended to be a source for bulk downloads of USPTO data. </td> </tr> <tr> <td class="h" > <a name="495">495</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Bulk data may be purchased from USPTO at cost (see the USPTO </td> </tr> <tr> <td class="h" > <a name="496">496</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Products and Services Catalog). Individuals, companies, </td> </tr> <tr> <td class="h" > <a name="497">497</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> IP addresses, or blocks of IP addresses who, in effect, </td> </tr> <tr> <td class="h" > <a name="498">498</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> deny service to the general public by generating unusually </td> </tr> <tr> <td class="h" > <a name="499">499</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> high numbers (1000 or more) of daily database accesses </td> </tr> <tr> <td class="h" > <a name="500">500</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> (searches, pages, or hits), whether generated manually or </td> </tr> <tr> <td class="h" > <a name="501">501</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> in an automated fashion, may be denied access to these </td> </tr> <tr> <td class="h" > <a name="502">502</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> servers without notice. </td> </tr> <tr> <td class="h" > <a name="503">503</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="504">504</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Note at http://www.uspto.gov/patft/help/accpat.htm : </td> </tr> <tr> <td class="h" > <a name="505">505</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="506">506</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> If you can access the main PTO Web site, but cannot access any </td> </tr> <tr> <td class="h" > <a name="507">507</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> of the Patent Grant Database Quick Search, Advanced Quick Searching, </td> </tr> <tr> <td class="h" > <a name="508">508</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> or Patent Number Searching pages, your workstation or organization </td> </tr> <tr> <td class="h" > <a name="509">509</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> may have been denied access to the Web Patent Databases pursuant </td> </tr> <tr> <td class="h" > <a name="510">510</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> to the policy stated at the top of this page. To determine if you </td> </tr> <tr> <td class="h" > <a name="511">511</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> have been denied access, you can check the Denied List for your </td> </tr> <tr> <td class="h" > <a name="512">512</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> computer's IP address. http://www.uspto.gov/patft/help/denied.htm </td> </tr> <tr> <td class="h" > <a name="513">513</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="514">514</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> (Your IP address is the only means by which you are known to the </td> </tr> <tr> <td class="h" > <a name="515">515</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> PTO servers -- server logs do not contain your email address or </td> </tr> <tr> <td class="h" > <a name="516">516</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> any other personal identifying information. If you do not know </td> </tr> <tr> <td class="h" > <a name="517">517</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> your computer's IP address because you are behind a firewall, do </td> </tr> <tr> <td class="h" > <a name="518">518</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> not have a fixed IP address, or for any other reason, you can find </td> </tr> <tr> <td class="h" > <a name="519">519</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> your current IP address by using an 'IP reflector,' such as </td> </tr> <tr> <td class="h" > <a name="520">520</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> http://www2.simflex.com/ip.shtml or http://www.dslreports.com/ip.) </td> </tr> <tr> <td class="h" > <a name="521">521</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="522">522</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> If you are an individual whose individual IP address has been </td> </tr> <tr> <td class="h" > <a name="523">523</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> denied access: to seek to have your access restored, please send </td> </tr> <tr> <td class="h" > <a name="524">524</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> email including your workstation and firewall or gateway IP addresses </td> </tr> <tr> <td class="h" > <a name="525">525</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> (consult with your network administrators if necessary), and describing </td> </tr> <tr> <td class="h" > <a name="526">526</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> the steps you have taken or will take to insure that future violations </td> </tr> <tr> <td class="h" > <a name="527">527</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> of the USPTO access policy will not occur, to the Database Help Desk at </td> </tr> <tr> <td class="h" > <a name="528">528</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> www\@uspto.gov. </td> </tr> <tr> <td class="h" > <a name="529">529</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="530">530</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> If you are a member or employee of an organization which has been </td> </tr> <tr> <td class="h" > <a name="531">531</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> denied access: please do not send individual email to PTO. Instead, </td> </tr> <tr> <td class="h" > <a name="532">532</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> please have your network administrator or a person holding authority </td> </tr> <tr> <td class="h" > <a name="533">533</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> over your organization\'s network operations send email including your </td> </tr> <tr> <td class="h" > <a name="534">534</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> firewall, gateway, or workstation IP addresses, and describing the steps </td> </tr> <tr> <td class="h" > <a name="535">535</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> you have taken or will take to insure that future violations of the USPTO </td> </tr> <tr> <td class="h" > <a name="536">536</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> access policy will not occur, to the Database Help Desk at www\@uspto.gov. </td> </tr> <tr> <td class="h" > <a name="537">537</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="538">538</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> For all other content-related matters, please send email to the Database </td> </tr> <tr> <td class="h" > <a name="539">539</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Help Desk at www\@uspto.gov </td> </tr> <tr> <td class="h" > <a name="540">540</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="541">541</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Note at http://www.uspto.gov/patft/help/images.htm </td> </tr> <tr> <td class="h" > <a name="542">542</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="543">543</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Patent images must be retrieved from the database one page at a time. </td> </tr> <tr> <td class="h" > <a name="544">544</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This is necessary since patents can be as long as 5,000 pages, and the </td> </tr> <tr> <td class="h" > <a name="545">545</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> resources required to allow downloading such 'jumbo' patents are not </td> </tr> <tr> <td class="h" > <a name="546">546</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> available. Users employing third-party software which downloads multiple </td> </tr> <tr> <td class="h" > <a name="547">547</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> pages of a patent at once may find this practice subjects them to denial </td> </tr> <tr> <td class="h" > <a name="548">548</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> of access to the databases if they exceed PTO's maximum allowable </td> </tr> <tr> <td class="h" > <a name="549">549</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> activity levels. </td> </tr> <tr> <td class="h" > <a name="550">550</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="551">551</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> " </td> </tr> <tr> <td class="h" > <a name="552">552</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="553">553</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="554">554</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 1; </td> </tr> <tr> <td class="h" > <a name="555">555</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="556">556</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> __END__ </td> </tr> </table> </body> </html>