PdfViewerComponent - Unable to view the content

Dear Team,

We have tried your PdfViewerComponent component to display the pdf file.

We specify the documentPath and serviceUrl prop as

   <PdfViewerComponent id="container"
                                                    documentPath={this.props.folderPath.replace(/\//g'~') + this.props.files[0].DocName}
                                                    serviceUrl={fileurl}
                                                    style={'height''640px' }}>
                                                    <Inject services={[ToolbarMagnificationNavigationLinkAnnotationBookmarkView,
                                                        ThumbnailViewPrintTextSelectionTextSearchAnnotationFormFields]} />
                                                </PdfViewerComponent> 


and below code is for api request

 {
        pathprocess.env.DOCUMENT + '/{type}/{userid}/{load}',
        method'POST',
        options: {
            description'To upload candidate document.',
            notes'Call this api to get the candidate document.' +
                'For document uplaod `type` => `D`, photo `type`=> `P` ',
            tags: ['api''candidate''candidateDocument'],
            validate: {
                params: {
                    typeJoi.string().required().error(new Error('Please pass appropriate file type.')),
                    loadJoi.string().required().error(new Error('Please pass appropriate file path.')),
                    useridJoi.number().required().error(new Error('Please pass appropriate user id.'))
                },
                failActionasync (requestherr=> {
                    return await CommonFunction.failAction(requestherr);
                }
            },
            handler: (reqh=> {
                console.log(process.env.CANDIDATE_UPLOAD + req.payload.document.replace(/~/g'/'));
                return h.file(process.env.CANDIDATE_UPLOAD + req.payload.document.replace(/~/g'/'));

            },
            authfalse
        }
    },


The component just show the spinner continuuosly and api is also showned as success with status code as 200.

Could you please help us on this.

Regards,
Sinchan




3 Replies

AA Akshaya Arivoli Syncfusion Team May 20, 2020 09:39 AM UTC

Hi Sinchan , 

Thank you for contacting Syncfusion support. 

We are unable to reproduce the reported issue with the provided details. We have shared the sample in which we have tried to reproduce the reported issue in the below link, 




Please try it and revert us with more details, console errors, response data in network tab and the modified sample if you have any concern on this. These details will be helpful for us to investigate further and assist you better. 

Regards, 
Akshaya 



SN Sinchan NIkam replied to Akshaya Arivoli May 22, 2020 11:03 AM UTC

Hi Sinchan , 

Thank you for contacting Syncfusion support. 

We are unable to reproduce the reported issue with the provided details. We have shared the sample in which we have tried to reproduce the reported issue in the below link, 




Please try it and revert us with more details, console errors, response data in network tab and the modified sample if you have any concern on this. These details will be helpful for us to investigate further and assist you better. 

Regards, 
Akshaya 


Dear Akshaya,

Thanks for sharing the code.

We tried your solution. Hiowever, it does not work for us.

We have devoloped our api in Nodejs with hapi framework.. also shared the code in trial mail.

Can you please provide us an example which uses the Node api.So that we can easily integrate it with our module.

Regards,
Sinchan


AA Akshaya Arivoli Syncfusion Team May 25, 2020 09:46 AM UTC

Hi Sinchan, 

At present we do not have support for PDF Viewer Web service in Node api.PDF Viewer control is both server and the client side oriented. PDF viewer control processes the PDF document in the server side(developed with .NET environment) and send the processed PDF data to the client using the Web service to render the PDF document and for further operations in PDF viewer.   

Regards, 
Akshaya 


Loader.
Up arrow icon