diff --git a/src/khoj/interface/web/index.html b/src/khoj/interface/web/index.html
index 42831f5d..bb3725e9 100644
--- a/src/khoj/interface/web/index.html
+++ b/src/khoj/interface/web/index.html
@@ -44,6 +44,15 @@
}).join("\n") + ``;
}
+ function render_pdf(query, data) {
+ return `
` + data.map(function (item) {
+ let compiled_lines = item.additional.compiled.split("\n");
+ let filename = compiled_lines.shift();
+ let text_match = compiled_lines.join("\n")
+ return `
${filename}
\n
${text_match}
`
+ }).join("\n") + `
`;
+ }
+
function render_json(data, query, type) {
if (type === "markdown") {
return render_markdown(query, data);
@@ -55,6 +64,8 @@
return data.map(render_image).join('');
} else if (type === "ledger") {
return render_ledger(query, data);
+ } else if (type === "pdf") {
+ return render_pdf(query, data);
} else {
return ``
+ data.map((item) => `
${item.entry}
`).join("\n")
@@ -279,6 +290,7 @@
#json {
white-space: pre-wrap;
}
+ #results-pdf,
#results-plugin,
#results-ledger {
text-align: left;