Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
David PHAM-VAN
2021-01-01 14:24:36 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
69f007c6c72a090a28a9dc49dc02ed78f852b9a9
69f007c6
1 parent
093cc121
Improve Windows orientation handling
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
printing/windows/print_job.cpp
printing/windows/print_job.cpp
View file @
69f007c
...
...
@@ -130,6 +130,10 @@ bool PrintJob::directPrintPdf(std::string name,
bool
PrintJob
::
printPdf
(
std
::
string
name
)
{
PRINTDLG
pd
;
DEVMODE
*
dm
=
static_cast
<
DEVMODE
*>
(
GlobalAlloc
(
0
,
sizeof
(
DEVMODE
)));
ZeroMemory
(
dm
,
sizeof
(
DEVMODE
));
dm
->
dmFields
=
DM_ORIENTATION
;
dm
->
dmOrientation
=
2
;
// Initialize PRINTDLG
ZeroMemory
(
&
pd
,
sizeof
(
pd
));
...
...
@@ -137,10 +141,11 @@ bool PrintJob::printPdf(std::string name) {
// Initialize PRINTDLG
pd
.
hwndOwner
=
nullptr
;
pd
.
hDevMode
=
nullptr
;
// Don't forget to free or store hDevMode.
pd
.
hDevMode
=
dm
;
pd
.
hDevNames
=
nullptr
;
// Don't forget to free or store hDevNames.
pd
.
hDC
=
nullptr
;
pd
.
Flags
=
0x0004014C
;
pd
.
Flags
=
PD_USEDEVMODECOPIES
|
PD_RETURNDC
|
PD_PRINTSETUP
|
PD_NOSELECTION
|
PD_NOPAGENUMS
;
pd
.
nCopies
=
1
;
pd
.
nFromPage
=
0xFFFF
;
pd
.
nToPage
=
0xFFFF
;
...
...
Please
register
or
login
to post a comment