Hi,
Were looking into using the PDF viewer and wonder whether it's possible to render a PDF server-side? I understand that using pdf.js is obviously rendering client-side, but can you tell me if I use the document processing library whether it does indeed render server side?
If it does can you tell me if this scenario is supported in .Net 8.0?
I'm a bit confused because in the PDF viewer documentation here: https://docs.telerik.com/aspnet-core/html-helpers/pdf/pdfviewer/dpl-processing it says "To use DPL Processing in a project, it must target 4.6.2 .NET Framework", but in the DPL documentation here: https://docs.telerik.com/devtools/document-processing/introduction it says "The Telerik Document Processing libraries are available in .NET Framework and .NET Standard (.NET Core) compatible versions"
So is the .Net 4.6.2 limitation just for PDF viewer or is the documentation just out of date?
Thanks!
I have a HTML form that has a body with data already populated in it. I want to export that data on a button click to then download that html to pdf. The form already has a method of post. I am stuck on how to get the Telerik Document process to hook up with it once the button is click.
It looks like this
index.cshtml
<body>
<form id ="letterForm" method="post">
.... "Data and text here"
</form>
<button type="submit"> Download</button>
</body>
Currently I dont have a controller method to sync up with yet. Looking for example on how to get it to work
How can you set the default Zoom Level on the PDF Viewer? It defaults to "Automatic Width" but I want it to default to "Fit to Width".
<kendo-pdfviewer name="pdfviewer">
<pdfjs-processing file="@(Url.Action("GetReportDownload", "Downloader"))"/>
<toolbar enabled="true">
</toolbar>
</kendo-pdfviewer>
Hello,
I am letting users to upload a pdf file on the browser. Once the user upload the file, I want to give them the option to view the uploaded file. In order to upload the file, I am using ASP.NET Core Upload Asynchronous Upload control and it works fine, but I am not sure how can I have the user view the pdf file as soon as it uploads. The files exists on server. Below is my entire code:
@using Kendo.Mvc.UI
<div style="margin-top:60px">
<div>
<span style="font-size:20px; font-weight:bold">Upload File</span>
</div>
<br /> <br />
<div class="block-section">
@(Html.Kendo().Upload()
.Name("files")
.Async(a => a
.Save("Async_Save", "Block")
.Remove("Async_Remove", "Block")
.AutoUpload(true)
)
)
</div>
below is my controller code:
public async Task<IActionResult> Async_Save(IEnumerable<IFormFile> files)
{
foreach (var file in files)
{
var fileContent = ContentDispositionHeaderValue.Parse(file.ContentDisposition);
var fileName = Path.GetFileName(fileContent.FileName.ToString().Trim('"'));
var physicalPath = Path.Combine(_webHostEnvironment.WebRootPath, "UploadedFiles", fileName);
using (var fileStream = new FileStream(physicalPath, FileMode.Create))
{
await file.CopyToAsync(fileStream);
}
}
return Content("");
}
The file that is uploaded by the user using the above control, I want the user to see that file. I know Telerik has pdfViewer, but I am not sure how the pdfViewer can show the file that exists on the server. The files is uploaded and saved on a folder in wwwRoot. i dont know the name of the file. Below is what I am trying to use:
<div>
@(Html.Kendo().PDFViewer().Name("pdfviewer")
.PdfjsProcessing(pdf => pdf.File(Url.Content("~/wwwroot/UploadedFiles/2020-0598857.pdf")))
.Height(1200)
)
</div>
I'm trying to use the pdf Viewer control to display pdfs which have fillable forms on them. When I open the pdf with viewer control the fillable pdfs just show up as a flat pdf (meaning the form fields are not fillable). Is there a way to get the PdfViewer control to display the pdf as a fillable pdf? I feel like with tools like RadPdf, this has got to be possible in the browser and would be surprised if there wasn't a way to do this with our Kendo controls.
Ultimately, I want to submit that filled in pdf back to the server to be saved back to the database.
Hello!
Is it possible to block java script execution in PDF documents in PDFViewer?
Or maybe it is possible to find out if there is a script in the document?
I will be grateful for any answer.
Hello,
I have an existing project where I am trying to use the PDF Viewer control. But in this project I have a JS file callled vendors.bundle.js wich is causing some type of conflict with kendo.all.min.js, making an error of "kendoPDFViewer is not a function" appear at the console.
I have tried putting the scripts references at different points of the application other then the page itself, but that only caused more errors.
I removed the reference to the file vendors.bundle.js, but that made several parts of the project stop working.
So, my question is how do I find out what kind of conflict is this, and how to solve it.
Regards,
Alexandre
Hey guys,
currently I'm using the pdf viewer with jquery initializing. In my case I have a custom configured toolbar setup with custom messages (because the german culture file doesn't translate the pdf viewer at all).
My viewer is looking like that (I have marked the lines which I've no idea how to implement these in tag helper syntax):
$('#pdfViewer').kendoPDFViewer({
messages: {
toolbar: {
download: 'Herunterladen',
pager: {
first: 'Zur ersten Seite',
last: 'Zur letzten Seite',
next: 'Zur nächsten Seite',
previous: 'Zur vorherigen Seite'
},
togglePan: 'Schwenkmodus',
toggleSelection: 'Markierungsmodus',
zoom: {
zoomIn: 'Hineinzoomen',
zoomOut: 'Herauszoomen'
}
}
},
pdfjsProcessing: {
file: {
data: @Model
}
},
toolbar: {
items: [
{ type: 'pager', input: false, previousNext: true },
{ type: 'zoom', zoomInOut: true },
'toggleSelection',
// 'search',
'download',
// 'print'
]
}
}).data('kendoPDFViewer');
Now I'm trying to implement the widget via tag helper syntax but I've no idea how to configure my custom toolbar setup. Any ideas or is it even possible with tag helper?
<kendo-pdfviewer name="pdfViewer">
<messages>
<toolbar download="Herunterladen">
<pager first="Zur ersten Seite"
last="Zur letzten Seite"
next="Zur nächsten Seite"
previous="Zur vorherigen Seite"/>
</toolbar>
</messages>
<pdfjs-processing file="@Model"/>
<toolbar>
<pdfviewer-toolbar-items>
...
</pdfviewer-toolbar-items>
</toolbar>
</kendo-pdfviewer>
Regards,
Daniel
Hello,
PDF search is not working when PDF viewer is placed in modal. Is there any workaround for this?
Thanks.