Design&Print: Table - output-problem

Started by sinus, February 11, 2016, 07:12:22 PM

Previous topic - Next topic

sinus

Hi,
I have created, with help of the imatch-help-file, a XAML-table in the printing-modul.

It looks nice and works perfectly in the Preview.
But if I print this out, then the table is far too small, not readable.

This is also the case with "Microsoft Print to PDF" and also with "Adobe PDF".

See the attachement.

And here is the code from the table. (I have never thought, that creating a table can make fun!  ;D)
<Border Width="500" Background="#F6CEF5" Height="310" Padding="5,5,5,5">

  <Grid VerticalAlignment="Top" HorizontalAlignment="Left">

    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="140"/>
      <ColumnDefinition Width="72"/>
      <ColumnDefinition Width="50"/>
      <ColumnDefinition Width="230"/>
    </Grid.ColumnDefinitions>
 
    <Grid.RowDefinitions>
      <RowDefinition Height="75"/>
      <RowDefinition Height="75"/>
      <RowDefinition Height="75"/>
      <RowDefinition Height="75"/>
      <RowDefinition Height="75"/>
    </Grid.RowDefinitions>

    <TextBlock Grid.Column="0" Grid.Row="0" TextWrapping="Wrap" Background= "#D8D8D8" Foreground="#000000" Padding="5,5,5,5"><LineBreak/>Internet, Beamer - Präsentationen usw.</TextBlock>
    <TextBlock Grid.Column="1" Grid.Row="0" HorizontalAlignment= "Right"  Background="#FAFAFA" Foreground="#000000" Padding="5,5,5,5">1 - 2 Fotos<LineBreak/>3 - 5 Fotos<LineBreak/>6 - 10 Fotos<LineBreak/>ab 11 Fotos</TextBlock>
    <TextBlock Grid.Column="2" Grid.Row="0" HorizontalAlignment= "Right"   Background="#D8D8D8" Foreground="#000000" Padding="5,5,5,5"> je 75.-- <LineBreak/>je 70.--<LineBreak/>je 60.--<LineBreak/> je 50.--</TextBlock>
    <TextBlock Grid.Column="3" Grid.Row="0" TextWrapping="Wrap" Background="#FAFAFA" Foreground="#000000" Padding="5,5,5,5"><LineBreak/>jeweils für einen Zeitraum von 6 Monaten</TextBlock>

  <TextBlock Grid.Column="0" Grid.Row="1" TextWrapping="Wrap" Background= "#A4A4A4" Foreground="#000000" Padding="5,5,5,5"><LineBreak/>Zeitungsartikel, Zeitschriften</TextBlock>
    <TextBlock Grid.Column="1" Grid.Row="1" HorizontalAlignment= "Right"  Background="#BDBDBD" Foreground="#000000" Padding="5,5,5,5">1 - 2 Fotos<LineBreak/>3 - 5 Fotos<LineBreak/>6 - 10 Fotos<LineBreak/>ab 11 Fotos</TextBlock>
    <TextBlock Grid.Column="2" Grid.Row="1" HorizontalAlignment= "Right"   Background="#A4A4A4" Foreground="#000000" Padding="5,5,5,5">je 90.-- <LineBreak/>je 85.--<LineBreak/>je 75.--<LineBreak/> je 70.--</TextBlock>
    <TextBlock Grid.Column="3" Grid.Row="1" TextWrapping="Wrap" Background="#BDBDBD" Foreground="#000000" Padding="5,5,5,5">Gilt nur je für eine Veröffentlichung, für weitere Verwendungen kommt der gleiche Tarif mit 20% Ermässigung zur Anwendung.</TextBlock>

  <TextBlock Grid.Column="0" Grid.Row="2" TextWrapping="Wrap" Background= "#D8D8D8" Foreground="#000000" Padding="5,5,5,5"><LineBreak/>Flyer, Prospekte, Hefte, Bücher usw.</TextBlock>
    <TextBlock Grid.Column="1" Grid.Row="2" HorizontalAlignment= "Right"  Background="#FAFAFA" Foreground="#000000" Padding="5,5,5,5">1 - 2 Fotos<LineBreak/>3 - 5 Fotos<LineBreak/>6 - 10 Fotos<LineBreak/>ab 11 Fotos</TextBlock>
    <TextBlock Grid.Column="2" Grid.Row="2" HorizontalAlignment= "Right"   Background="#D8D8D8" Foreground="#000000" Padding="5,5,5,5">je 120.--<LineBreak/>je 110.--<LineBreak/>je 95.--<LineBreak/> je 80.--</TextBlock>
    <TextBlock Grid.Column="3" Grid.Row="2" TextWrapping="Wrap" Background="#FAFAFA" Foreground="#000000" Padding="5,5,5,5">Gilt nur je für eine Veröffentlichung, für weitere Verwendungen kommt der gleiche Tarif mit 20% Ermässigung zur Anwendung.</TextBlock>


  <TextBlock Grid.Column="0" Grid.Row="3" TextWrapping="Wrap" Background= "#A9F5A9" Foreground="#000000" Padding="5,5,5,5"><LineBreak/>Generelles Verwendungsrecht</TextBlock>
    <TextBlock Grid.Column="1" Grid.Row="3" HorizontalAlignment= "Right"  Background="#CEF6CE" Foreground="#000000" Padding="5,5,5,5">1 - 2 Fotos<LineBreak/>3 - 5 Fotos<LineBreak/>6 - 10 Fotos<LineBreak/>ab 11 Fotos</TextBlock>
    <TextBlock Grid.Column="2" Grid.Row="3" HorizontalAlignment= "Right"   Background="#A9F5A9" Foreground="#000000" Padding="5,5,5,5">je 160.--<LineBreak/>je 140.--<LineBreak/>je 120.--<LineBreak/> je 105.--</TextBlock>
    <TextBlock Grid.Column="3" Grid.Row="3" TextWrapping="Wrap" Background="#CEF6CE" Foreground="#000000" Padding="5,5,5,5">Sie können ein Foto so oft und wo Sie wollen, verwenden. <LineBreak/>Für viele Firmen eine sehr interessante Variante.</TextBlock>

  </Grid>
</Border>


Does someone has an idea, what I could do?
Maybe my code for the table is wrong?

Thanks for any hint.

[attachment deleted by admin]
Best wishes from Switzerland! :-)
Markus

Mario

Unfortunately, the only measures currrently supported by XAML markup are pixel.
And 300 pixel on a 72 DPI preview and 300 pixel on a 600 DPI printer result in totally different dimensions.
This is a 3rd party component and I hope they will support for a device-independent measures like cm.
Maybe you can work around this by using variables instead of absolute units, and then make the variable return different values for preview/printer.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Quote from: Mario on February 11, 2016, 08:22:07 PM
Unfortunately, the only measures currrently supported by XAML markup are pixel.
And 300 pixel on a 72 DPI preview and 300 pixel on a 600 DPI printer result in totally different dimensions.
This is a 3rd party component and I hope they will support for a device-independent measures like cm.
Maybe you can work around this by using variables instead of absolute units, and then make the variable return different values for preview/printer.

Thanks, Mario,
yep, this seems to be the problem.

So, generally, it would be the best (just in case), to use pixel, if we want create complex templates. Right?

Hm, the variable-solutions seems interesting, I have to think about this, how such a variable should looks like.




Best wishes from Switzerland! :-)
Markus

Mario

If you use pixel, the preview and the final print output will never look the same.
You can use percentages to specify the width of columns, which works for all resolutions. If you create 4 columns with 50%,30%,20%,20% your table should look the same in both preview and high-res print.

See also ColumnDefinitions in the XAML help topic.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook