<p>You cannot read somebodies PDF online it must be your copy (ALL PDFS MUST BE DOWNLOADED). Your computer can only work with local HTML pages and their contents, thats the way it was, and still is:-</p>
<p>How the web works in just one line, (More graphic methods are available).</p>
<p><code>&lt;A HyperRef=HTextTransferProtocol://www.website.html&gt;download to view our BBS pages&lt;/a&gt;</code></p>
<pre><code>curl -o temp.pdf https://arxiv.org/pdf/2012.05439.pdf &amp; pdftotext -layout -f 1 -l 1 temp.pdf -

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1318k  100 1318k    0     0   488k      0  0:00:02  0:00:02 --:--:--  488k
                                                                          Scheduling Beyond CPUs for HPC....
</code></pre>
<p><a href="https://i.stack.imgur.com/oFe0l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oFe0l.png" alt="enter image description here" /></a></p>
how to read pdf from url using pdftotext
<p>I want to read two PDF files from URL without download. Then I want to extract text using pdftotext</p>
<pre><code>import pdftotext


with open(&quot;pdf_path1&quot;, &quot;rb&quot;) as f:
    pdf = pdftotext.PDF(f)

# If it's password-protected
with open(&quot;b.pdf&quot;, &quot;rb&quot;) as f:
    pdf = pdftotext.PDF(f, &quot;secret&quot;)

# How many pages?
print(len(pdf))

# Iterate over all the pages
for page in pdf:
    print(page)

# Read some individual pages
print(pdf[0])
print(pdf[1])

# Read all the text into one string
print(&quot;\n\n&quot;.join(pdf))
</code></pre>
<p>How can I resolve this error? or is there any other technique available to read PDF from URL?</p>