12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- const Parse = require("parse/node");
- Parse.initialize("edu-textbook");
- Parse.serverURL = "http://8.140.98.43/parse";
- global.Parse = Parse;
- import path from "path";
- import { mergePdfListReduce } from "../../../lib/docs";
- /**
- *
- (npx vite build) -and (node temp/test-export.js)
- npx vite build && node temp/test-export.js
- npx vite build
- node temp/test-export.js
- @desc 本地合成测试指令
- sudo apt install poppler-utils
- libreoffice --headless --convert-to pdf *.jpg
- pdfunite 1*.pdf final.pdf
- libreoffice 更多用法可以在终端输入 libreoffice --help 或者 man libreoffice 。
- */
- import { exportProcessReportDocs } from "../func-tbook-export";
- async function main(){
- try{
- console.log("测试合集")
- // console.log(await exportProcessReportDocs("FR7KZtefyR"))
- // console.log("测试列表")
- // console.log(await exportProcessReportDocs(null,["9V575dapEM"]))
- // console.log(await exportProcessReportDocs(null,["c2WUE5PgCo"]))
- // console.log(await exportProcessReportDocs(null,["R9r0XtMsK3"])) // CIP顺序问题,后两个pdf到了最前面
- // console.log(await exportProcessReportDocs(null,["MU5YpUizfW"]))
- // console.log(await exportProcessReportDocs(null,["UUGgHPHsIC"]))
- // console.log(await exportProcessReportDocs(null,["KxhErArSbB"]))
- // console.log(await exportProcessReportDocs(null,["7cf69rSawD"]))
- // console.log(await exportProcessReportDocs(null,["kY6MbE1JXC"])) // 21个附件,超时
- // console.log(await exportProcessReportDocs(null,["O8kCxqdasp"])) // \u0002 乱码
- // console.log(await exportProcessReportDocs(null,["VK81UnQmkn"]))
- // console.log(await exportProcessReportDocs(null,["SD0NCAdscz"]))
- // console.log(await exportProcessReportDocs(null,["sbVgvo4qEk"]))
- // console.log(await exportProcessReportDocs(null,["4LnH46Mu03"]))
- // console.log(await exportProcessReportDocs(null,["xdIAG8BYnX"]))
- // console.log(await exportProcessReportDocs(null,["NJ2hWa17gi"]))
- // console.log(await exportProcessReportDocs(null,["tnEfUnTaQU"])) // C/C++ pathname error
- // console.log(await exportProcessReportDocs(null,["2s353GQBjk"]))
- // console.log(await exportProcessReportDocs(null,["KvvN9lWhri"]))
- // console.log(await exportProcessReportDocs(null,["orBBW42ZCn"])) // rar attach
- // console.log(await exportProcessReportDocs(null,["UwPtEptZTR"])) // pdf 七 八 加密
- // console.log(await exportProcessReportDocs(null,["TsjBrECA4m"])) // pdf 加密
- // console.log(await exportProcessReportDocs(null,["z7yhFusOns"]))
- // console.log(await exportProcessReportDocs(null,["ybzJWkXqQG"]))
- // console.log(await exportProcessReportDocs(null,["4UAwQ4nc5A"]))
- console.log(await exportProcessReportDocs(null,["ybzJWkXqQG"]))
-
-
- // console.log(await exportProcessReportDocs(null,["3wJSkW9HNV"]))
- // console.log(await exportProcessReportDocs(null,["tHhfIDBkhf"]))
- // console.log(await exportProcessReportDocs(null,["cgTEtIvkK4"]))
- // console.log(await exportProcessReportDocs(null,["KvvN9lWhri"]))
- // console.log(await exportProcessReportDocs(null,["F8eiOAfuC3"]))
-
- // console.log(await exportProcessReportDocs(null,["Oa1yB6n64u","j4pt2MMTXM","jAMGxwrl1F","BwZpEoOtS8","X10kCktA0r"]))
- // console.log(await exportProcessReportDocs(null,["BwZpEoOtS8","X10kCktA0r"]))
- }catch(err){
- console.error(err)
- }
- }
- main()
- // mergePdfListReduce([
- // path.join("/home/ryan/workspace/nova/edu-textbook/server/cloud/tbook/template/模板-推荐申报表.docx"),
- // path.join("/home/ryan/workspace/nova/edu-textbook/server/cloud/tbook/template/模板-推荐申报表.docx")
- // ],{
- // files: [
- // '/home/ryan/workspace/nova/edu-textbook/server/cloud/tbook/test/temp/temp/112_1f15d43c0534288c61089099792e44e7.docx'
- // ],
- // properties: { pageSize: 'A4', margin: { top: 0, right: 0, bottom: 0, left: 0 } },
- // pdfa: false,
- // pdfUA: false,
- // merge: true
- // });
|