bcgov / foi-flow

Freedom of Information modernization
Apache License 2.0
4 stars 3 forks source link

NEEDS DISCUSSION - PDFs with Active Hyperlinked Images - Error/Issues #4748

Open KyEggleston opened 7 months ago

KyEggleston commented 7 months ago

Describe the bug in current situation When PDF files with hyperlinked images are uploaded to the Records tab, and subsequently available in the Redaction App, several issues are occurring.

See MAG-2023-32691 in PROD as example.

For example, these two small images are hyperlinked to take them to their respective pages.

Private Zenhub Image

The first issue is the hyperlinked image is creating an annotation in the Comments tab (see image below, circled in yellow). In addition, a yellow paperclip is displayed on the page. The cannot be deleted or removed.

Second, when trying to produce the redline, the creation is stuck in progress, and likely stalled due to an error (presumably) related to this annotation.

Private Zenhub Image

image

Note that files that are converted to PDF through our conversion engine are flattened, and this issue won't occur on those files. This issue is primarily where a PDF is uploaded originally, with hyperlinked images enabled in the PDF.

Link bug to the User Story

Impact of this bug Describe the impact, i.e. what the impact is, and number of users impacted.

Chance of Occurring (high/medium/low/very low)

Pre Conditions: which Env, any pre-requesites or assumptions to execute steps?

PROD and TEST

Steps to Reproduce Steps to reproduce the behavior:

  1. Upload a PDF file with hyperlinked images to the Records tab
  2. Enter the Redaction App
  3. See unknown annotation in Comments pane (yellow paperclip)
  4. Next, flag all pages with an acceptable page flag, and attempt to produce the redline
  5. See error thrown in Console, and creation is stuck in progress

Actual/ observed behaviour/ results

Unable to produce redline or delete annotation

Expected behaviour A clear and concise description of what you expected to happen. Use the gherking language.

Screenshots/ Visual Reference/ Source If applicable, add screenshots to help explain your problem. You an use screengrab.

divyav-aot commented 7 months ago

The first issue is already captured as know issue and created a ticket (#4708) for the same. We can take a look at the second issue based on priority.

divyav-aot commented 7 months ago

@KyEggleston - Could you please share a sample pdf with above issues? Is there any request to refer in test?

KyEggleston commented 7 months ago

Still trying to get that sample file, as it's no longer on the request.

This is the request I'm using for samples in TEST - EDU-2023-1112.

KyEggleston commented 7 months ago

@divyav-aot - Disregard the message above. The file in question is now on MAG-2023-07867 in TEST. When done investigating, if you can wipe this file, and any associated harms, redline or response package, that would be fantastic!

divyav-aot commented 7 months ago

Thanks @KyEggleston, I removed the prod file from the request and s3.

m-prodan commented 7 months ago

@divyav-aot - can you provide an estimate on this when you have a chance? Thanks!

divyav-aot commented 7 months ago

@m-prodan - this is handling as part of #4708. So there is no separate effort for this ticket.

divyav-aot commented 6 months ago

This cannot be tested with normal pdfs. The issue was specific to the prod file with paper clip in it. You can test pdf files with paper clip in it and see if you are getting the error in doc reviewer.

nimya-aot commented 6 months ago

Annotation comment on the main pane shows Legend labeled comment instead of the annotation in the original document

image.png

original doc is

image.png

@divyav-aot could you please check?