@ -123,15 +123,15 @@ def annotations_pdf():
html = render_template ( ( ' annotations.html ' ) , annot = annot , light = light )
html = render_template ( ( ' annotations.html ' ) , annot = annot , light = light )
return render_pdf ( HTML ( string = html ) )
return render_pdf ( HTML ( string = html ) )
@app.route ( ' /myannotations.pdf ' )
# @app.route('/myannotations.pdf' )
def myannotations_pdf ( ) :
# def myannotations_pdf() :
books = db . session . query ( Book ) . all ( )
# books = db.session.query(Book).all()
name = str ( request . args . get ( ' query ' ) )
# name=str(request.args.get('query'))
annot = get_annotations ( )
# annot = get_annotations( )
res = get_annot_results ( annot , name )
# res = get_annot_results(annot,name)
# Make a PDF straight from HTML in a string.
# # Make a PDF straight from HTML in a string.
html = render_template ( ' results_annot.html ' , name = name , annot = annot , res = res , books = books )
# html = render_template('results_annot.html', name=name, annot=annot, res=res, books=books)
return render_pdf ( HTML ( string = html ) )
# return render_pdf(HTML(string=html) )
@app.route ( ' /viewpdf/<filename> ' )
@app.route ( ' /viewpdf/<filename> ' )