@page "/counter" <input type="button" @onclick="OnClick" value="Salvar" /> <div class="control-section"> <SfPdfViewerServer @ref="viewer" DocumentPath="@DocumentPath" Height="640px" Width="100%"></SfPdfViewerServer> </div> <label>@resultado</label> @code { SfPdfViewerServer viewer; object result; private string DocumentPath { get; set; } = "wwwroot/data/250x180mm.pdf"; public void OnClick() { result = viewer.SaveAsBlob().Result; //I tried with viewer.ExportAnnotationsAsObject().Result; but the system don't return
. } }
|
Query |
Details | |
|
I have the same problem but with document editor. As the program just terminates after save as a blob. |
We couldn’t reproduce this scenario. kindly check with the below sample.
kindly ensure whether you have added below codes in ConfigureServices function in startup.cs file. If not please add the below codes and ensure the reported scenario.
If you still facing the reported scenario, please share us simple sample or modify the provided sample to reproduce the reported scenario in our end. It will be helpful for us to proceed further on this.
| |
|
In the given code example Mohan Selvaraj if i click save, it doesnt saves the file and the changes. But if i try to download it, it works great. |
In the previously provided sample, clicking in the ‘Save’ button will return the PDF document as ‘SaveAsBlob()’ and the same will be stored in the ‘wwwroot-> Data folder’ location of the project. |
Hey Guys!I'm start following the Getting Start PDV Viewer code.I just add the PDV Viewer control on single page (like the code attached).The control works fine, I can add annotations, print and Export/Import Annotation, for example.But on the code, some async Tasks never ends (and I didn't find any error message), like:myVar = await viewer.ExportAnnotationsAsObject(); ormyBlob = await viewer.SaveAsBlob();I tried with versions V.18.1.0.52 until 59. With all .Net Core 3.1 libs updatedAny ideia what can I do?Thanks!!!@page "/counter" <input type="button" @onclick="OnClick" value="Salvar" /> <div class="control-section"> <SfPdfViewerServer @ref="viewer" DocumentPath="@DocumentPath" Height="640px" Width="100%"></SfPdfViewerServer> </div> <label>@resultado</label> @code { SfPdfViewerServer viewer; object result; private string DocumentPath { get; set; } = "wwwroot/data/250x180mm.pdf"; public void OnClick() { result = viewer.SaveAsBlob().Result; //I tried with viewer.ExportAnnotationsAsObject().Result; but the system don't return
. } }
public void OnExportClick(MouseEventArgs args) { object exportedAnnotation = PDFViewer1.ExportAnnotationsAsObject().Result; }
public async void OnExportClick(MouseEventArgs args) { object exportedAnnotation = await PDFViewer1.ExportAnnotationsAsObject(); }