Hallo,
we want read saved documents, export to pdf and send the data to the client (because the docuemnt text in browser is not complete). The .mdc document was created with die .net version of Stimulsoft Reports (see attachment).
My code:
var fs = require('fs'),
sr = require('stimulsoft-reports-js');
fs.readFile(path, (err,data)=>{
if (err) throw err;
sr.Base.StiLicense.loadFromFile('./app/license.key');
var report = new sr.Report.StiReport();
report.loadDocument(new Uint8Array(data));
var settings = new sr.Report.Export.StiPdfExportSettings();
var service = new sr.Report.Export.StiPdfExportService();
var stream = new sr.System.IO.MemoryStream();
service.exportPdf(report, stream, settings);
var bytes = stream.toArray();
var result = sr.System.Convert.toBase64String(bytes);
//send result via websocket
});
But I get a very wrong result. Please help.
Thanks in advance.
export existing document with included image (base64) to pdf
export existing document with included image (base64) to pdf
- Attachments
-
- pdfresult.PNG (72.28 KiB) Viewed 1985 times
-
- 000000192949.mdc
- (87.7 KiB) Downloaded 114 times
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: export existing document with included image (base64) to pdf
Hello,
Please send us your mdc file for analysis.
Thank you.
Please send us your mdc file for analysis.
Thank you.
Re: export existing document with included image (base64) to pdf
...see attachement "000000192949.mdc" please.
Best regards
Michael
Best regards
Michael
Re: export existing document with included image (base64) to pdf
Hello, Michael.
There is no visual part in node.js.
There is no access to the font files too.
So you should add fonts to a special collection.
Please, read this article:
https://stimulsoft.zendesk.com/hc/en-us ... PDF-export
Thank you.
There is no visual part in node.js.
There is no access to the font files too.
So you should add fonts to a special collection.
Please, read this article:
https://stimulsoft.zendesk.com/hc/en-us ... PDF-export
Thank you.