When drawing a 600 DPI picture in a area, I see people getting a 72DPI garbage result. I couldn’t find in the manual how to set the resolution to the usual standards 150, 300 and 600 DPI. Am I missing something or is it an incomplete feature? Still a WIP, or the manual is not clear, or am I being myopic here?
Indeed, i missed something in the Blog: myImage.Width/3,
The division by Three.
Now my Image is crisp.
There are still some open questions:
placing text at g.DrawText(“X”, 590, 840) will meet the lower right corner of my A4 page. This equates to 72 dpi. However the Image obviously has better resolution. Why is the x, y reference not according to the resolution?
I need to place g.DrawText(“X”, 0, 10) to meet the left upper corner. Why is y=10 needed, not 0?
this is the important one:
I am rewriting code where I placed container controles
ccList_Purchaseitems.DrawInto(g, 0, 0)
How do I do this in the pdf? Of corse, I could run through my lists and place all Items, Quantities and Prices as text. But I am strongly hoping to avoid this, as all is neatly placed in the container
maybe interesting to others: you can use fractions
g.DrawText(“- |”, 300, 400)
g.DrawText(“- |”, 300.5, 400.5)
g.DrawText(“- |”, 301, 401)
This will be placed at three different locations
PDFs do not have an intrinsic pixel resolution. They are resolution-independent. In fact, the coordinates you are referencing are in PPI - points per inch. There are 72 points per inch in all modern vector systems, which conveniently corresponded to older computer monitors which were 72 DPI - dots per inch. Hence the confusion.
This is also why you can use fractional values for coordinates: points can be subdivided indefinitely, unlike dots or pixels.