Stelle PDFs auf iPhone und iPad seitenweise dar und nutze das Legacy-Build von pdf.js.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7b2d0c298e
commit
07e46c77f1
6 files changed
+100
-10
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { DocumentView } from "./DocumentView.jsx";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { api, documentToText, downloadFile, fetchExternal, markDirty, textToDocument } from "../api.js";
|
||||
@@ -227,7 +228,7 @@ function Binding({ binding, context, canEdit, isOwner, onChange }) {
|
||||
onClose={() => setViewing(false)}
|
||||
>
|
||||
<div className="viewer">
|
||||
{previewUrl ? <iframe ref={frameRef} title={element.title} src={previewUrl} /> : <p className="muted">Dokument wird geladen …</p>}
|
||||
{previewUrl ? <DocumentView frameRef={frameRef} className="" title={element.title} url={previewUrl} /> : <p className="muted">Dokument wird geladen …</p>}
|
||||
<div className="row">
|
||||
<button type="button" onClick={() => frameRef.current?.contentWindow?.print()} disabled={!previewUrl}>Drucken</button>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user