We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Create and export PDF from JSON (SFDT)

Hi Support,
I write the SFDT data(JSON) in my database and I want to know how I can do to generate a PDF based only on this data that is in JSON format that is saved in my database.

Sorry my inglish is bad!!


10 Replies

RT Ramya Thirugnanam Syncfusion Team April 1, 2019 09:05 AM UTC

Hi Gustavo,  
   
Thanks for contacting Syncfusion support.  
   
Our SFDT format is support only by DocumentEditor control for importing and exporting documents. And, we don’t have direct support for converting SFDT in to PDF document.  
   
Instead, we have support for exporting SFDT as Word document(as blob stream) by using `saveAsBlob` which is demonstrated in below documentation link  
   
   
And the exported word document can be converted it to PDF by using Syncfusion.DocToPDFConverter library in server side.  
   
For your convenience, we have prepared as sample to covert word document exported for DocumentEditor in to PDF and save the PDF document in 'App_Data' folder in web server. You can customize this option to save the PDF document in database.  
   
   
   
Please find the sample from below link.  
   
 
Regards,  
Ramya T  



GU Gustavo April 1, 2019 12:03 PM UTC

Hi,
So sorry but would you have some other example in php?


RT Ramya Thirugnanam Syncfusion Team April 2, 2019 10:40 AM UTC

Hi Gustavo, 
We have our server-side library in .Net Core(Syncfusion.EJ2.WordEditor.AspNet.Core) and .Net framework(Syncfusion.EJ2.WordEditor.AspNet.Mvc5Syncfusion.EJ2.WordEditor.AspNet.Mvc4) alone. So, currently we are unable to provide you the sample in php.  
 
So, for your convenience we have prepared a sample in ASP.NET Core MVC project and .Net core has cross platform support. So, you can run this project in all major operation systems(windows/linux/mac). Please find more detail about .NET Core from below link  
 
 
You can also run this project through terminal (CLI). Please find more details about how to install and run .Net Core project from following link    
 
   
Please find the commands to run the sample below. 
 
// To restore dependent packages    
> dotnet restore    
   
// To run the sample   
> dotnet run   
    
    
 Please find Web API project from following link.    
   
 
Regards,  
Ramya T 



KU Kundan March 9, 2021 04:38 PM UTC

Is it possible to convert data to Docx file in the backend itself?


KB Kurthis Banu Abdul Majeeth Syncfusion Team March 10, 2021 06:53 AM UTC

Hi Kundan, 

We had created the sample based on your requirement. 


Server-side sample: 



Please check the solution and confirm us whether it satisfied your requirement. 

Regards, 
Kurthis Banu A. 



JE Jeet July 20, 2022 08:58 AM UTC

How can I convert SFDT data (JSON) into a PDF on the backend, particularly in node.js?



SM Suriya Murugan Syncfusion Team July 26, 2022 11:32 AM UTC

Hi Jeet,


We are sorry to say that, we dont have support for nodejs backend and we are requesting to use the AS.NET core or MVC api in order to convert a SFDT to pdf.


Please check below documentation


https://ej2.syncfusion.com/documentation/document-editor/how-to/export-document-as-pdf/



Regards,

Suriya M.




FA fatimabatool March 26, 2024 09:00 PM UTC

how can save file by url in my firebase and postgre database  as  pdf in documenteditor component  on clientside im using reactjs and on server django 



DS Dhanush Sekar Syncfusion Team March 28, 2024 05:39 PM UTC

Hi fatimabatool,


Client-side

You can export the document as PDF in client side. all pages will be converted to image and inserted as pdf pages(works like print as PDF). There is one limitation we can’t search the text because we are exporting the pdf as image.

Documentation: Export document as pdf in React Document editor component | Syncfusion

Sample : 4mjw5d (forked) - StackBlitz

Server-side:

Document Editor requires server-side dependicey and it can be used only in Core, MVC & Java frameworks alone. django is not supported. Document that are created in the front end can be exported as blob which can be saved a web API call. You can store the stream into google cloud storage.


We have provided the server-side sample code in C#. you can achieve the same using Django.

Documentation: Save document to Google Cloud Storage in EJ2 React Document editor control | Syncfusion


Regards,

Dhanush Sekar



SA salmanrf April 12, 2024 01:12 PM UTC

I dont get why we should implement the endpoint ourselves, why not include this feature in the document server ?


Loader.
Live Chat Icon For mobile
Up arrow icon