Commit 12a1052f authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

AscDesktopEditor Print

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62354 954022d7-b5bf-4e40-9824-e11837661b57
parent cced7902
......@@ -600,6 +600,14 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
};
spreadsheet_api.prototype.asc_Print = function (adjustPrint){
if (window["AscDesktopEditor"])
{
window.AscDesktopEditor_PrintData = adjustPrint;
window["AscDesktopEditor"]["Print"]();
return;
}
this.adjustPrint = adjustPrint ? adjustPrint : new asc_CAdjustPrint();
this.asc_DownloadAs(c_oAscFileType.PDF);
};
......@@ -3553,7 +3561,9 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
spreadsheet_api.prototype.asc_nativePrint = function(_printer, _page)
{
var _adjustPrint = new asc_CAdjustPrint();
var _adjustPrint = window.AscDesktopEditor_PrintData ? window.AscDesktopEditor_PrintData : new asc_CAdjustPrint();
window.AscDesktopEditor_PrintData = undefined;
var _printPagesData = this.wb.calcPagesPrint(_adjustPrint);
var isEndPrint = _api.wb.printSheet(_printer, _printPagesData);
......
......@@ -1412,6 +1412,13 @@ asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr, bParaPr){
/*functions for working with clipboard, document*/
/*TODO: Print,Undo,Redo,Copy,Cut,Paste,Share,Save,DownloadAs,ReturnToDocuments(вернуться на предыдущую страницу) & callbacks for these functions*/
asc_docs_api.prototype.asc_Print = function(){
if (window["AscDesktopEditor"])
{
window["AscDesktopEditor"]["Print"]();
return;
}
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Print);
var editor = this;
_downloadAs(this, c_oAscFileType.PDF, function(incomeObject){
......
......@@ -2253,6 +2253,12 @@ asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr)
/*TODO: Print,Undo,Redo,Copy,Cut,Paste,Share,Save,DownloadAs,ReturnToDocuments(вернуться на предыдущую страницу) & callbacks for these functions*/
asc_docs_api.prototype.asc_Print = function()
{
if (window["AscDesktopEditor"])
{
window["AscDesktopEditor"]["Print"]();
return;
}
if (undefined != window['qtDocBridge'])
{
this.async_SaveToPdf();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment