Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
P
poppler
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 612
    • Issues 612
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 40
    • Merge Requests 40
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poppler
  • poppler
  • Merge Requests
  • !797

Open
Created Jan 28, 2021 by Mahmoud Khalil@mkhalil
  • Report abuse
Report abuse

Provide the wasReconstructed value to the caller

  • Overview 37
  • Commits 1
  • Pipelines 28
  • Changes 16

This MR modifies poppler's PDFDoc class to provide a method to check whether the xref table has been reconstructed or not indicating that the file might be broken. For the poppler library itself:

  • Refactored the wasReconstructed variable inside PDFDoc::setup() to be an instance variable of the PDFDoc
  • Created a getter method for it

For poppler-qt5:

  • Created a wrapper method inside the Document class, in which we just call the loaded PDFDoc instance checkIfReconstructed method

For qt5 demos:

  • Show a message box indicating that the PDF might be broken if we detected it using the added method in poppler-qt5

I tried testing the implementation using a sample PDF file where I just added some bytes to the content of the file and it detected that it may be broken. However, when I tried modifying the addresses of the objects in the xref table of the file, it didn't detect that the xref has been reconstructed when we're fetching the objects in the fetch() method.

@aacid

FIXES #416

Edited Apr 16, 2021 by Mahmoud Khalil
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: wip/mkhalil/provide-wasReconstructed-value-to-caller