feat(PDF Tools): display command args

This commit is contained in:
ShareVB committed 2025-05-04 22:12:23 +02:00
1 parent 6eccfc126e
commit 1829733f3b
5 files changed
+15

No files matched your search

+3
View File
@@ -19,6 +19,7 @@ const { download } = useDownloadFileFromBase64(
source: base64OutputPDF,
filename: fileName,
});
const qpdfCommand = ref('');
async function onProcessClicked() {
const fileInputsValue = fileInputs.value;
@@ -61,6 +62,7 @@ async function onProcessClicked() {
}
async function callMainWithManyInOutPdf(input_files: Array<ArrayBuffer>, args: string[], expected_exitcode: number) {
qpdfCommand.value = args.join(' ');
logs.value = [];
const mod = await createQPDFModule({
print(text: string) {
@@ -158,6 +160,7 @@ async function callMainWithManyInOutPdf(input_files: Array<ArrayBuffer>, args: s
</div>
<c-card title="Logs">
<input-copyable label="qpdf" :value="qpdfCommand" mb-1 />
<pre>{{ logs.join('\n') }}</pre>
</c-card>
</div>
+3
View File
@@ -28,6 +28,7 @@ const { download } = useDownloadFileFromBase64Refs(
filename: fileName,
extension: fileExtension,
});
const qpdfCommand = ref('');
function onFileUploaded(uploadedFile: File) {
file.value = uploadedFile;
@@ -77,6 +78,7 @@ async function onProcessClicked() {
}
async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_exitcode: number) {
qpdfCommand.value = args.join(' ');
logs.value = [];
const mod = await createQPDFModule({
print(text: string) {
@@ -202,6 +204,7 @@ const modificationRestrictionOptions = [
</div>
<c-card title="Logs">
<input-copyable label="qpdf" :value="qpdfCommand" mb-1 />
<pre>{{ logs.join('\n') }}</pre>
</c-card>
</div>
+3
View File
@@ -17,6 +17,7 @@ const { download } = useDownloadFileFromBase64(
filename: fileName,
extension: 'pdf',
});
const qpdfCommand = ref('');
function onFileUploaded(uploadedFile: File) {
file.value = uploadedFile;
@@ -53,6 +54,7 @@ async function onProcessClicked() {
}
async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_exitcode: number) {
qpdfCommand.value = args.join(' ');
logs.value = [];
const mod = await createQPDFModule({
print(text: string) {
@@ -119,6 +121,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
</div>
<c-card title="Logs">
<input-copyable label="qpdf" :value="qpdfCommand" mb-1 />
<pre>{{ logs.join('\n') }}</pre>
</c-card>
</div>
@@ -16,6 +16,7 @@ const { download } = useDownloadFileFromBase64(
filename: fileName,
extension: fileExtension,
});
const qpdfCommand = ref('');
async function onFileUploaded(uploadedFile: File) {
file.value = uploadedFile;
@@ -44,6 +45,7 @@ async function onFileUploaded(uploadedFile: File) {
}
async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_exitcode: number) {
qpdfCommand.value = args.join(' ');
logs.value = [];
const mod = await createQPDFModule({
print(text: string) {
@@ -81,6 +83,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
</div>
<c-card title="Logs">
<input-copyable label="qpdf" :value="qpdfCommand" mb-1 />
<pre>{{ logs.join('\n') }}</pre>
</c-card>
</div>
+3
View File
@@ -16,6 +16,7 @@ const { download } = useDownloadFileFromBase64(
filename: fileName,
extension: fileExtension,
});
const qpdfCommand = ref('');
async function onPDFFileUploaded(uploadedFile: File) {
file.value = uploadedFile;
@@ -44,6 +45,7 @@ async function onPDFFileUploaded(uploadedFile: File) {
}
async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_exitcode: number) {
qpdfCommand.value = args.join(' ');
logs.value = [];
const mod = await createQPDFModule({
print(text: string) {
@@ -81,6 +83,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
</div>
<c-card title="Logs">
<input-copyable label="qpdf" :value="qpdfCommand" mb-1 />
<pre>{{ logs.join('\n') }}</pre>
</c-card>
</div>