PDF Generation: Difference between revisions

78 bytes removed ,  13:24, 15 September 2022
no edit summary
No edit summary
No edit summary
Line 12: Line 12:


== Usage ==
== Usage ==
PDF Generation happens only after a successful e-signature/document generation. This is an action that happens [[Asynchronous Operations|a-synchronously]] and as such, it may take a few seconds for the file to be generated.  
PDF Generation happens only after a successful e-signature/document generation. This is an action that happens a-synchronously and as such, it may take a few seconds for the file to be generated.  


If an error occurs during PDF generation, system administrator can usually [[Debug Logs|access a developer log]] for debugging.
If an error occurs during PDF generation, system administrator can usually access a developer log for debugging.


== Considerations ==
== Considerations ==
Line 25: Line 25:
* Missing Images - sometimes, images may not be added to the generated PDF, this is usually an issue with [https://owasp.org/www-community/attacks/csrf CSRF] issues where the embedded image is hosted outside of Salesforce
* Missing Images - sometimes, images may not be added to the generated PDF, this is usually an issue with [https://owasp.org/www-community/attacks/csrf CSRF] issues where the embedded image is hosted outside of Salesforce
* Missing External Content - if you add Charts, Datatables, Calendar or other UI elements using [[Custom Embedded JavaScript Functions|embedded javascript functions]], they may not render well due to limited CSS2 and HTML5 support
* Missing External Content - if you add Charts, Datatables, Calendar or other UI elements using [[Custom Embedded JavaScript Functions|embedded javascript functions]], they may not render well due to limited CSS2 and HTML5 support
* Pagination Issues - adding pages to a template usually works well unless you have also added a [[Child Repeatable Records|repeatable child container]] to the template which pulls too many records. In such scenarios, the default paging mechanism will override any custom added pages to a template
* Pagination Issues - adding pages to a template usually works well unless you have also added a [[Document Contexts|repeatable child container]] to the template which pulls too many records. In such scenarios, the default paging mechanism will override any custom added pages to a template


[[File:Generated PDF.png|thumb|A document trace record with generated Document.pdf file]]
[[File:Generated PDF.png|thumb|A document trace record with generated Document.pdf file]]


== Extending to Functionality ==
== Extending to Functionality ==
Generating PDFs depends on the Flow "3B Docs - Generate PDFs for Document Traces" which runs [[Asynchronous Operations|a-synchronously]] and calls the Apex Method "Generate PDFs for Traces" which accepts a list of [[Document Traces|Document Trace]] ids.  
Generating PDFs depends on the Flow "3B Docs - Generate PDFs for Document Traces" which runs a-synchronously and calls the Apex Method "Generate PDFs for Traces" which accepts a list of [[Document Traces|Document Trace]] ids.  


The APEX Method will then get the contents of the VFP "b3d__GeneratedDocument" which is responsible for the rendering of a generated/e-signed document.
The APEX Method will then get the contents of the VFP "b3d__GeneratedDocument" which is responsible for the rendering of a generated/e-signed document.
[[Category:3B Docs Features]]
[[Category:3B Docs Features]]