PDF viewer is not render the pdf document while using online .pdf document url and also local files
As per the documentation and which you shared vue project (VuePdfViewer1753388049.zip), we are integrated the PDFViewer in my project
But i facing the below issue :
PDFViewer tool is rendering without pdf document while using online .pdf document URL like (http://www.africau.edu/images/default/sample.pdf)
It's just spinning while giving local folder path and also online document URL. At a same time, i didn't get any issues in console.log
In inspect element network, the response is coming like this
http://www.africau.edu/images/default/sample.pdf is not found
|
string fileName = jsonObject["document"].Split(new string[] { "://" }, StringSplitOptions.None)[0];
if (fileName == "http" || fileName == "https")
{
WebClient WebClient = new WebClient();
byte[] pdfDoc = WebClient.DownloadData(jsonObject["document"]);
stream = new MemoryStream(pdfDoc);
}
|
|
export default Vue.extend({
name: "PdfViewer",
data () {
return {
//Specifying the view for PDF Viewer
view:"Details",
serviceUrl: 'https://localhost:44398/pdfviewer',
};
},
|
@Vasugi Sivajothi Thanks for the reply.
Actually my platform is vuejs and nodejs not in asp.net & C# platform. How can i achieve the above functionalities within in my platform (vuejs & nodejs)
Already I tried two ways and both are not working. There are given below :
1) using document-path :
Facing issue while using document-path : Pdf viewer is render, but the pdf document is not render within pdfviewer
2) using base64data :
Facing issue while using base64data : Some error dialog popup will trigger and the error message is like "Corrupted data"
Expectation output is : Need to render the online pdf (based on the URL) within the pdf viewer using vuejs and nodejs platform not in asp.net & C#
Please help me out in this issue
Thanks in Advance
"Document Reference pointer does not exist in the cache"
how can resolve this asp.net mvc
- 5 Replies
- 4 Participants
-
MS Muhilan Subramanian
- Sep 14, 2021 02:50 PM UTC
- Dec 8, 2021 02:29 PM UTC