Click here to Skip to main content
15,889,116 members
Home / Discussions / C#
   

C#

 
AnswerRe: Rotate printing Pin
Luc Pattyn21-Apr-09 16:54
sitebuilderLuc Pattyn21-Apr-09 16:54 
GeneralRe: Rotate printing Pin
damichab21-Apr-09 17:12
damichab21-Apr-09 17:12 
GeneralRe: Rotate printing Pin
Luc Pattyn21-Apr-09 17:42
sitebuilderLuc Pattyn21-Apr-09 17:42 
GeneralRe: Rotate printing Pin
damichab21-Apr-09 17:50
damichab21-Apr-09 17:50 
GeneralRe: Rotate printing Pin
Luc Pattyn21-Apr-09 18:02
sitebuilderLuc Pattyn21-Apr-09 18:02 
GeneralRe: Rotate printing Pin
damichab21-Apr-09 19:15
damichab21-Apr-09 19:15 
GeneralRe: Rotate printing Pin
damichab21-Apr-09 19:18
damichab21-Apr-09 19:18 
GeneralRe: Rotate printing Pin
Luc Pattyn22-Apr-09 0:31
sitebuilderLuc Pattyn22-Apr-09 0:31 
Hi David,

Now the code is different, but hardly any closer to what I suggested. Confused | :confused:
Is this the code you were using/describing all along, but failed to reproduce from the start? Mad | :mad:

General questions: if you were to create a Bitmap(10,10) and paint everything in there, then blit it
to the printer somehow at the right size, could it possibly look good? hint: no, lack of information
if you were to create a Bitmap(10000,10000) and paint everything in there, then blit it
to the printer somehow at the right size, could that possibly look good? hint: yes, but slow.

Your Artist bitmap needs to match the print result you want, one bitmap pixel for one printer pixel, so the final DrawImage does not scale up (pixelated) or down (slow and artefacts).

David935 wrote:
Bitmap bitmap = new Bitmap(1,1);
Artist = Graphics.FromImage(bitmap);
int bitMapDpiX = (int) Artist.DpiX; // 96
int bitMapDpiY = (int) Artist.DpiY; // 96


That is perfect code to determine the resolution of the (primary) monitor, and totally unrelated to the printer characteristics.
On the positive side, the result is never used. Just is there to confuse everybody?
The printer's resolution is PrintPageEventArgs.Graphicx.Dpix and Dpiy.
Now did you manage to figure out the actual value of those? is it 100? I don't think so.


David935 wrote:
Artist = Graphics.FromImage(bitmap);
DrawLabel(); // Graphics.DrawXYZ()...
Artist.Dispose();


Oh great. And which Graphics is used inside DrawLabel()????
Or is it really DrawLabel(Artist)?


David935 wrote:
Should I be setting the PageUnits

I never felt the need to do that. For perfect imaging, you need to read the printer characteristics (such as Dpi) and act accordingly, not set imaginary values.

Roll eyes | :rolleyes:

Luc Pattyn [Forum Guidelines] [My Articles]

Avoiding unwanted divs (as in "articles needing approval") with the help of this FireFox add-in


GeneralRe: Rotate printing Pin
damichab22-Apr-09 1:23
damichab22-Apr-09 1:23 
GeneralRe: Rotate printing Pin
Luc Pattyn22-Apr-09 2:08
sitebuilderLuc Pattyn22-Apr-09 2:08 
GeneralRe: Rotate printing Pin
damichab22-Apr-09 4:18
damichab22-Apr-09 4:18 
GeneralRe: Rotate printing Pin
Luc Pattyn22-Apr-09 5:36
sitebuilderLuc Pattyn22-Apr-09 5:36 
GeneralRe: Rotate printing Pin
damichab22-Apr-09 21:01
damichab22-Apr-09 21:01 
GeneralRe: Rotate printing Pin
Luc Pattyn23-Apr-09 1:19
sitebuilderLuc Pattyn23-Apr-09 1:19 
GeneralRe: Rotate printing Pin
damichab23-Apr-09 2:06
damichab23-Apr-09 2:06 
GeneralRe: Rotate printing Pin
Luc Pattyn23-Apr-09 2:44
sitebuilderLuc Pattyn23-Apr-09 2:44 
GeneralRe: Rotate printing Pin
damichab23-Apr-09 3:31
damichab23-Apr-09 3:31 
GeneralRe: Rotate printing Pin
Luc Pattyn23-Apr-09 3:36
sitebuilderLuc Pattyn23-Apr-09 3:36 
GeneralRe: Rotate printing Pin
Luc Pattyn23-Apr-09 5:01
sitebuilderLuc Pattyn23-Apr-09 5:01 
GeneralRe: Rotate printing Pin
damichab22-Apr-09 21:15
damichab22-Apr-09 21:15 
QuestionWebBrowser.ScriptErrorsSuppressed = true and self signed certifcates Pin
jo H21-Apr-09 13:52
jo H21-Apr-09 13:52 
Questionanyone has any problem with Milestone 4 Cosmos? Pin
john231321-Apr-09 11:51
john231321-Apr-09 11:51 
AnswerRe: anyone has any problem with Milestone 4 Cosmos? Pin
Christian Graus21-Apr-09 14:04
protectorChristian Graus21-Apr-09 14:04 
Questionconvert time and minutes Pin
onetreeup21-Apr-09 8:58
onetreeup21-Apr-09 8:58 
AnswerRe: convert time and minutes Pin
PIEBALDconsult21-Apr-09 9:08
mvePIEBALDconsult21-Apr-09 9:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.