Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
8bfb160d
Commit
8bfb160d
authored
Jun 15, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix create pdf on server side with flag 'fit to page'
parent
d8fc2039
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
cell/api.js
cell/api.js
+10
-7
No files found.
cell/api.js
View file @
8bfb160d
...
...
@@ -3122,18 +3122,19 @@ var editor;
spreadsheet_api
.
prototype
.
asc_nativeCalculate
=
function
()
{
};
spreadsheet_api
.
prototype
.
asc_nativePrint
=
function
(
_printer
,
_page
,
_param
)
{
var
_adjustPrint
=
window
.
AscDesktopEditor_PrintData
?
window
.
AscDesktopEditor_PrintData
:
new
Asc
.
asc_CAdjustPrint
();
spreadsheet_api
.
prototype
.
asc_nativePrint
=
function
(
_printer
,
_page
,
_param
)
{
var
_adjustPrint
=
window
.
AscDesktopEditor_PrintData
||
new
Asc
.
asc_CAdjustPrint
();
window
.
AscDesktopEditor_PrintData
=
undefined
;
if
(
1
==
_param
)
{
var
countWorksheets
=
_adjustPrint
.
asc_setPrintType
(
Asc
.
c_oAscPrintType
.
EntireWorkbook
),
printOptions
;
this
.
wbModel
.
getWorksheetCount
();
_adjustPrint
.
asc_setPrintType
(
Asc
.
c_oAscPrintType
.
EntireWorkbook
);
var
printOptions
;
var
countWorksheets
=
this
.
wbModel
.
getWorksheetCount
();
for
(
var
j
=
0
;
j
<
countWorksheets
;
++
j
)
{
printOptions
=
this
.
wbModel
.
getWorksheet
(
j
).
PagePrintOptions
;
printOptions
.
asc_setFitToWidth
(
true
);
printOptions
.
asc_setFitToHeight
(
true
);
}
}
}
var
_printPagesData
=
this
.
wb
.
calcPagesPrint
(
_adjustPrint
);
...
...
@@ -3154,12 +3155,14 @@ var editor;
_end
=
pdf_writer
.
DocumentRenderer
.
m_arrayPages
[
i
+
1
].
StartOffset
;
}
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_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
"
]();
}
return
pdf_writer
.
DocumentRenderer
.
Memory
;
return
pdf_writer
.
DocumentRenderer
.
Memory
;
}
var
isEndPrint
=
this
.
wb
.
printSheet
(
_printer
,
_printPagesData
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment