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

Lectures: Fix PDF rendering issue in lecture units #9482

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

eceeeren
Copy link
Contributor

@eceeeren eceeeren commented Oct 14, 2024

Checklist

General

Motivation and Context

  1. Current PDF files are not rendering correctly as the Splitter class in PDFBox library does not render them correctly.

It is:
image

Should be:
image

  1. This issue is mentioned on Apache PDFBox Issues page seems to be solved by version 3.0.2.

https://issues.apache.org/jira/browse/PDFBOX-5742

  1. However Splitter class breaks down with version 3.0.2 again.

image

  1. The fix for the second bug is fixed in version 3.0.3.

https://issues.apache.org/jira/browse/PDFBOX-5833

Description

Apache PDFBox version made 3.0.3.

Steps for Testing

Prerequisites:

  • 1 Instructor
  1. Log in to Artemis
  2. Navigate to Course Administration
  3. Click on Lectures and Create a Lecture
  4. Check Unit Processing
  5. Upload a PDF file with an Outline slide (Important! -So that unit processing doesn't break down, this is fixed in another PR)
  6. Observe if the units are created
  7. After saving click View and observe if all of the slides and images inside are rendered correctly

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Screenshots

Fixed Version

image

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Updated the pdfbox library to version 3.0.3, which may include enhancements and bug fixes.
  • Chores

    • Maintained existing configurations for plugins, repositories, and dependencies to ensure project stability.

@eceeeren eceeeren requested a review from a team as a code owner October 14, 2024 18:29
Copy link

coderabbitai bot commented Oct 14, 2024

Walkthrough

The changes in this pull request focus on updating the version of the pdfbox library in the build.gradle file from 3.0.1 to 3.0.3. This update is part of dependency management, maintaining the existing structure of the build file while ensuring compatibility with the newer library version. No new plugins or significant structural changes have been introduced.

Changes

File Change Summary
build.gradle Updated pdfbox dependency version from 3.0.1 to 3.0.3.

Possibly related PRs

Suggested labels

tests, server, client

Suggested reviewers

  • ole-ve
  • JohannesStoehr
  • edkaya
  • FelixTJDietrich

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@eceeeren eceeeren temporarily deployed to artemis-test4.artemis.cit.tum.de October 14, 2024 18:52 — with GitHub Actions Inactive
@HawKhiem HawKhiem temporarily deployed to artemis-test4.artemis.cit.tum.de October 14, 2024 19:39 — with GitHub Actions Inactive
@HawKhiem HawKhiem temporarily deployed to artemis-test4.artemis.cit.tum.de October 14, 2024 19:41 — with GitHub Actions Inactive
@HawKhiem HawKhiem temporarily deployed to artemis-test4.artemis.cit.tum.de October 14, 2024 19:50 — with GitHub Actions Inactive
@HawKhiem HawKhiem temporarily deployed to artemis-test6.artemis.cit.tum.de October 14, 2024 19:52 — with GitHub Actions Inactive
Copy link
Contributor

@az108 az108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code 👍 and tested on TS6, works with the EIST Slides aswell

Copy link
Contributor

@magaupp magaupp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is good 👍
Tested on TS6 with outline concatenated to the PDF from the linked issue. Split works without problems.

@github-actions github-actions bot removed the deployment-error Added by deployment workflows if an error occured label Oct 15, 2024
@Feras797 Feras797 temporarily deployed to artemis-test6.artemis.cit.tum.de October 15, 2024 09:39 — with GitHub Actions Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range comments (1)
build.gradle (1)

Line range hint 1-651: Consider addressing TODOs and updating dependencies.

While reviewing the entire file, I noticed a few areas for potential improvement:

  1. There are several TODO comments throughout the file. It might be beneficial to address these in future updates.
  2. Some dependencies are using older versions. Consider reviewing and updating these where possible to ensure you're using the latest stable versions with security fixes.
  3. There are commented-out dependencies (e.g., Swagger v3). Consider removing these if they're no longer needed or implement them if they're planned features.

Here are some specific suggestions:

  1. Line 35: TODO to increase code coverage minimum.
  2. Line 36: TODO to decrease maximum missed class count.
  3. Line 301-303: Commented-out OpenAPI and Swagger v3 dependencies.

Consider creating issues to track these improvements for future sprints.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between af38b14 and 1575d1a.

📒 Files selected for processing (1)
  • build.gradle (1 hunks)
🧰 Additional context used
🔇 Additional comments (2)
build.gradle (2)

Line range hint 1-651: Overall, the change looks good with some suggestions for future improvements.

The update to PDFBox 3.0.3 directly addresses the PR objective of fixing the PDF rendering problem. The change is minimal and focused, which is commendable.

For future maintenance:

  1. Consider addressing the TODOs in the file.
  2. Review and update other dependencies where possible.
  3. Clean up commented-out code if no longer needed.

These suggestions are not blocking issues but could improve the overall health and maintainability of the project in the long run.


451-451: LGTM! Verify PDF rendering after the update.

The update of the PDFBox library from version 3.0.1 to 3.0.3 is a good step towards resolving the PDF rendering issue. This change aligns with the PR objectives.

To ensure the update resolves the issue without introducing new problems, please run the following verification steps:

After running these checks, please confirm that:

  1. There are no new PDFBox-related errors in the logs.
  2. The correct version (3.0.3) of PDFBox is in the classpath.
  3. PDF rendering works as expected in the Artemis UI.

@JanaNF JanaNF temporarily deployed to artemis-test2.artemis.cit.tum.de October 15, 2024 13:28 — with GitHub Actions Inactive
@krusche krusche changed the title Lectures: Fix PDF rendering problem in Lecture Units Lectures: Fix PDF rendering issue in lecture units Oct 18, 2024
@krusche krusche added this to the 7.6.1 milestone Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants