Hi Telerik Team,
We're experiencing same results as Willi reported.
The following Code produces the attached JPG of the shrunk PDF. Same result if we print it via an common printer on paper.
01.
using
System;
02.
using
System.IO;
03.
using
System.Linq;
04.
using
Telerik.WinControls.UI;
05.
06.
namespace
afos2care.POCs
07.
{
08.
public
class
gui_tester
09.
{
10.
RadPdfViewer pdf;
11.
RadPdfViewerNavigator nav;
12.
Stream stream;
13.
14.
public
gui_tester()
15.
{ }
16.
17.
public
void
printpdf(
string
path)
18.
{
19.
this
.pdf =
new
RadPdfViewer();
20.
this
.pdf.DocumentLoaded += pdf_DocumentLoaded;
21.
22.
this
.nav =
new
RadPdfViewerNavigator();
23.
24.
string
pdfFile = @
"C:\Program Files (x86)\Telerik\UI for WinForms Q1 2014\Examples\QuickStart\PdfViewer\Sample.pdf"
;
25.
26.
this
.stream = File.OpenRead(pdfFile);
27.
28.
this
.pdf.LoadDocument(stream);
29.
30.
Console.WriteLine(
"Done... so far..."
);
31.
}
32.
33.
void
pdf_DocumentLoaded(
object
sender, EventArgs e)
34.
{
35.
if
(
this
.pdf !=
null
)
36.
{
37.
this
.nav.AssociatedViewer =
this
.pdf;
38.
39.
this
.pdf.Print(
false
);
40.
41.
Console.WriteLine(
"Printed... hopefully..."
);
42.
}
43.
}
44.
}
45.
}
So far so good. The "bad" thing is, that if you use the PrintButton of radPdfViewerNavigator via a Form to initiate the print action, everything is fine ( see JPG of the normal PDF).
Setting the Margins doesn't work, because we don't have a RadPrintDocument.
What's telerik doing behind the PrintButton? ;)
Well... maybe you know an other way to print a pdf directly to a printer without using the acrobat reader as a detour.
Hopefully you can help us.
Greetings from germany,
Gøran