Click here to Skip to main content
       

Silverlight / WPF

 
GeneralRe: Command Binding PinmemberAndy_L_J23-Nov-12 1:48 
QuestionWPF Components For WinForm Pinmemberalirezamansoori13-Nov-12 5:26 
AnswerRe: WPF Components For WinForm PinprotectorPete O'Hanlon13-Nov-12 7:56 
AnswerRe: WPF Components For WinForm PinmvpAbhinav S13-Nov-12 21:17 
GeneralRe: WPF Components For WinForm Pinmemberalirezamansoori14-Nov-12 20:40 
QuestionCan anyone suggest any good books or tutorials on WPF-MVVM please? PinmemberVijay Kanda11-Nov-12 19:22 
AnswerRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? PinmemberRags151213-Nov-12 7:22 
GeneralRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? PinmemberVijay Kanda13-Nov-12 21:56 
AnswerRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? PinmvpAbhinav S13-Nov-12 21:19 
GeneralRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? PinmemberVijay Kanda13-Nov-12 21:59 
GeneralRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? PinmvpAbhinav S13-Nov-12 23:09 
QuestionDatabinding ICollectionView to DataGrid WPF C# [modified] Pinmembermaycockt8-Nov-12 5:57 
AnswerRe: Databinding ICollectionView to DataGrid WPF C# Pinmembermaycockt8-Nov-12 22:42 
QuestionPrinting with more than 96 dpi in WPF [modified] PinmemberMember 45210688-Nov-12 2:22 
Let me explain the problem, I'm getting stuck in it
 
If I change the dpi settings from the dialog of Printing Preferences of a virtual printer like PDF Creator or any printer that allows to change this setting, and then set a breakpoint like the code below:
 
        PrintDialog printDialog = new PrintDialog(); 
        if ((bool)printDialog.ShowDialog().GetValueOrDefault())
        {
 
                System.Printing.PrintCapabilities capabilities =  printDialog.PrintQueue.GetPrintCapabilities(printDialog.PrintTicket);
               ...... insert breakpoint here 
         }
 

I can see that the properties printDialog.PrintTicket.PageResolution.X; and printDialog.PrintTicket.PageResolution.Y change values correctly while printDialog.PrintTicket.PageMediaSize.Width and printDialog.PrintTicket.PageMediaSize.Height don't change despite the printer resolution change... an A4 paper in portrait mode will always have PageMediaSize.Height = 1122.5196850393702 and PageMediaSize.Width = 793.70078740157476 no matter which resolution is set before ..... for WPF the unit size of these dimensions is set to 1/96th inch but when is Ok on screen because default screen resolution is 96 dpi on the other side is wrong on the printer because it has a different resolution, in other words confuting that Height and Width of the paper are read only properties if I cannot find the way to tell WPF that the unit size of the printer is not 1/96th inch but for example 1/300th inch (if on the printer I previously set 300 dpi ) there's absolutely no way to print at higher resolution than 96dpi

 
A last note, in my specific case I cannot use RenderTargetBitmap and then resize all to match printer's paper height and width settings because I'm printing high definition barcode images and it would cause an image rescaling that would make the barcode unreadable on final paper because i create it with the purpose to be printed with a resolution of 300dpi which without a resizing will result out of bounds because WPF is telling me the printer paper dimensions in the wrong unit size (1/96th inch) despite the real dpis prevoiusly set on printer
 
Hoping to have clarified enough the problem,
 
thanks in advance,
Dave
 
PS

A hint to reproduce the issue is doing a printing with PrintVisual or PrintDocument methods with different printer resolution set before in the PrintDialog, the output will always be the same

modified 8-Nov-12 13:50pm.

AnswerRe: Printing with more than 96 dpi in WPF PinmemberSuper Lloyd14-Nov-12 16:16 
GeneralRe: Printing with more than 96 dpi in WPF [modified] PinmemberMember 452106819-Nov-12 22:26 
QuestionI have issues with the C# WPF WebBrowser class PinmemberXarzu6-Nov-12 20:14 
AnswerRe: I have issues with the C# WPF WebBrowser class PinmemberGerry Schmitz7-Nov-12 11:04 
QuestionBlurry Borderline In FlowDocument PinmemberFocusedWolf6-Nov-12 10:46 
AnswerRe: Blurry Borderline In FlowDocument PinmemberGerry Schmitz7-Nov-12 13:13 
AnswerRe: Blurry Borderline In FlowDocument [modified] PinmemberFocusedWolf7-Nov-12 16:00 
QuestionBinding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 8:16 
AnswerRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 8:29 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 8:54 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 9:00 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 9:22 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 9:29 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 9:37 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 9:44 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 10:02 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 10:13 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 10:22 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 10:27 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 10:28 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer7-Nov-12 3:53 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon7-Nov-12 4:01 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer7-Nov-12 5:24 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer8-Nov-12 4:30 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer8-Nov-12 5:53 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer8-Nov-12 10:13 
Questionslide menu PinmemberHimmelDeveloper2-Nov-12 6:51 
AnswerRe: slide menu PinmvpRichard MacCutchan2-Nov-12 10:27 
QuestionCustomized Scrollbar not working properly PinmemberAnil_S.Kamble2-Nov-12 5:11 
QuestionCustom TreeViewItems PinmvpJohn Simmons / outlaw programmer2-Nov-12 4:06 
AnswerRe: Custom TreeViewItems PinmemberSledgeHammer012-Nov-12 6:47 
QuestionHow to detect if the users pressed Ctrl and V at the same time? Pinmembergmf1-Nov-12 11:26 
AnswerRe: How to detect if the users pressed Ctrl and V at the same time? PinprotectorPete O'Hanlon1-Nov-12 11:49 
GeneralRe: How to detect if the users pressed Ctrl and V at the same time? Pinmembergmf1-Nov-12 13:28 
GeneralRe: How to detect if the users pressed Ctrl and V at the same time? PinprotectorPete O'Hanlon1-Nov-12 13:34 
QuestionXAML Diff Source Compare Pinmember_Maxxx_30-Oct-12 15:04 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 18 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid