Hi,
It seems that printing and PDF/Excel exporting does not work when building with Electron and Vue 3. Is it an issue with Electron or something else wrong?
P.S.
- Procedures to run the sample
You could navigate to the debug section of VS Code and launch in the predefined mode called "electron: debug" or "electron: dev" on Windows/macOS after installing all dependencies. As an alternative, you could also use the command `npm run electron:serve` under the root directory. Please note that the app is a demo for evaluating the feasibility of developing a Windows/macOS desktop app using Vue 3 and Electron. Hence, the app is not expected to be launched and work well via the browser. Instead, a desktop app should be error-free and launched with the dev mode which means you could invoke the browser developer tools using the keys Ctrl+Shift/option+I.
To navigate to the view containing the data grid, type "SZ000021" in the first textbox and select a recent date (one day recommended). After submitting the form, waiting for the search results.
|
toolbarClick: function (args) {
switch (args.item.text) {
case 'PDF Export':
this.$refs.grid.pdfExport();
break;
case 'Excel Export':
this.$refs.grid.excelExport();
break;
}
}, |
Hi,
I have tried to change the corresponding code in the `handleToolbarClick` method in the file named SearchResultGrid.vue. But it still has no luck. Is it because of the use of Electron since downloading cannot be triggered as normal?
Regards,
Arvin
P.S.
the code looks like:
|
/**
* Handle the click on the toolbar item.
*/
handleToolbarClick(args) {
switch (args.item.text) {
case global.common.AUTO_FIT_ALL_KEY:
this.$refs[this.searchResultGridName].autoFitColumns([]);
break;
case "Excel Export": // "Ensure whether this block is called”
this.$refs[this.searchResultGridName].excelExport();
break;
case "PDF Export": // "PdfExport"
this.$refs[this.searchResultGridName].pdfExport();
break;
default:
return;
}
},
|
|
|
Hi,
I can confirm that using `args.item.text` rather than `args.item.id` can invoke Excel/PDF export.
However, I still get the following exception in the browser dev tool console for the PDF export even though I have configured a custom font using `PdfTrueTypeFont` following the doc link you provided. I was wondering if there is something else wrong with the usage of the PDF export function.
pdf-export.js:156
Uncaught (in promise) Proxy {isStreamCopied: false, defaultMargin: 40, streamWriter: null, document: PdfDocument, objects: PdfMainObjectCollection, …}[[Handler]]: Object[[Target]]: PdfDocument[[IsRevoked]]: false
(anonymous) @ pdf-export.js:156
Promise.catch (async)
(anonymous) @ pdf-export.js:155
Promise.then (async)
(anonymous) @ pdf-export.js:142
push../node_modules/@syncfusion/ej2-grids/src/grid/actions/pdf-export.js.PdfExport.Map @ pdf-export.js:141
push../node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js.Grid.pdfExport @ grid.js:4122
push../node_modules/@syncfusion/ej2-vue-grids/src/grid/grid.component.js.GridComponent.pdfExport @ grid.component.js:429
handleToolbarClick @ SearchResultGrid.vue:205
push../node_modules/@syncfusion/ej2-base/src/observer.js.Observer.notify @ observer.js:101
push../node_modules/@syncfusion/ej2-base/src/base.js.Base.trigger @ base.js:190
push../node_modules/@syncfusion/ej2-vue-grids/src/grid/grid.component.js.GridComponent.trigger @ grid.component.js:150
push../node_modules/@syncfusion/ej2-grids/src/grid/actions/toolbar.js.Toolbar.toolbarClickHandler @ toolbar.js:366
push../node_modules/@syncfusion/ej2-base/src/observer.js.Observer.notify @ observer.js:101
push../node_modules/@syncfusion/ej2-base/src/base.js.Base.trigger @ base.js:190
push../node_modules/@syncfusion/ej2-navigations/src/toolbar/toolbar.js.Toolbar.clickHandler @ toolbar.js:583
Besides, is there any update for printing? Thanks for your work and reply!
Regards,
Arvin
|
|
Hi,
I have provided a demo using a specific local data source. Please type "SZ000021" and select 29 Nov 2021 only (2021/11/29 - 2021/11/29) to make the demo work.
Thanks much for your work and reply!
Regards,
Arvin
|
|
Hi,
Thanks for your reply!
While currently I only have problems with the printing function, I was wondering if you plan to provide a workaround since I reckon that it is only an issue when using Electron with Vue.js 3.
Regards,
Arvin
Sorry, but any update available?
Hi Joseph,
Could you confirm if it were fixed in the latest version? Thanks!
Regards,
Arvin
Hi Joseph,
Sorry for the inconvenience,
We are unable to complete it as planned due to some internal complexities. However, we will prioritize and included it with our Volume 1 SP release which is scheduled on mid of May 2022.
We appreciate your patience until then.
Regards,
Gokul
We are experiencing the same issue. When you reckon to this issue be fixed?
Hi Team,
Sorry for the inconvenience,
We are unable to complete it as planned due to some internal complexities. However, we will prioritize and included it with our weekly patch release which is scheduled on the 31st of May 2022.
We appreciate your patience until then.
Regards,
Gokul
Hi Team,
Sorry for the inconvenience,
We are unable to complete it as planned. However, we will prioritize, and we will include it with our Volume 2 main release which is scheduled on the end of June 2022.
We appreciate your patience until then.
Regards,
Gokul
Hi Team,
Sorry for the inconvenience,
We are unable to complete it as planned. However, we will prioritize, and we will include it with our Volume 2 SP release which is scheduled on the start of August 2022.
We appreciate your patience until then.
Regards,
Ragunath S
What is the probability of correcting this bug in Volume 2 SP release? We have been waiting for this fix for several months and it is a very important matter for us.
Hi Kamila,
Sorry for the inconvenience,
We are working on this issue at high priority and we will include it with our weekly patch release which is scheduled on the 15th of August 2022 without any further delay.
We appreciate your patience until then.
Regards,
Ragunath S
Hi Kamila,
Sorry for the inconvenience,
We are working on this issue at high priority and we will include it with our Volume 3 release which is scheduled to roll out on the end of September 2022 without any further delay.
We appreciate your patience until then.
Regards,
Ragunath S
Hi Arvin,
Thanks for your patience.
We are glad to announce that we have fixed the issue - “Script error occurs when Exporting (Printing) in the Vue3 Grid” in our 20.4.43 patch release. So please update your packages to latest version to include this fix.
Feedback link: https://www.syncfusion.com/feedback/32201/script-error-occurs-when-exporting-printing-in-the-vue3-grid
Release Notes: https://ej2.syncfusion.com/vue/documentation/release-notes/20.4.43/?type=all#grid
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Theveshwar