CDLUC3 / dmptool

DMPTool version of the DMPRoadmap codebase
https://dmptool.org
MIT License
56 stars 13 forks source link

Insert logo in pages off pdf #498

Closed fcsousaunifesp closed 3 months ago

fcsousaunifesp commented 11 months ago

Good night team. We are customizing the files in pdf and we would like to insert the logo of the institutions in their respective reports. Do you have any idea how to do it? We're running? (e.g. v4.0.9) This is my pdf file used as an example. Planopgd-FCS_com_certificação_orcid.pdf I left this screen logo_in_pdf

Best Regards Flavio Castro de Sousa Técnico em Tecnologia da Informação Superintendência de Tecnologia da Informação UNIFESP - Reitoria

briri commented 11 months ago

Hi @fcsousaunifesp we have not tried doing that here. The Rails application uses the wicked_pdf gem which runs a C program called wkhtmltopdf which runs on the server's OS to generate the PDF file. It basically converts HTML into PDF, but it does not have access to the normal Rails path's, so if you have to use absolute paths for your <img src="???"/>. Here is the documentation about that.

Depending on your setup, the logos may be stored on the server's disk, an S3 bucket, etc. You would have to see the gem's documentation for how to get the path you need. It should be stored in the orgs table in one of the logo columns.