Hello
I need to export the document to pdf for the user to download it, the examples that I have found always save the pdf on the server, the idea is that the user can download it when exporting.
Thanks
I am exporting to pdf from another system, which has the document's json stored, and when the pdf that it exports, the page break does not match the document that is displayed in the visual component. This is my code:
public JsonResult ToPdf(ExportData data)
{
var wordDocument = WordDocument.Save(data.DocumentData, FormatType.Docx);
var render = new DocIORenderer
{
Settings =
{
AutoTag = true,
EmbedCompleteFonts = true,
OptimizeIdenticalImages = true,
AutoDetectComplexScript = true,
ExportBookmarks = Syncfusion.DocIO.ExportBookmarkType.Headings |
Syncfusion.DocIO.ExportBookmarkType.Bookmarks
}
};
//Converts Word document into PDF document
var pdfDocument = render.ConvertToPDF(wordDocument);
render.Dispose();
wordDocument.Dispose();
//Saves the PDF file
var outputStream = new MemoryStream();
pdfDocument.Save(outputStream);
pdfDocument.Close();
//Save the PDF stream in folder
var path = GetPathToExport(data);
var fileStream = new FileStream(path, FileMode.OpenOrCreate,
FileAccess.ReadWrite);
outputStream.Position = 0;
outputStream.CopyTo(fileStream);
outputStream.Close();
fileStream.Close();
return Json(new { fileName = path });
}
Hello
Here I attach the document and the exported pdf, a capture of the document editor implemented with version 19.2.60, and the api I am using version 19.3.0.43 in net5.0.
This problem happens to me with all documents, not just this one.
Thanks for your time
Greetings