Image is not loaded in UWP print preview

Preveen 216 Reputation points
2020-06-28T20:46:27.313+00:00

Hi,
When the print preview is generated for my app, the logo is not loaded.
When I save the print as a PDF (using 'Microsoft Print to PDF'), the logo is there.

When I close the preview, and click the print button again, the logo is loaded in the preview (and also in the PDF).

Here's part of my code:

BitmapImage logoBitmap = new BitmapImage(new Uri("ms-appx:///Assets/Images/logo.png"));

Image companyLogoImage = new Image()
{
    Width = 300,
    HorizontalAlignment = HorizontalAlignment.Left,
    VerticalAlignment = VerticalAlignment.Top,
    Source = logoBitmap
};

It's not that big of a deal for me as the logo is included in the export (I haven't printed it, but I assume it might print with the logo), but the user will not like it as they expect an actual print preview!

Any help is appreciated.

Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Gareth Williams 41 Reputation points
    2021-06-28T11:01:51.303+00:00

    Any update on this issue - I last posted that I was having the same problem nearly a year ago now.
    And it is still an issue.
    In fact a new issue has cropped up - I print a datagrid and have it configured so that alternate rows are greyed so you can read the rows better.
    This works on the print preview
    but it does not print on my canon ink jet.
    but it does print on my hp laser jet

    Very disappointed at these bugs and no resolution for a year.

    0 comments No comments