read PDF/TXT without temporary files (#197)

This commit is contained in:
OzzieIsaacs
2017-05-25 08:46:33 +02:00
parent 1366b36c32
commit 7ab8a5877b
3 changed files with 22 additions and 14 deletions
+1 -1
View File
@@ -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/') }}";
+1 -1
View File
@@ -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);
});