Hi,
To get images for document EP 1000000 A1 I used following query:
http://ops.epo.org/3.1/rest-services/pu ... .A1/images
Then I extracted url on full document images from response (published-data/images/EP/1000000/A1/fullimage) and used following query to get first image:
http://ops.epo.org/3.1/rest-services/pu ... /fullimage
with headers X-OPS-Range:1 and Accept:application/tiff.
But when I tried to get second image using the same URL with headers X-OPS-Range:2 and Accept:application/tiff - I got the same image. Why?
The only way to get other images, that I can find, is to use Range parameter:
http://ops.epo.org/3.1/rest-services/pu ... ge?Range=2
with header Accept:application/tiff.
In OPS services documentation usage of Range parameter is recommened for test purposes.
So why I can't use X-OPS-Range to get images as in other OPS calls?
Using X-OPS-Range header to get images
-
- Posts: 1298
- Joined: Thu Feb 22, 2007 5:32 pm
Re: Using X-OPS-Range header to get images
Dear user,
Sorry, but I don't really understand your issue. In any case, please see this FAQ to see how you download full text documents: http://www.epo.org/searching/free/ops/faq.html#faq-78
Kind regards,
OPS support
Sorry, but I don't really understand your issue. In any case, please see this FAQ to see how you download full text documents: http://www.epo.org/searching/free/ops/faq.html#faq-78
Kind regards,
OPS support
-
- Posts: 12
- Joined: Sat May 12, 2012 11:29 am
Re: Using X-OPS-Range header to get images
On the page 81 of OPS version 3.1 documentation - version 1.2.10 there is following text:
X-OPS-Range parameter don't work. If you recommend to use Range parameter instead, maybe the above text should be removed from documentation?Note, it is not possible to get the full document in one request but you can download it
page by page. To do this, use the Range HTTP header parameter to indicate the page
you want to retrieve as shown below.
In order to specify which image format you want to retrieve, use the HTTP Accept
header:
GET http://ops.epo.org/3.1/rest-services/published-
data/images/ EP/1000000/A1/fullimage
Accept: application/pdf
X-OPS-Range: 1
-
- Posts: 1298
- Joined: Thu Feb 22, 2007 5:32 pm
Re: Using X-OPS-Range header to get images
Dear user,
Our technical team had a look at your query and they say that X Range requests are working just fine for tiff and PDF
Kind regards,
OPS support
Our technical team had a look at your query and they say that X Range requests are working just fine for tiff and PDF
curl -v --header "X-OPS-Range:2" --header "Accept:application/tiff" http://ops.epo.org/3.1/rest-services/pu ... /fullimage > 2.tiff
According to them, no change in documentation is needed.curl -v --header "X-OPS-Range:1" --header "Accept:application/pdf" http://ops.epo.org/3.1/rest-services/pu ... /fullimage > 1.pdf
Kind regards,
OPS support
-
- Posts: 12
- Joined: Sat May 12, 2012 11:29 am
Re: Using X-OPS-Range header to get images
I've tried to run curl commands you suggested. For the first call they worked correctly. But after I called them several times, I've noticed, that two sequential calls of curl with same parameters result in different content-lengths (=different images). Look at screenshot.
It seems to be some problem with caching, that can be avoided by using different URL's with Range parameter in it.
It seems to be some problem with caching, that can be avoided by using different URL's with Range parameter in it.