Hi Isomorphic,
please see this slightly modified sample (original here https://www.smartclient.com/smartcli.../?id=pdfExport);
Please see "buttonPreview". In the click function, I'm using the class API of Canvas now for the method showPrintPreview. As You can see, I wanted to change the Print Preview Window's title and the button Title, using printWindowProperties. Those properties only get applied if I use Canvas.showPrintPreview(mainLayout,null,{title: "München",printButtonTitle :"München"}); but it has no effect if I do this: mainLayout.showPrintPreview(mainLayout,null,{title: "München",printButtonTitle :"München"}); or mainLayout.showPrintPreview(null,null,{title: "München",printButtonTitle :"München"}); With either of the last two examples I also don't get an error message or something in the showcase.
So first Question:
I took a look at the reference docs, and they say, showPrintPreview is a method from the Canvas class API. Clearly one can call it from an instance of that class, like You do it in the example, and VLayout does inherit it, but why can I not apply the properties? When I use the class method directly it works as You can see in the above sample.
Second Question:
With that Code above, I open the Print Preview Window and the title and printButtonTitle properties get applied properly. When I click on the print button then and download the document as PDF the diacritics are not getting translated to HTML properly. Please take a look at this.
Tested Browsers:
Thanks in Advance,
Kind Regards
please see this slightly modified sample (original here https://www.smartclient.com/smartcli.../?id=pdfExport);
Code:
isc.ListGrid.create({ ID: "countryList", width: 500, height: 350, data: countryData, fields: [ {name: "countryName", title: "Country"}, {name: "capital", title: "Capital"}, {name: "continent", title: "Continent"} ], canExpandRecords: true, expansionMode: "detailField", detailField: "background" }); isc.IButton.create({ ID : "buttonPdf", width: 150, title: "Export", click : function () { // this sample exports to the Enterprise skin, and that skin defaults to // alternate row styling but not alternate field styling - remember the // alternate styling settings (from the current skin) and update them to // those required for Enterprise, via a call to setProperties(). var oldAlternateRecordStyles = countryList.alternateRecordStyles; var oldAlternateFieldStyles = countryList.alternateFieldStyles; countryList.setProperties({ alternateRecordStyles: true, alternateFieldStyles: false }); var settings = { skinName: "Enterprise", pdfName: "export"// without .pdf }; isc.RPCManager.exportContent(mainLayout, settings); // reinstate the alternate styling settings from the current skin, on a short delay countryList.delayCall("setProperties", [{ alternateRecordStyles: oldAlternateRecordStyles, alternateFieldStyles: oldAlternateFieldStyles }], 300); } }); isc.IButton.create({ ID : "buttonPreview", width: 150, title: "Show Print PreView", click: function () { Canvas.showPrintPreview(mainLayout,null,{title: "München",printButtonTitle :"München"}); } }); isc.HLayout.create({ ID: "hLayout", membersMargin: 5, members: [ buttonPdf, buttonPreview ] }); isc.VLayout.create({ ID: "mainLayout", width: 500, membersMargin: 5, height: 350, members: [ countryList, hLayout ] }); countryList.expandRecord(countryList.data[2]); countryList.expandRecord(countryList.data[4]);
So first Question:
I took a look at the reference docs, and they say, showPrintPreview is a method from the Canvas class API. Clearly one can call it from an instance of that class, like You do it in the example, and VLayout does inherit it, but why can I not apply the properties? When I use the class method directly it works as You can see in the above sample.
Second Question:
With that Code above, I open the Print Preview Window and the title and printButtonTitle properties get applied properly. When I click on the print button then and download the document as PDF the diacritics are not getting translated to HTML properly. Please take a look at this.
Tested Browsers:
- Chrome Version 76.0.3809.100
- Firefox Quantum 68.0.1
Thanks in Advance,
Kind Regards
Comment