read PDF/TXT without temporary files (#197)
This commit is contained in:
@@ -48,7 +48,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
||||
<!--<script src="pdf.js"></script>-->
|
||||
|
||||
<script type="text/javascript">
|
||||
var DEFAULT_URL = "{{ url_for('static', filename=pdffile) }}";
|
||||
var DEFAULT_URL = "{{ url_for('serve_book', book_id=pdffile,book_format='pdf') }}";
|
||||
var PDFWORKER_LOCATION="{{ url_for('static', filename='js/libs/pdf.worker.js') }}";
|
||||
// var IMAGE_LOCATION="{{ url_for('static', filename='css/../images') }}";
|
||||
var IMAGE_LOCATION="{{ url_for('static', filename='/images/') }}";
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
$("#area").width($("#area").width());
|
||||
$("#content").width($("#content").width());
|
||||
//bind text
|
||||
$("#content").load("{{ url_for('static', filename=txtfile) }}",function(textStr) {
|
||||
$("#content").load("{{ url_for('serve_book', book_id=txtfile,book_format='txt') }}",function(textStr) {
|
||||
$(this).height($(this).parent().height()*0.95);
|
||||
$(this).text(textStr);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user