def page_ocr_xml(request, lccn, date, edition, sequence): title, issue, page = _get_tip(lccn, date, edition, sequence) return _stream_file(page.ocr_abs_filename, 'application/xml')
def page_pdf(request, lccn, date, edition, sequence): title, issue, page = _get_tip(lccn, date, edition, sequence) return _stream_file(page.pdf_abs_filename, 'application/pdf')
def page_jp2(request, lccn, date, edition, sequence): title, issue, page = _get_tip(lccn, date, edition, sequence) return _stream_file(page.jp2_abs_filename, 'image/jp2')
def page_ocr_xml(request, lccn, date, edition, sequence): title, issue, page = _get_tip(lccn, date, edition, sequence) if not issue.batch.api_available: return HttpResponse(status=403) else: return _stream_file(page.ocr_abs_filename, 'application/xml')
def page_jp2(request, lccn, date, edition, sequence): title, issue, page = _get_tip(lccn, date, edition, sequence) if not issue.batch.api_available: return HttpResponse(status=403) else: return _stream_file(page.jp2_abs_filename, 'image/jp2')