.NET document processing
Page layout and PDF export
Generate a PDF report in .NET with a deliberate print area, paper orientation, and fit-to-width layout.
Try this workflowExplore and compare
Change the inputs, run an action, and inspect the live result below.
ResultLive API output
The preview and download use the .NET-generated PDF. Output includes the PDF page count.
Preparing sample...
Keep exploringReset or save
Reset restores this sample's starting document. TXWB retains its spreadsheet, dashboard, and reporting definitions.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Page layout and PDF export
Worksheet print settings control pagination independently of the browser host. The .NET engine uses the deployed fonts and returns PDF bytes. The PDF.js preview displays those same generated bytes.
APIs used
SheetPrint.ConfigureAsync()
SaveAsync(StreamType.PDF)
LastPdfPageCount
How to explore
Generate a PDF report in .NET with a deliberate print area, paper orientation, and fit-to-width layout.
The preview and download use the .NET-generated PDF. Output includes the PDF page count.
Independent server processing
The controller validates the inputs, creates a request-owned ServerSheetControl, awaits each operation, and returns generated bytes. The browser displays the workbook or PDF returned by .NET. The generation endpoint works without a browser editor.
The Code panel shows this sample's actual implementation and the shared hosting code. Downloads contain the current document; changes are not stored on the server.
NuGet packages
TXTextControl.TXSheetControl.AspNetCore
2.0.0-beta.1
Provides the Razor spreadsheet editor, browser APIs, and packaged fonts.
dotnet add package TXTextControl.TXSheetControl.AspNetCore --version 2.0.0-beta.1
TXTextControl.TXSheetControl.Server
2.0.0-beta.1
Creates, converts, merges, and exports workbooks in .NET without a browser.
dotnet add package TXTextControl.TXSheetControl.Server --version 2.0.0-beta.1