Discuss anything related to web development but no technical support questions


Post by RedTeam »

Team Bryntum:

When I select the Single Page option of the control pagination, I need the zoom to fit option to run by default so that the pdf will show better.
Could you tell me how I could do that?
single1.png
single1.png (27.61 KiB) Viewed 3642 times

Post by Terence »

Hi, yes sure ....

We have template functions to do that,

Zoom here:
https://www.bryntum.com/docs/scheduler- ... foreExport

Restore there:
https://www.bryntum.com/docs/scheduler- ... fterExport

Post by RedTeam »

I click in the template method and there is no information,
template1.png
template1.png (36.88 KiB) Viewed 3634 times
template2.png
template2.png (23.32 KiB) Viewed 3634 times

Post by Terence »

Thank you for the report. This seems to be a glitch in the documentation. The link should not be there.

https://app.assembla.com/spaces/bryntum ... cs/details.

You can just pass these functions to the plugin.

Post by RedTeam »

Could you give me more detail of what functions I would have to put in the plugin?

Post by Terence »

You can pass the functions like below:
new Gnt.plugin.Export({
        ...,
		beforeExport : function (scheduler) {
			//scheduler.zoomToLevel(printLevel)		
		},
		
		afterExport : function (scheduler) {
			//scheduler.zoomToLevel(restoreLevel)	
		}
		
    });

Post by RedTeam »

but the zoom to fit option would only be for the option Multiple pages (vertically), it is not for all options.

Post by RedTeam »

Sorry, not is Multiple pages (vertically), will be only when selecting "Single Page" option.

Post by Terence »

You can use the beforeexport event in that case. You can pass it as a listener. You will get the selected exporter and the configuration as input params.

https://www.bryntum.com/docs/scheduler- ... foreexport

The afterExport tpl function you can use to restore the scheduler.

Post Reply