diff --git a/src/pages/pdf/PdfFormUpAndDown/index.js b/src/pages/pdf/PdfFormUpAndDown/index.js index e3cd339..15ed59e 100644 --- a/src/pages/pdf/PdfFormUpAndDown/index.js +++ b/src/pages/pdf/PdfFormUpAndDown/index.js @@ -3,9 +3,9 @@ import { Button, Grid } from '@mui/material'; import axios from 'axios'; import { apiPath, appURL } from "../../../auth/utils"; import { - POST_MERGE_PDF, + GET_MERGE_PDF, + GET_REMOVE_PDF_PASSWORD, GET_PDF_TEMPLATE_PATH, - GET_PDF_PATH, // Still potentially used for fetching record data if needed, but not PDF content for editor POST_UPLOAD_PDF_PATH } from "../../../utils/ApiPathConst"; import { LIONER_BUTTON_THEME } from "../../../themes/colorConst"; @@ -257,11 +257,17 @@ function PDF() { }; const doMerge = async () => { - const response = await axios.get(`${apiPath}${POST_MERGE_PDF}`, { + const response = await axios.get(`${apiPath}${GET_MERGE_PDF}`, { responseType: 'blob', // Crucial: get the response as a binary blob }); }; + const doRemovePassword = async () => { + const response = await axios.get(`${apiPath}${GET_REMOVE_PDF_PASSWORD}`, { + responseType: 'blob', + }); + }; + const handleBack = async () => { // No PDF editor to clear now // setPdfUrl(null); @@ -317,6 +323,15 @@ function PDF() { Cancel + + +