Using X-OPS-Range header to get images

This space is made available to users of Open Patent Services (OPS) web-service and now also to users of EPO’s bulk data subscription products such as 14. EPO worldwide bibliographic database (DOCDB), 14.11 EPO worldwide legal status database (INPADOC), 14.12 EP full text data, 14.1 EP bibliographic data (EBD)and more.

Users can ask each other questions, exchange experiences and solutions, post ideas. The moderator will use this space to announce changes or other relevant information.
Post Reply

AntonFrolov
Posts: 12
Joined: Sat May 12, 2012 11:29 am

Using X-OPS-Range header to get images

Post by AntonFrolov » Fri Jan 31, 2014 11:51 am

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?


EPO / OPS Support
Posts: 1027
Joined: Thu Feb 22, 2007 5:32 pm

Re: Using X-OPS-Range header to get images

Post by EPO / OPS Support » Mon Feb 03, 2014 10:50 am

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


AntonFrolov
Posts: 12
Joined: Sat May 12, 2012 11:29 am

Re: Using X-OPS-Range header to get images

Post by AntonFrolov » Tue Feb 04, 2014 9:29 am

On the page 81 of OPS version 3.1 documentation - version 1.2.10 there is following text:
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
X-OPS-Range parameter don't work. If you recommend to use Range parameter instead, maybe the above text should be removed from documentation?


EPO / OPS Support
Posts: 1027
Joined: Thu Feb 22, 2007 5:32 pm

Re: Using X-OPS-Range header to get images

Post by EPO / OPS Support » Wed Feb 12, 2014 1:07 pm

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
curl -v --header "X-OPS-Range:2" --header "Accept:application/tiff" http://ops.epo.org/3.1/rest-services/pu ... /fullimage > 2.tiff
curl -v --header "X-OPS-Range:1" --header "Accept:application/pdf" http://ops.epo.org/3.1/rest-services/pu ... /fullimage > 1.pdf
According to them, no change in documentation is needed.

Kind regards,

OPS support


AntonFrolov
Posts: 12
Joined: Sat May 12, 2012 11:29 am

Re: Using X-OPS-Range header to get images

Post by AntonFrolov » Thu Feb 13, 2014 11:36 am

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.


Post Reply