Closed enricobenedos closed 2 years ago
Hi and thanks for the issue, I updated the QuestPDF sample to get a higher quality image, this sample will be included in the next update to the web site.
You can generate any image size setting the Width
and Height
properties, in the following sample I am forcing the image to have a size of 1920 x 300 and using the image inside a QuestPDF document.
Result: hello.pdf
I will close this for now, since this seems to be solved, let me know if you face an issue or something is not working properly!
Hi @beto-rodriguez , thanks for your time. I already know usage of Width
and Height
properties but this involve in an unexpected behaviour.
The problem is that aspect ratio changes and even if the resolution is better (also the image quality), it becomes difficulty to read. Also in our example the resulting image is very difficult to read.
My question was about keep a correct aspect ratio maintaining a good image quality.
I think you are right, my solution just hides the problem, but then we have a new one, labels are too small to read now.
There should be a way to draw on the canvas directly in Quest PDF (instead of passing the image), I will re-open to investigate this.
With the latest version, we can draw directly on the canvas, instead of drawing an image on the canvas, this improves quality drastically.
Sample: https://github.com/beto-rodriguez/LiveCharts2/blob/dev/samples/QuestPDFSample/Program.cs
Result: hello.pdf
Thank you @beto-rodriguez, this is what I meant!
Is your feature request related to a problem? Please describe. I'm using this library to integrate it with
QuestPDF
. To do that I will useGetImage()
method in order to obtain anSKImage
from my chart and draw it to pdf.I see that the generated image quality is very poor even if I try to save it to disk with
quality:100
before. Starting from a vectorial concept normally it is possible to export very high quality images.How can I achieve it here? For compatibility reasons I'm using
beta.80
but think that nothing has been changed regarding this feature.Describe the solution you'd like An exported image with a real high quality.