Free Support Forum - aspose.com

Repeated Table Column Headings and .Net Print Preview

Hi,

We've created a Word document with a table and set the column headings to be repeated on each page of the output. When we create a physical file they display correctly. When we use the code below to Print Preview/Print it the column headings do not repeat. Can anybody help us.

Thanks

Adrian

Aspose.Words.Document doc = new Aspose.Words.Document("C:\\MyFile.doc");

PrintPreviewDialog previewDlg = new PrintPreviewDialog();

// Show non-modal first is a hack for the print preview form to show on top.

//previewDlg.Show();

// Initialize the Print Dialog with the number of pages in the document.

PrintDialog printDlg = new PrintDialog();

printDlg.AllowSomePages = true;

printDlg.PrinterSettings.MinimumPage = 1;

printDlg.PrinterSettings.MaximumPage = doc.PageCount;

printDlg.PrinterSettings.FromPage = 1;

printDlg.PrinterSettings.ToPage = doc.PageCount;

printDlg.PrinterSettings.DefaultPageSettings.Landscape = true;

try

{

if (!printDlg.ShowDialog().Equals(DialogResult.OK))

return;

// Create the Aspose.Words' implementation of the .NET print document

// and pass the printer settings from the dialog to the print document.

AsposeWordsPrintDocument awPrintDoc = new AsposeWordsPrintDocument(doc);

awPrintDoc.PrinterSettings = printDlg.PrinterSettings;

// Hide and invalidate preview is a hack for print preview to show on top.

previewDlg.Hide();

previewDlg.PrintPreviewControl.InvalidatePreview();

// Pass the Aspose.Words' print document to the .NET Print Preview dialog.

previewDlg.Document = awPrintDoc;

previewDlg.ShowDialog();

}

catch (Exception ex)

{

MessageBox.Show("Your printer is not properly connected or you may not be connected to the network.\n\n Exception Message : " + ex.Message);

}

Hi,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your request. Unfortunately, Heading rows are not supported during rendering and converting to PDF. I linked your request to the appropriate issue. You will be notified as soon as this feature is implemented.

Best regards.

Hi Alexey,

Thanks for your quick response, do you mean that Heading Rows are not supported during rendering for Print Preview? I am confused by your mention of converting to PDF.

Thanks

Adrian

Yes, rendering means printing, generating print preview and converting document to image. I also mentioned PDF, because the same Rendering Engine is used to print document and to convert documents to PDF.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Best regards,

The issues you have found earlier (filed as 6839) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(5)