DxPdfViewer.DocumentName Property
Specifies the name of the downloaded file.
Namespace: DevExpress.Blazor.PdfViewer
Assembly: DevExpress.Blazor.PdfViewer.v25.1.dll
NuGet Package: DevExpress.Blazor.PdfViewer
Declaration
[DefaultValue("Document")]
[Parameter]
public string DocumentName { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | "Document" | The name of the downloaded file. |
Remarks
Use the DocumentName
property to specify the name of the downloaded document.
@rendermode InteractiveServer
@using System.Reflection
<DxPdfViewer DocumentContent="@DocumentContent"
DocumentName="Custom name" />
@code {
byte[] DocumentContent { get; set; }
protected override void OnInitialized() {
Assembly assembly = Assembly.GetExecutingAssembly();
using (Stream stream = assembly.GetManifestResourceStream("Pdf.DataSources.Document.pdf"))
using (var binaryReader = new BinaryReader(stream))
DocumentContent = binaryReader.ReadBytes((int)stream.Length);
}
}
See Also