|
|
@@ -3,9 +3,9 @@ import { Button, Grid } from '@mui/material'; |
|
|
import axios from 'axios'; |
|
|
import axios from 'axios'; |
|
|
import { apiPath, appURL } from "../../../auth/utils"; |
|
|
import { apiPath, appURL } from "../../../auth/utils"; |
|
|
import { |
|
|
import { |
|
|
POST_MERGE_PDF, |
|
|
|
|
|
|
|
|
GET_MERGE_PDF, |
|
|
|
|
|
GET_REMOVE_PDF_PASSWORD, |
|
|
GET_PDF_TEMPLATE_PATH, |
|
|
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 |
|
|
POST_UPLOAD_PDF_PATH |
|
|
} from "../../../utils/ApiPathConst"; |
|
|
} from "../../../utils/ApiPathConst"; |
|
|
import { LIONER_BUTTON_THEME } from "../../../themes/colorConst"; |
|
|
import { LIONER_BUTTON_THEME } from "../../../themes/colorConst"; |
|
|
@@ -257,11 +257,17 @@ function PDF() { |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const doMerge = async () => { |
|
|
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 |
|
|
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 () => { |
|
|
const handleBack = async () => { |
|
|
// No PDF editor to clear now |
|
|
// No PDF editor to clear now |
|
|
// setPdfUrl(null); |
|
|
// setPdfUrl(null); |
|
|
@@ -317,6 +323,15 @@ function PDF() { |
|
|
Cancel |
|
|
Cancel |
|
|
</Button> |
|
|
</Button> |
|
|
</Grid> |
|
|
</Grid> |
|
|
|
|
|
<Grid item sx={{ ml: { xs: 1.5, md: 1.5, lg: 1.5 }, mr: 1.5, mb: 2 }}> |
|
|
|
|
|
<Button |
|
|
|
|
|
variant="contained" |
|
|
|
|
|
color="primary" |
|
|
|
|
|
onClick={doRemovePassword} |
|
|
|
|
|
> |
|
|
|
|
|
Remove PDF Password named C:\\dev\\pdf\\pdfB.pdf |
|
|
|
|
|
</Button> |
|
|
|
|
|
</Grid> |
|
|
<Grid item sx={{ ml: { xs: 1.5, md: 1.5, lg: 1.5 }, mr: 1.5, mb: 2 }}> |
|
|
<Grid item sx={{ ml: { xs: 1.5, md: 1.5, lg: 1.5 }, mr: 1.5, mb: 2 }}> |
|
|
<Button |
|
|
<Button |
|
|
variant="contained" |
|
|
variant="contained" |
|
|
|