Skip to content

Commit

Permalink
Merge pull request #815 from bcgov/dev-DV-2926-1
Browse files Browse the repository at this point in the history
code cleanup related to Page BLANK issue
  • Loading branch information
divyav-aot authored Feb 23, 2024
2 parents f9a0ba7 + ff5b1e8 commit f606783
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api/reviewer_api/resources/foiflowmasterdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,4 +370,4 @@ def get():
try:
return json.dumps({"license": webviewerlicense}), 200
except BusinessException as exception:
return {"status": exception.status_code, "message": exception.message}, 500
return {"status": exception.status_code, "message": exception.message}, 500
2 changes: 1 addition & 1 deletion api/reviewer_api/services/documentservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,4 +500,4 @@ def __get_close_datetime(self, request_json):
if state['status'] == StateName.response.value and isresponsephasecompleted == False:
isresponsephasecompleted = True
return generatedbefore if isresponsephasecompleted == True else None


Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ def gets3documenthashcode(producermessage):
for line in response.iter_lines():
sig.update(line)

return (sig.hexdigest(), pagecount)
return (sig.hexdigest(), pagecount)
11 changes: 7 additions & 4 deletions web/src/components/FOI/Home/Redlining.js
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,9 @@ const Redlining = React.forwardRef(
set
) => {
slicedsetofdoclist.forEach(async (filerow) => {
await createDocument(filerow.s3url, { useDownloader: false }).then(async (newDoc) => {
await createDocument(filerow.s3url,
{ useDownloader: false } // Added to fix BLANK page issue
).then(async (newDoc) => {
setpdftronDocObjects((_arr) => [
..._arr,
{
Expand Down Expand Up @@ -2892,7 +2894,7 @@ const Redlining = React.forwardRef(
for (let doc of documentlist) {
await _instance.Core.createDocument(doc.s3path_load, {
loadAsPDF: true,
useDownloader: false,
useDownloader: false, // Added to fix BLANK page issue
}).then(async (docObj) => {
//if (isIgnoredDocument(doc, docObj.getPageCount(), divisionDocuments) == false) {
docCount++;
Expand Down Expand Up @@ -3001,7 +3003,9 @@ const Redlining = React.forwardRef(
) => {
for (const filerow of sliceDoclist) {
try {
await createDocument(filerow.s3path_load, { useDownloader: false }).then(async (newDoc) => {
await createDocument(filerow.s3path_load,
{ useDownloader: false } // Added to fix BLANK page issue
).then(async (newDoc) => {
docCount++;
setredlineDocCount(docCount);
if (isIgnoredDocument(filerow, newDoc, divisionDocuments) === false) {
Expand Down Expand Up @@ -3201,7 +3205,6 @@ const Redlining = React.forwardRef(
// saves the document with annotations in it
xfdfString: xfdfString,
downloadType: downloadType,
// flags: docInstance.Core.SaveOptions.LINEARIZED,
//flatten: true, //commented this as part of #4862
})
.then(async (_data) => {
Expand Down

0 comments on commit f606783

Please sign in to comment.