Skip to content

Commit

Permalink
Merge pull request #17 from uptick/feat/papersize-2
Browse files Browse the repository at this point in the history
fix(playwright): fix papersize argument
  • Loading branch information
uptickmetachu authored May 16, 2024
2 parents 901f7f9 + 6302389 commit 5dfb0df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Event payload body.
| **document_url** | url | Fetch the html content from `document_url` to disk before rendering. |
| **browser_url** | url | Browser the `browser_url` with `playwright` before rendering with `renderer` |
| **browser_headers** | Mapping[str,str] | Add additional headers to playwright before visiting `browser_url` |
| **browser_papersize** | `A4` or `letter` | Size of the page when creating PDF with playwright | |
| **browser_papersize** | `A4` or `Letter` | Size of the page when creating PDF with playwright | |
| **renderer** | `princexml` or `playwright` | Renderer to render the html with |
| **bucket_name** | string | Output the resulting pdf to `s3://{bucket_name}/{uuid}.pdf`. The lambda will require permission to upload to the bucket. The response will include `bucket`, `key`, `presigned_url` |
| **presigned_url** | url | Output the resulting pdf to the presigned url. Generate the presigned url with `put_object`. See Output for more information. |
Expand Down
2 changes: 1 addition & 1 deletion lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Renderers(str, enum.Enum):

class Papersize(str, enum.Enum):
A4 = "A4"
Letter = "letter"
Letter = "Letter"


class Payload(pydantic.BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lambda_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_check_license_returns_a_license_payload() -> None:


@pytest.mark.parametrize("renderer", ["princexml", "playwright"])
@pytest.mark.parametrize("browser_papersize", ["A4", "letter"])
@pytest.mark.parametrize("browser_papersize", ["A4", "Letter"])
class TestRenderers:
def test_generating_pdf_from_document_url(self, renderer: str, browser_papersize: str):
s3_client = get_s3_client()
Expand Down

0 comments on commit 5dfb0df

Please sign in to comment.