Commit 62d729f9 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

печать

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62421 954022d7-b5bf-4e40-9824-e11837661b57
parent a75b5882
......@@ -3660,25 +3660,26 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
var _printPagesData = this.wb.calcPagesPrint(_adjustPrint);
var isEndPrint = _api.wb.printSheet(_printer, _printPagesData);
if (undefined === _printer && _page === undefined)
{
var pdf_writer = new CPdfPrinter(this.wbModel.sUrlPath);
var isEndPrint = this.wb.printSheet(pdf_writer, _printPagesData);
if (undefined !== window["AscDesktopEditor"])
{
var pagescount = _printer.DocumentRenderer.m_lPagesCount;
var pagescount = pdf_writer.DocumentRenderer.m_lPagesCount;
window["AscDesktopEditor"]["Print_Start"](this.documentUrl, pagescount, "");
window["AscDesktopEditor"]["Print_Start"](g_sResourceServiceLocalUrl + this.documentId + "/", pagescount, "", -1);
for (var i = 0; i < pagescount; i++)
{
var _start = _printer.DocumentRenderer.m_arrayPages[i].StartOffset;
var _end = _printer.DocumentRenderer.Memory.pos;
var _start = pdf_writer.DocumentRenderer.m_arrayPages[i].StartOffset;
var _end = pdf_writer.DocumentRenderer.Memory.pos;
if (i != (pagescount - 1))
_end = _printer.DocumentRenderer.m_arrayPages[i + 1].StartOffset;
_end = pdf_writer.DocumentRenderer.m_arrayPages[i + 1].StartOffset;
window["AscDesktopEditor"]["Print_Page"](oDocRenderer.Memory.GetBase64Memory2(_start, _end - _start),
_printer.DocumentRenderer.m_arrayPages[i].Width, _printer.DocumentRenderer.m_arrayPages[i].Height);
window["AscDesktopEditor"]["Print_Page"](pdf_writer.DocumentRenderer.Memory.GetBase64Memory2(_start, _end - _start),
pdf_writer.DocumentRenderer.m_arrayPages[i].Width, pdf_writer.DocumentRenderer.m_arrayPages[i].Height);
}
window["AscDesktopEditor"]["Print_End"]();
......@@ -3686,6 +3687,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
return;
}
var isEndPrint = this.wb.printSheet(_printer, _printPagesData);
return _printer.DocumentRenderer.Memory;
};
......
......@@ -1342,6 +1342,7 @@ CShapeDrawer.prototype =
{
if (this.UniFill.fill.RasterImageId && this.UniFill.fill.RasterImageId.indexOf(".svg") != 0)
{
/*
this.Graphics.SaveGrState();
this.Graphics.StartClipPath();
this.Graphics.EndClipPath();
......@@ -1354,6 +1355,8 @@ CShapeDrawer.prototype =
this.Graphics.GrState.Clips.push(_histClip);
this.Graphics.RestoreGrState();
*/
this.Graphics.put_brushTexture(getFullImageSrc(this.UniFill.fill.RasterImageId), 0);
}
else
{
......@@ -1369,6 +1372,7 @@ CShapeDrawer.prototype =
}
else
{
/*
this.Graphics.SaveGrState();
this.Graphics.StartClipPath();
this.Graphics.EndClipPath();
......@@ -1381,6 +1385,10 @@ CShapeDrawer.prototype =
this.Graphics.GrState.Clips.push(_histClip);
this.Graphics.RestoreGrState();
*/
this.Graphics.drawImage(getFullImageSrc(this.UniFill.fill.RasterImageId), this.min_x, this.min_y, (this.max_x - this.min_x), (this.max_y - this.min_y), undefined, this.UniFill.fill.srcRect);
bIsFill = false;
}
}
else
......
......@@ -5586,7 +5586,7 @@ window["asc_docs_api"].prototype["asc_nativePrint"] = function(_printer, _page)
var _drawing_document = this.WordControl.m_oDrawingDocument;
var pagescount = _drawing_document.SlidesCount;
window["AscDesktopEditor"]["Print_Start"](this.DocumentUrl, pagescount, this.ThemeLoader.ThemesUrl);
window["AscDesktopEditor"]["Print_Start"](this.DocumentUrl, pagescount, this.ThemeLoader.ThemesUrl, this.getCurrentPage());
var oDocRenderer = new CDocumentRenderer();
oDocRenderer.VectorMemoryForPrint = new CMemory();
......
......@@ -7837,7 +7837,7 @@ window["asc_docs_api"].prototype["asc_nativePrint"] = function(_printer, _page)
var _drawing_document = this.WordControl.m_oDrawingDocument;
var pagescount = Math.min(_drawing_document.m_lPagesCount, _drawing_document.m_lCountCalculatePages);
window["AscDesktopEditor"]["Print_Start"](this.DocumentUrl, pagescount, "");
window["AscDesktopEditor"]["Print_Start"](this.DocumentUrl, pagescount, "", this.getCurrentPage());
var oDocRenderer = new CDocumentRenderer();
oDocRenderer.VectorMemoryForPrint = new CMemory();
......
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