Hello,
Can I get an update on this?
Thanks
|
Query |
Details | |
|
Does the PdfViewer component support receiving the PDF as a byte array or a URL? |
We can load the PDF document as a byte array in the PDF Viewer control, Kindly use the below code snippet for loading the document as byte array in the PDF Viewer controller .
We have also created the Web API service sample for your reference, Kindly download the Web API service sample from the below link.
| |
|
How do I customise the toolbar styles and contents? |
We can customize the toolbar styles by changing the themes files. You can change the themes files in the index.html file. Kindly refer the below code for changing the themes in PDF Viewer control.
| |
|
Can you provide an example of how to run the PdfViewer standalone like you have done for the Autocomplete component below? I have tried modifying this example to work with the PdfViewer but the viewer component is not found at runtime. The only way I can make it work is by using the web.all bundle, but this is way too big for production. Please provide a React+Typescript+Webpack example specific to the PdfViewer component, if possible. |
We have created the separate PDF Viewer ReactJS components using web pack .Kindly download the sample from the below link.
NOTE: The PDF document has been loaded from our online hosted service. The PDF document which has been available in the server can be loaded, However you can create your own web services by using the web API controller methods, And also we have created the separate own service and provided the same in our first query. Kindly refer the UGdocumentation link for the code snippet. |
Hi Mohan,
Thanks for your excellent answer. I am impressed by the quality of support provided by Syncfusion. We are going to use the library in our project. One more question: how do I customise the toolbar in the React component? I would like to provide my own controls and layout to suit our app.
Can you also confirm if there is some API documentation for the React component?
Thanks
|
var pdfViewer=$('#PdfViewer').data("ejPdfViewer");
pdfViewer .showToolbar(false); |
Thanks again, Mohan. So it seems that Syncfusion's React component is only useful if you want the default behaviour? That would explain why there is no API document for the React component. I think it would better for us to start out with your JavaScript PDF viewer and then wrap it in a React component - please correct me if I am missing something.