You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you include an image field in the template, and provide a sample image, the behaviour in the Viewer and the Generator is different. If no input value is defined for the image, the viewer renders the sample image while the generator doesn't render the image.
Looking at how other plugins behave, I expect the behaviour we see in the Generator: don't display the image when no input value is provided.
I love the project by the way, thanks for the great work!
To Reproduce
define template with image field. Either use the default sample image, or upload one.
use the viewer with the templat and do not provide input data for the field. The sample image is displayed.
use the generator with the template and do not provide input data for the field. The sample image is not displayed.
Expected behavior
The expected behavior is 1) consistency between viewer end generator and 2) that sample data is not rendered in either, unless explicitly provided as input.
Your Environment
- pdfme package(@pdfme/generator or @pdfme/ui):
- both, including @pdfme/schemas- pdfme version:
- 3.2.1
- Operating system:
- MacOs
- Node.js version or Browser name & version:
- NodeJS 18.18.2.
- Chrome: Version 120.0.6099.234 (Official Build) (arm64)
Your Error Log
no error logs
Additional context
No response
The text was updated successfully, but these errors were encountered:
What is the desired behaviour from your perspective? I could make the change and submit a PR if you want.
It could either be an easy fix: change the image plugin to stop displaying the sample image in the Viewer.
Or it could be a bit more elaborate, by additionally implementing an option in both the viewer and the generator that determines whether the sample data should be used for fields without input data.
Describe the bug
When you include an image field in the template, and provide a sample image, the behaviour in the Viewer and the Generator is different. If no input value is defined for the image, the viewer renders the sample image while the generator doesn't render the image.
Looking at how other plugins behave, I expect the behaviour we see in the Generator: don't display the image when no input value is provided.
I love the project by the way, thanks for the great work!
To Reproduce
Expected behavior
The expected behavior is 1) consistency between viewer end generator and 2) that sample data is not rendered in either, unless explicitly provided as input.
Your Environment
Your Error Log
Additional context
No response
The text was updated successfully, but these errors were encountered: