Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync main to rook #734

Merged
merged 8 commits into from
Jan 22, 2024
25 changes: 17 additions & 8 deletions web/src/components/FOI/Home/Redlining.js
Original file line number Diff line number Diff line change
Expand Up @@ -2122,12 +2122,11 @@ const Redlining = React.forwardRef(
await s.setTextAlignment(PDFNet.Stamper.TextAlignment.e_align_right);
await s.setAsBackground(false);
const pgSet = await PDFNet.PageSet.createRange(pagecount, pagecount);

let pagenumber = redlineSinglePackage == "Y" || redlineCategory === "oipcreview" ? pagecount : divisionsdocpages[pagecount - 1]?.stitchedPageNo
let totalpagenumber = redlineCategory === "oipcreview" ? _docViwer.getPageCount() : docViewer.getPageCount()
await s.stampText(
doc,
`${requestnumber} , Page ${
redlineSinglePackage == "Y" ? pagecount : divisionsdocpages[pagecount - 1]?.stitchedPageNo
} of ${docViewer.getPageCount()}`,
`${requestnumber} , Page ${pagenumber} of ${totalpagenumber}`,
pgSet
);
});
Expand Down Expand Up @@ -2989,12 +2988,14 @@ const Redlining = React.forwardRef(
redlinepageMappings["divpagemappings"][divisionid],
redlineStitchInfo[divisionid]["documentids"]
);
await stampPageNumberRedline(
if(redlineCategory !== "oipcreview") {
await stampPageNumberRedline(
stitchObject,
PDFNet,
redlineStitchInfo[divisionid]["stitchpages"],
redlineSinglePackage
);
);
}
if (
redlinepageMappings["pagestoremove"][divisionid] &&
redlinepageMappings["pagestoremove"][divisionid].length > 0
Expand All @@ -3003,6 +3004,7 @@ const Redlining = React.forwardRef(
redlinepageMappings["pagestoremove"][divisionid]
);
}

let xfdfString =
'<?xml version="1.0" encoding="UTF-8" ?><xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"><annots>' +
formattedAnnotationXML +
Expand Down Expand Up @@ -3042,10 +3044,17 @@ const Redlining = React.forwardRef(
const doc = await stitchObject.getPDFDoc();
await PDFNet.Redactor.redact(doc, rarr, app);
}

await stampPageNumberRedline(
stitchObject,
PDFNet,
redlineStitchInfo[divisionid]["stitchpages"],
redlineSinglePackage
);
}
//OIPC - Special Block : End

//OIPC - Special Block : End


stitchObject
.getFileData({
// saves the document with annotations in it
Expand Down
Loading