I have been trying to make the grid export to PDF in a WYSIWYG manner
I have been "almost" successful with very less code
void ultraGridDocumentExporter1_ExportStarted(object sender, Infragistics.Win.UltraWinGrid.DocumentExport.ExportStartedEventArgs e){e.Section.PageSize = PageSizes.A4;e.Section.PageMargins = new Infragistics.Documents.Reports.Report.Margins(PageMargins.Narrow.Left, PageMargins.Narrow.Right,PageMargins.Narrow.Top, PageMargins.Narrow.Bottom);e.Section.PagePaddings = new Paddings(0);e.Section.PageOrientation = Infragistics.Documents.Reports.Report.PageOrientation.Landscape;e.Section.PageAlignment = Infragistics.Documents.Reports.Report.ContentAlignment.Center;}
I get the fonts, column widths, row height correctly as seen in the grid inside of windows forms container
But the grid layout inside of PDF document does not occupy (stretch or shrink) the entire whitespace available on the PDF document (see red blocks in the attached PDF screenshot) - what am I not doing right?
Thanks!
Screenshot: https://doc-0s-44-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/8p6fggpi7eli97l0n6cojs6v6nrda7je/1423749600000/12612333493395018583/*/0B42CvR3rv2CxUjJZRGJwd25aSzA
Hi Ameya,
Thank you for posting in our forums.
After looking into this and doing some research, “Fitting the grid to one page in PDF” has been determined to be a new product idea. You can suggest new product ideas for future versions (or vote for existing ones) at <http://ideas.infragistics.com>.
There are many benefits to submitting a product idea:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea:
1. Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed).
2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
3. Add your product idea and be sure to be specific and provide as much detail as possible.
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics.
Hi Dimitar
Actually, I am able to fit the grid to 1 page wide and n pages in height - that works and does not need any new feature development
My problem is slightly different
While my grid layout inside the PDF has fit to 1 page wide, its not wide enough to fill the entire A4 page size in landscape - the grid in the PDF has about 200 floating points margins on left and right (blank space) - even though I have explicitly set the page + section margins to ZERO
Link to the screenshot image: https://drive.google.com/open?id=0B42CvR3rv2CxUjJZRGJwd25aSzA&authuser=0
Thank you!
-