Yetiforcecrm: [Question] Images in YetiForce-PDF: What is the right approach?

Created on 18 Jul 2019  ·  4Comments  ·  Source: YetiForceCompany/YetiForceCRM

Hi,
Sorry to open a new issue for, but the old-one was closed before solving the problem...

Thanks to the advice from paula-w I know now:
«In order for an image to show in pdf you have to add the domain to the list of trusted domains:
public static $PURIFIER_ALLOWED_DOMAINS = [];
»

Is this the right approach? Do I have to link from external domain?

I have searched for any explanation in documentation, also in your linked resources on git in my PDF-custom-fonts-question (other issue-thank you too! https://github.com/YetiForceCompany/YetiForcePDF#custom-fonts)

There is no advice, how YetiForce recommends to store/link images in PDF.

  1. Is there a update-save Folder/area in the default-installation for? (without add the yetiForce-istallation domain to the list of secure domains)

  2. Or do I have to link the Image from an other «server» anyway, because this is the recommended way to use images in PDF's? And so I have to link with absolute path and add the domain in the list of trusted domains?

IF 2. -> Do I have to do this «hardcoded»/by hand (update-secure?) or in the YetiForce-Backend?
And with the hole value like protocoll and end-slash «https://www.my-domain.com/»? Or only «my-domain.com»?

PS: The initial problem was with the watermark-image. There was the possibility to upload a file. But this was not possible (endless uploading-process), maybe because of [wrong privileges].(https://github.com/YetiForceCompany/YetiForceCRM/issues/11017).

  • So do I have to add the YetiForce-Domain also in the list of the trusted domains??

Thank you for help or hint for the matching documentation
Martin

❔ question

Most helpful comment

great to hear!
Will try to use this path for PDF generation in YetiForce CRM.

thank you z0lo13!

All 4 comments

@mad99 for watermark check the size of the files you upload

right approach is to store the files in storage and add your crm into purrified domains. Also you not limited to put any other preffered img sources

Thank you z0lo13,
So the folder «storage» under root will not overwrite own created «folders» within?

Example:

  1. I create a folder named «own_PDF_Templates» in the root-folder yeti-force.
  2. I create a folder named «own_Media» in the root-folder yeti-force.
  3. I create a folder named «own_Fonts» in the root-folder yeti-force.

Will those three folders be at the same place with the same files within, after an update?

update will not delete any custom files as they are not in the package >
but any update should be tested in development first then rolled out on production server

great to hear!
Will try to use this path for PDF generation in YetiForce CRM.

thank you z0lo13!

Was this page helpful?
0 / 5 - 0 ratings