stevejknight
asked on
Set Printer Delivery Extension Default Page Size
I have set up the sample Printer Delivery Extension as per the MSDN.
The Delivery code works but the page is printing in Letter size 8.5/11.5 inches
I wish the default size to be A4 21.0x29.7 cm.
I have changed the C#. as below.
Rebuilt the assembly and copied the to the reporting server, place the code in the correct folders, restarted IIS and Report Server.
The changed as seen on the subsciption page. Ie the new default sizes are 21.0 and 29.7, BUT the report still prints out in letter size.
Any Ideas?
Thanks
PrinterDeliveryProvidor.cs
// Setting for page height
m_settings[1] = new Setting();
m_settings[1].Name = SubscriptionData.PAGEHEIGH T;
m_settings[1].ReadOnly = false;
m_settings[1].Required = true;
m_settings[1].Value = "29.7";
// Setting for page width
m_settings[2] = new Setting();
m_settings[2].Name = SubscriptionData.PAGEWIDTH ;
m_settings[2].ReadOnly = false;
m_settings[2].Required = true;
m_settings[2].Value = "21.0";
}
// Correctly format device info strings
string pageWidth = data.pageWidth + "cm";
string pageHeight = data.pageHeight + "cm";
string deviceInfo;
and PrinterDeliveryUIProvidor. cs
{
// Variables used to store information about the subscription being created
private double m_pagewidth = 21.0;
private double m_pageheight = 29.7;
private ArrayList m_printers;
and subscriptiondata.cs
// Initalize variables to default values
public string Printer = "";
public double pageHeight = 29.7;
public double pageWidth = 21.0;
The Delivery code works but the page is printing in Letter size 8.5/11.5 inches
I wish the default size to be A4 21.0x29.7 cm.
I have changed the C#. as below.
Rebuilt the assembly and copied the to the reporting server, place the code in the correct folders, restarted IIS and Report Server.
The changed as seen on the subsciption page. Ie the new default sizes are 21.0 and 29.7, BUT the report still prints out in letter size.
Any Ideas?
Thanks
PrinterDeliveryProvidor.cs
// Setting for page height
m_settings[1] = new Setting();
m_settings[1].Name = SubscriptionData.PAGEHEIGH
m_settings[1].ReadOnly = false;
m_settings[1].Required = true;
m_settings[1].Value = "29.7";
// Setting for page width
m_settings[2] = new Setting();
m_settings[2].Name = SubscriptionData.PAGEWIDTH
m_settings[2].ReadOnly = false;
m_settings[2].Required = true;
m_settings[2].Value = "21.0";
}
// Correctly format device info strings
string pageWidth = data.pageWidth + "cm";
string pageHeight = data.pageHeight + "cm";
string deviceInfo;
and PrinterDeliveryUIProvidor.
{
// Variables used to store information about the subscription being created
private double m_pagewidth = 21.0;
private double m_pageheight = 29.7;
private ArrayList m_printers;
and subscriptiondata.cs
// Initalize variables to default values
public string Printer = "";
public double pageHeight = 29.7;
public double pageWidth = 21.0;
what is the default paper size for the printer check that - if its letter set to a4 and it will print fine
ASKER
Default Printer Paper size is A4.
As I mentioned before The report prints fine when printing from the Web Based reportserver viewer,
Therefore it must have something to do with the Preinter delivery extension code.
As I mentioned before The report prints fine when printing from the Web Based reportserver viewer,
Therefore it must have something to do with the Preinter delivery extension code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The report is set up as A4 in the desgner.
It prints out fine from report manager using the print fucntion.