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

[Bug]: URL to PDF #2420

Open
1 task done
alexpi4 opened this issue Dec 9, 2024 · 1 comment
Open
1 task done

[Bug]: URL to PDF #2420

alexpi4 opened this issue Dec 9, 2024 · 1 comment

Comments

@alexpi4
Copy link

alexpi4 commented Dec 9, 2024

Installation Method

Docker

The Problem

Error in URL to PDF

url: https://packtypebot.com.br/ativando-google-sheets-e-google-login-no-typebot/

Error: 500 Internal Server Error
close
java.io.IOException: Command process failed with exit code 1. Error message: WARNING: Ignored contain-intrinsic-size: 3000px 1500px at 1:48, unknown property. WARNING: Ignored box-shadow: none at 6:3, unknown property. WARNING: Ignored word-break:break-word at 1:500, invalid value. WARNING: Ignored box-shadow:none at 1:678, unknown property. WARNING: Ignored padding:calc(.667em + 2px) calc(1.333em + 2px) at 1:694, invalid value. WARNING: Expected a media type, got '(min-width:782px)' WARNING: Invalid media type ' (min-width:782px)' the whole @media rule was ignored at 1:5093. WARNING: Expected a media type, got '(max-width:781px)' WARNING: Invalid media type ' (max-width:781px)' the whole @media rule was ignored at 1:5368. WARNING: Expected a media type, got '(min-width:782px)' WARNING: Invalid media type ' (min-width:782px)' the whole @media rule was ignored at 1:5486. WARNING: Ignored word-break:break-word at 1:6123, invalid value. WARNING: Ignored padding:calc(.667em + 2px) at 1:8788, invalid value. WARNING: Ignored width:-moz-fit-content at 1:10249, invalid value. WARNING: Ignored width:fit-content at 1:10272, invalid value. WARNING: Ignored overflow:clip at 1:10768, invalid value. WARNING: Ignored box-shadow:none at 1:25642, unknown property. WARNING: Expected a media type, got '(prefers-reduced-motion:reduce)' WARNING: Invalid media type ' (prefers-reduced-motion:reduce)' the whole @media rule was ignored at 1:26276. WARNING: Ignored box-shadow:none at 1:30954, unknown property. WARNING: Ignored width:-moz-fit-content at 1:31380, invalid value. WARNING: Ignored width:fit-content at 1:31403, invalid value. WARNING: Ignored width:-moz-fit-content at 1:31673, invalid value. WARNING: Ignored width:fit-content at 1:31696, invalid value. WARNING: Ignored width:calc(50% - 1em) at 1:32939, invalid value. WARNING: Expected a media type, got '(min-width:600px)' WARNING: Invalid media type ' (min-width:600px)' the whole @media rule was ignored at 1:36002. WARNING: Ignored backdrop-filter:blur(3px) at 1:42871, unknown property. WARNING: Ignored mask-image:linear-gradient(0deg,#000 20%,#0000) at 1:42976, unknown property. WARNING: Ignored text-shadow:0 0 1.5px #000 at 1:43338, unknown property. WARNING: Invalid or unsupported selector, '.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar' WARNING: Invalid or unsupported selector, '.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-track' WARNING: Invalid or unsupported selector, '.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-thumb' WARNING: Invalid or unsupported selector, '.wp-block-gallery.has-nested-images figure.wp-block-image

Version of Stirling-PDF

frooodle/s-pdf:0.32.0

Last Working Version of Stirling-PDF

No response

Page Where the Problem Occurred

https://packtypebot.com.br/ativando-google-sheets-e-google-login-no-typebot/

Docker Configuration

DOCKER_ENABLE_SECURITY=false
INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false
LANGS=en_GB

Relevant Log Output

No response

Additional Information

EASYPANEL

Browsers Affected

Chrome

No Duplicate of the Issue

  • I have verified that there are no existing issues raised related to my problem.
Copy link

dosubot bot commented Dec 9, 2024

Hey @alexpi4! I'm here to help you with any bugs, questions, or contributions. Let's tackle this together while we wait for a human maintainer.

The 500 Internal Server Error you're encountering during the URL to PDF conversion in Stirling-PDF seems to be related to unsupported or invalid CSS properties and media queries. The error message indicates several warnings about ignored CSS properties and invalid media types, which can cause the WeasyPrint command to fail.

Here are some steps you can take to address this issue:

  1. CSS Simplification: Try simplifying the CSS of the webpage you are converting. Remove or modify unsupported properties like contain-intrinsic-size, box-shadow, word-break, padding with calc(), and width with fit-content. Also, ensure that media queries are correctly formatted.

  2. Media Queries: The error mentions invalid media types such as (min-width:782px) and (max-width:781px). Ensure that these media queries are correctly defined and supported by WeasyPrint.

  3. Unsupported Selectors: The error also highlights unsupported selectors like ::-webkit-scrollbar. Consider removing or altering these selectors in the CSS.

  4. WeasyPrint Limitations: Be aware that WeasyPrint, the tool used by Stirling-PDF for rendering, has limitations regarding CSS support. You might need to adjust the CSS to fit within these limitations.

  5. Update Stirling-PDF: Ensure you are using the latest version of Stirling-PDF, as updates may include improvements in handling such issues.

If these steps do not resolve the issue, you might need to manually adjust the webpage's CSS or consider using a different tool that better supports complex CSS for PDF conversion.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant