Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
UltraGridDocumentExporter - Export to PDF - Columns cut off
posted

Hi,

I'm using UltraGridDocumentExporter to export the grid content to a PDF document. The issue I'm facing is, after exporting the grid columns data to PDF, few columns doesn't show the complete data. Content is cut off.

On debugging, the complete data is available in the grid instance before exporting to PDF. Problem arises when I call the PerformAutoResize() method for each of the columns in the grid to compute the width. For instance, a column holds value like "This is a sample test message to be displayed in the grid". But only " "This is a sample test message" is displayed in the PDF. If I increase the width manually while in debugging mode, the complete text is displayed.

Please let me know your comments on the above issue.

Thanks

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    You are probably calling PerformAutoResize on the on-screen columns. The screen uses different graphics units than the PDF document, so if you auto-size the on-screen columns and then export to PDF, the sizes will not be correct.

    Why are you calling PerformAutoResize, anwyay? The UltraGridDocumentExporter has an AutoSize property which automatically auto-sizes the columns in the exported grid by default. So unless you explicitly turned this off, there's no reason to call PerformAutoResize yourself.

    If, for some reason, you want to size the columns yourself, you should call PerformAutoResize on the columns of the Layout that is provided by the event args of the ExportStarted event.

Children