[PR #2345] [CLOSED] refactor: consolidate get-pdf #2233

Closed
opened 2026-02-26 20:33:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/2345
Author: @tedliang
Created: 12/22/2025
Status: Closed

Base: mainHead: refactor/get-pdf


📝 Commits (1)

  • b63b2c7 refactor: consolidate get-pdf

📊 Changes

8 files changed (+62 additions, -161 deletions)

View changed files

📝 apps/remix/app/components/general/app-command-menu.tsx (+2 -2)
📝 apps/remix/app/routes/api+/locale.tsx (+2 -2)
📝 apps/remix/app/storage/lang-cookie.server.ts (+2 -1)
📝 packages/lib/constants/i18n.ts (+2 -0)
📝 packages/lib/jobs/definitions/internal/seal-document.handler.ts (+22 -41)
packages/lib/server-only/htmltopdf/get-certificate-pdf.ts (+0 -94)
📝 packages/lib/server-only/htmltopdf/get-pdf-via-playwright.ts (+30 -19)
📝 packages/ui/components/common/language-switcher-dialog.tsx (+2 -2)

📄 Description

Description

Consolidate get-audit-logs-pdf and get-certificate-pdf into get-pdf.
Make it easier to support different conversion service, eg. Gotenberg (once #2322 is merged)

N/A

Changes Made

  • Extract lang cookie key.
  • Remove 92 lines of duplicated code for pdf conversion with Playwright.

Testing Performed

  • Tested on browser Chrome.

Checklist

  • I have tested these changes locally and they work as expected.
  • I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

Additional Notes


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/2345 **Author:** [@tedliang](https://github.com/tedliang) **Created:** 12/22/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `refactor/get-pdf` --- ### 📝 Commits (1) - [`b63b2c7`](https://github.com/documenso/documenso/commit/b63b2c7be2a912ef5a51634db44d1eb6f5756cd8) refactor: consolidate get-pdf ### 📊 Changes **8 files changed** (+62 additions, -161 deletions) <details> <summary>View changed files</summary> 📝 `apps/remix/app/components/general/app-command-menu.tsx` (+2 -2) 📝 `apps/remix/app/routes/api+/locale.tsx` (+2 -2) 📝 `apps/remix/app/storage/lang-cookie.server.ts` (+2 -1) 📝 `packages/lib/constants/i18n.ts` (+2 -0) 📝 `packages/lib/jobs/definitions/internal/seal-document.handler.ts` (+22 -41) ➖ `packages/lib/server-only/htmltopdf/get-certificate-pdf.ts` (+0 -94) 📝 `packages/lib/server-only/htmltopdf/get-pdf-via-playwright.ts` (+30 -19) 📝 `packages/ui/components/common/language-switcher-dialog.tsx` (+2 -2) </details> ### 📄 Description ## Description Consolidate get-audit-logs-pdf and get-certificate-pdf into get-pdf. Make it easier to support different conversion service, eg. Gotenberg (once #2322 is merged) ## Related Issue N/A ## Changes Made <!--- Provide a summary of the changes made in this pull request. --> <!--- Include any relevant technical details or architecture changes. --> - Extract lang cookie key. - Remove 92 lines of duplicated code for pdf conversion with Playwright. ## Testing Performed <!--- Describe the testing that you have performed to validate these changes. --> <!--- Include information about test cases, testing environments, and results. --> - Tested on browser Chrome. ## Checklist <!--- Please check the boxes that apply to this pull request. --> <!--- You can add or remove items as needed. --> - [X] I have tested these changes locally and they work as expected. - [X] I have added/updated tests that prove the effectiveness of these changes. - [X] I have updated the documentation to reflect these changes, if applicable. - [X] I have followed the project's coding style guidelines. - [X] I have addressed the code review feedback from the previous submission, if applicable. ## Additional Notes <!--- Provide any additional context or notes for the reviewers. --> <!--- This might include details about design decisions, potential concerns, or anything else relevant. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 20:33:00 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#2233
No description provided.