How to enable PDF Export in DocumnetEditor?

Hello, 

I am trying to enable the PDF export functionality, the DOCX export works. 

I am trying to follow this link: https://ej2.syncfusion.com/react/documentation/document-editor/how-to/export-document-as-pdf.md/, but it is gone.


I am also try to follow this link:

https://ej2.syncfusion.com/react/documentation/document-editor/how-to/export-document-as-pdf/#export-document-as-pdf-in-server-side-using-syncfusion-docio

However, this link is only for TypeScript, I don't know how to use it since we are using JavaScript.


It would be nice of you if someone can offer me a solution. 


Yours,

Ze



4 Replies

SM Suriya Murugan Syncfusion Team February 3, 2022 03:21 AM UTC

Hi Ze, 

Syncfusion Greetings! 

Please check below link to know about PDF export: 



In client side(Javascript) , using pdf-export component (works like print as PDF) – all pages will be converted to image and inserted as pdf pages. (can’t search the text)     
    
We have provided client-side export pdf as image from version 19.1.67. To use this feature, Kindly install below package for Pdf export        
    
    
Please check below sample      
    
https://stackblitz.com/edit/t2e7aa?file=title-bar.ts   (Line number 168)        
    
In this sample,       
      
1. The document content in the exported pdf is preserved as image.        
2. You can directly download the pdf file using download option.      
    
    
  
 
       
    
Please let us know if you need any further assistance.  

Regards, 
Suriya M. 




ZE Ze February 3, 2022 12:42 PM UTC

Thank you, Suriya! I will take a look and work on it. 



ZE Ze replied to Suriya Murugan February 3, 2022 08:31 PM UTC

Hello Suriya,


Even thought your response is very helpful, but I think I do not find the JavaScript version of the code and sample. I think they are all in TypeScript. Is there a chance you guys can offer a JavaScript version of it?



Yours



SM Suriya Murugan Syncfusion Team February 4, 2022 03:18 AM UTC

Hi Ze, 

In previously provided sample, you can find code snippet in Javascript. Please check it from below link: 

Also, for your reference , we have created simple sample in javascript. Please check line number: 11 in index.js. 

Please let us know if you need any further assistance. 

Regards, 
Suriya M. 


Loader.
Up arrow icon