You need to sign in to do that
Don't have an account?
turbo2oh
replicate quote pdf preview
I'm trying remove the delete functionality from the quote pdf preview. To do this I'm trying to recreate the functionality in a VF page. I'm having a hard time recreating the preview functionality. I've found this function /jslibrary/1320195877000/Quote.js but not sure if thats what I should be using or what arguments its expecting.
I've also tried using this:
javascript: var pdfOverlay = QuotePDFPreview.quotePDFObjs['quotePDFOverlay2'];pdfOverlay.dialog.buttonContents = '<input value=\"Email Quote\" class=\"btn\" name=\"emailQuote\" onclick=\"javascript:navigateToUrl(\'/_ui/core/email/author/EmailAuthor?p2_lkid=00190000003iCaY&amp;rtype=003&amp;p3_lkid=0Q0900000004H5G&amp;doc_id=0QD900000004CTm&amp;retURL=%2F0Q0900000004H5G\',\'RELATED_LIST\');\" title=\"Email Quote\" type=\"button\" /><input value=\" Close \" class=\"btn\" name=\"close\" onclick=\"QuotePDFPreview.quotePDFObjs[\'quotePDFOverlay2\'].close();\" title=\"Close\" type=\"button\" />'; pdfOverlay.setContents('/servlet/servlet.FileDownload?file=0QD900000004CTm'); pdfOverlay.display(); "
Unfortunately I'm getting a jscript error Cannot read property 'dialog' of undefined
Any ideas? Has anyone done this before?
Hi,
You can replace all the special characters like :- ('"') in the string to create an pdf.
Refer to the following snippet:-
String dipslaytable=dipslaytable.replaceAll('<','<').replaceAll('"','"').replaceAll('>','>');
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Well with the exception of the first : after javascript, not sure how that got in there I belive all the characters are using ASCII versions because this is an inline javascript statement within a VF page. Wouldn't having characters like '<' mess up the html formatting?
Also are you suggesting that this solution will work its just a matter of my formatting?
Hi, did you make this to work?
cheers
Check out my latest Post about this.
http://boards.developerforce.com/t5/General-Development/How-to-use-Salesforce-PDF-Viewer-with-custom-PDF-page/td-p/511211