Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

str_replace inside app/Utils/Traits/Pdf/PdfMaker.php break PDFs #9373

Closed
Striffly opened this issue Mar 13, 2024 · 0 comments
Closed

str_replace inside app/Utils/Traits/Pdf/PdfMaker.php break PDFs #9373

Striffly opened this issue Mar 13, 2024 · 0 comments
Labels

Comments

@Striffly
Copy link
Contributor

Striffly commented Mar 13, 2024

Setup

  • Version: v5.8.35
  • Environment: ZIP

Interface

  • Flutter: [x]
  • React: []
  • Both: []

Describe the bug

Source of problem : db37b50

When generating a PDF (invoice/quotation), some resources hosted on localhost are not accessible. For example, I have some fonts and images that are only accessible on .localhost domains : they are displayed in the HTML preview but not when generating the PDF.

Also, this commit also affects the CSS: certain tags (iframe, etc.) are removed from the CSS that I include in a style tag in my templates, which breaks the design of my PDFs.

I'm not exactly sure in which situations this commit is useful, which is why I'm not suggesting deleting it via a PR. However, it seems important to me that the cases I mentioned be taken into account.

Steps To Reproduce

  • Have a custom PDF template with some strings inside (iframe, localhost)
  • Display bill or quote
  • Generate a PDF

Expected Behavior

Keep all the tags inside my PDF : see my fonts & images, see all of my CSS

Additional context

Invoiceninja & my resources are hosted on a .localhost domain

@Striffly Striffly changed the title Some localhost URLs cannot be fetched when generating PDFs str_replace inside makePdf break PDFs Mar 13, 2024
@Striffly Striffly changed the title str_replace inside makePdf break PDFs str_replace inside makePdf break PDFs Mar 13, 2024
@Striffly Striffly changed the title str_replace inside makePdf break PDFs str_replace inside app/Utils/Traits/Pdf/PdfMaker.php break PDFs Mar 13, 2024
@invoiceninja invoiceninja locked and limited conversation to collaborators Mar 13, 2024
@turbo124 turbo124 converted this issue into discussion #9375 Mar 13, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

1 participant