This commit is contained in:
2025-06-25 19:41:08 +08:00
parent 97aa3efef6
commit 4af8283ff9
3 changed files with 260 additions and 53 deletions

View File

@@ -43,8 +43,8 @@ public class MS439Controller {
String path = ms439PrintService.getJYPDFPath();
ms439Request.setPagesource("A5");
ms439Request.setFileDir(path);
LexMarkResultDTO<?> result = ms439PrintService.printImage(ms439Request);
return Result.ok(result);
// LexMarkResultDTO<?> result = ms439PrintService.printImage(ms439Request);
return Result.ok(null);
}
@PostMapping("/getStatus")

View File

@@ -243,8 +243,8 @@ public class MS439PrintServiceImpl implements MS439PrintService {
private void createPdfFromHtml(String html, String outputPath)
throws IOException, DocumentException {
// 大小为A5
Document document = new Document(PageSize.A5);
// 大小为A4
Document document = new Document(PageSize.A4);
try (OutputStream os = Files.newOutputStream(Paths.get(outputPath))) {
PdfWriter writer = PdfWriter.getInstance(document, os);
document.open();