+ Start a Discussion

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&rtype=003&p3_lkid=0Q0900000004H5G&doc_id=0QD900000004CTm&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\" />';

 Unfortunately I'm getting  a jscript error Cannot read property 'dialog' of undefined


Any ideas? Has anyone done this before?



You can replace all the special characters like :- ('&quot') in the string to create an pdf.

Refer to the following snippet:-

 String dipslaytable=dipslaytable.replaceAll('&lt;','<').replaceAll('&quot;','"').replaceAll('&gt;','>');


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?