Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 606 lines (495 sloc) 18.332 kb
eba3580 @djs Initial commit - Notepad2 4.1.24
authored
1 /******************************************************************************
2 *
3 *
4 * Notepad2
5 *
6 * Print.cpp
7 * Scintilla Printing Functionality
8 * Mostly taken from SciTE, (c) Neil Hodgson, http://www.scintilla.org
9 *
10 * See Readme.txt for more information about this source code.
11 * Please send me your comments to this work.
12 *
13 * See License.txt for details about distribution and modification.
14 *
15 * (c) Florian Balmer 1996-2010
16 * florian.balmer@gmail.com
17 * http://www.flos-freeware.ch
18 *
19 *
20 ******************************************************************************/
21 #define _WIN32_WINNT 0x501
22 #include <windows.h>
23 #include <commctrl.h>
24 #include <shlwapi.h>
25 #include <commdlg.h>
26 #include <string.h>
27 #include "platform.h"
28 #include "scintilla.h"
29 #include "scilexer.h"
30 extern "C" {
31 #include "dialogs.h"
32 #include "helpers.h"
1a3772c @djs kliu: call macros patch
authored
33 #include "scicall.h"
eba3580 @djs Initial commit - Notepad2 4.1.24
authored
34 }
35 #include "resource.h"
36
37
38 extern "C" HINSTANCE g_hInstance;
39
40
41 // Global settings...
42 extern "C" int iPrintHeader;
43 extern "C" int iPrintFooter;
44 extern "C" int iPrintColor;
45 extern "C" int iPrintZoom;
46 extern "C" RECT pagesetupMargin;
47
48
49 // Stored objects...
50 HGLOBAL hDevMode = NULL;
51 HGLOBAL hDevNames = NULL;
52
53
54 //=============================================================================
55 //
56 // EditPrint() - Code from SciTE
57 //
58 extern "C" HWND hwndStatus;
59
60 void StatusUpdatePrintPage(int iPageNum)
61 {
62 WCHAR tch[32];
63
64 FormatString(tch,COUNTOF(tch),IDS_PRINTFILE,iPageNum);
65
66 StatusSetText(hwndStatus,255,tch);
67 StatusSetSimple(hwndStatus,TRUE);
68
69 InvalidateRect(hwndStatus,NULL,TRUE);
70 UpdateWindow(hwndStatus);
71 }
72
73
74 extern "C" BOOL EditPrint(HWND hwnd,LPCWSTR pszDocTitle,LPCWSTR pszPageFormat)
75 {
76
77 // Don't print empty documents
78 if (SendMessage(hwnd,SCI_GETLENGTH,0,0) == 0) {
79 MsgBox(MBINFO,IDS_PRINT_EMPTY);
80 return TRUE;
81 }
82
83 int startPos;
84 int endPos;
85
86 HDC hdc;
87
88 RECT rectMargins;
89 RECT rectPhysMargins;
90 RECT rectSetup;
91 POINT ptPage;
92 POINT ptDpi;
93
94 //RECT rectSetup;
95
96 TEXTMETRIC tm;
97
98 int headerLineHeight;
99 HFONT fontHeader;
100
101 int footerLineHeight;
102 HFONT fontFooter;
103
104 WCHAR dateString[256];
105
106 DOCINFO di = {sizeof(DOCINFO), 0, 0, 0, 0};
107
108 LONG lengthDoc;
109 LONG lengthDocMax;
110 LONG lengthPrinted;
111
112 struct RangeToFormat frPrint;
113
114 int pageNum;
115 BOOL printPage;
116
117 WCHAR pageString[32];
118
119 HPEN pen;
120 HPEN penOld;
121
122 PRINTDLG pdlg = { sizeof(PRINTDLG), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
123 pdlg.hwndOwner = GetParent(hwnd);
124 pdlg.hInstance = g_hInstance;
125 pdlg.Flags = PD_USEDEVMODECOPIES | PD_ALLPAGES | PD_RETURNDC;
126 pdlg.nFromPage = 1;
127 pdlg.nToPage = 1;
128 pdlg.nMinPage = 1;
129 pdlg.nMaxPage = 0xffffU;
130 pdlg.nCopies = 1;
131 pdlg.hDC = 0;
132 pdlg.hDevMode = hDevMode;
133 pdlg.hDevNames = hDevNames;
134
135 startPos = SendMessage(hwnd,SCI_GETSELECTIONSTART,0,0);;
136 endPos = SendMessage(hwnd,SCI_GETSELECTIONEND,0,0);
137
138 if (startPos == endPos) {
139 pdlg.Flags |= PD_NOSELECTION;
140 } else {
141 pdlg.Flags |= PD_SELECTION;
142 }
143 if (0) {
144 // Don't display dialog box, just use the default printer and options
145 pdlg.Flags |= PD_RETURNDEFAULT;
146 }
147 if (!PrintDlg(&pdlg)) {
148 return TRUE; // False means error...
149 }
150
151 hDevMode = pdlg.hDevMode;
152 hDevNames = pdlg.hDevNames;
153
154 hdc = pdlg.hDC;
155
156 // Get printer resolution
157 ptDpi.x = GetDeviceCaps(hdc, LOGPIXELSX); // dpi in X direction
158 ptDpi.y = GetDeviceCaps(hdc, LOGPIXELSY); // dpi in Y direction
159
160 // Start by getting the physical page size (in device units).
161 ptPage.x = GetDeviceCaps(hdc, PHYSICALWIDTH); // device units
162 ptPage.y = GetDeviceCaps(hdc, PHYSICALHEIGHT); // device units
163
164 // Get the dimensions of the unprintable
165 // part of the page (in device units).
166 rectPhysMargins.left = GetDeviceCaps(hdc, PHYSICALOFFSETX);
167 rectPhysMargins.top = GetDeviceCaps(hdc, PHYSICALOFFSETY);
168
169 // To get the right and lower unprintable area,
170 // we take the entire width and height of the paper and
171 // subtract everything else.
172 rectPhysMargins.right = ptPage.x // total paper width
173 - GetDeviceCaps(hdc, HORZRES) // printable width
174 - rectPhysMargins.left; // left unprintable margin
175
176 rectPhysMargins.bottom = ptPage.y // total paper height
177 - GetDeviceCaps(hdc, VERTRES) // printable height
178 - rectPhysMargins.top; // right unprintable margin
179
180 // At this point, rectPhysMargins contains the widths of the
181 // unprintable regions on all four sides of the page in device units.
182
183 // Take in account the page setup given by the user (if one value is not null)
184 if (pagesetupMargin.left != 0 || pagesetupMargin.right != 0 ||
185 pagesetupMargin.top != 0 || pagesetupMargin.bottom != 0) {
186
187 // Convert the hundredths of millimeters (HiMetric) or
188 // thousandths of inches (HiEnglish) margin values
189 // from the Page Setup dialog to device units.
190 // (There are 2540 hundredths of a mm in an inch.)
191
192 WCHAR localeInfo[3];
193 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IMEASURE, localeInfo, 3);
194
195 if (localeInfo[0] == L'0') { // Metric system. L'1' is US System
196 rectSetup.left = MulDiv (pagesetupMargin.left, ptDpi.x, 2540);
197 rectSetup.top = MulDiv (pagesetupMargin.top, ptDpi.y, 2540);
198 rectSetup.right = MulDiv(pagesetupMargin.right, ptDpi.x, 2540);
199 rectSetup.bottom = MulDiv(pagesetupMargin.bottom, ptDpi.y, 2540);
200 } else {
201 rectSetup.left = MulDiv(pagesetupMargin.left, ptDpi.x, 1000);
202 rectSetup.top = MulDiv(pagesetupMargin.top, ptDpi.y, 1000);
203 rectSetup.right = MulDiv(pagesetupMargin.right, ptDpi.x, 1000);
204 rectSetup.bottom = MulDiv(pagesetupMargin.bottom, ptDpi.y, 1000);
205 }
206
207 // Dont reduce margins below the minimum printable area
208 rectMargins.left = max(rectPhysMargins.left, rectSetup.left);
209 rectMargins.top = max(rectPhysMargins.top, rectSetup.top);
210 rectMargins.right = max(rectPhysMargins.right, rectSetup.right);
211 rectMargins.bottom = max(rectPhysMargins.bottom, rectSetup.bottom);
212 } else {
213 rectMargins.left = rectPhysMargins.left;
214 rectMargins.top = rectPhysMargins.top;
215 rectMargins.right = rectPhysMargins.right;
216 rectMargins.bottom = rectPhysMargins.bottom;
217 }
218
219 // rectMargins now contains the values used to shrink the printable
220 // area of the page.
221
222 // Convert device coordinates into logical coordinates
223 DPtoLP(hdc, (LPPOINT)&rectMargins, 2);
224 DPtoLP(hdc, (LPPOINT)&rectPhysMargins, 2);
225
226 // Convert page size to logical units and we're done!
227 DPtoLP(hdc, (LPPOINT) &ptPage, 1);
228
229 headerLineHeight = MulDiv(8,ptDpi.y, 72);
230 fontHeader = CreateFont(headerLineHeight,
231 0, 0, 0,
232 FW_BOLD,
233 0,
234 0,
235 0, 0, 0,
236 0, 0, 0,
237 L"Arial");
238 SelectObject(hdc, fontHeader);
239 GetTextMetrics(hdc, &tm);
240 headerLineHeight = tm.tmHeight + tm.tmExternalLeading;
241
242 if (iPrintHeader == 3)
243 headerLineHeight = 0;
244
245 footerLineHeight = MulDiv(7,ptDpi.y, 72);
246 fontFooter = CreateFont(footerLineHeight,
247 0, 0, 0,
248 FW_NORMAL,
249 0,
250 0,
251 0, 0, 0,
252 0, 0, 0,
253 L"Arial");
254 SelectObject(hdc, fontFooter);
255 GetTextMetrics(hdc, &tm);
256 footerLineHeight = tm.tmHeight + tm.tmExternalLeading;
257
258 if (iPrintFooter == 1)
259 footerLineHeight = 0;
260
261 di.lpszDocName = pszDocTitle;
262 di.lpszOutput = 0;
263 di.lpszDatatype = 0;
264 di.fwType = 0;
265 if (StartDoc(hdc, &di) < 0) {
266 DeleteDC(hdc);
267 if (fontHeader)
268 DeleteObject(fontHeader);
269 if (fontFooter)
270 DeleteObject(fontFooter);
271 return FALSE;
272 }
273
274 // Get current date...
275 SYSTEMTIME st;
276 GetLocalTime(&st);
277 GetDateFormat(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&st,NULL,dateString,256);
278
279 // Get current time...
280 if (iPrintHeader == 0)
281 {
282 WCHAR timeString[128];
283 GetTimeFormat(LOCALE_USER_DEFAULT,TIME_NOSECONDS,&st,NULL,timeString,128);
284 lstrcat(dateString,L" ");
285 lstrcat(dateString,timeString);
286 }
287
288 // Set print color mode
289 int printColorModes[5] = {
290 SC_PRINT_NORMAL,
291 SC_PRINT_INVERTLIGHT,
292 SC_PRINT_BLACKONWHITE,
293 SC_PRINT_COLOURONWHITE,
294 SC_PRINT_COLOURONWHITEDEFAULTBG };
295 SendMessage(hwnd,SCI_SETPRINTCOLOURMODE,printColorModes[iPrintColor],0);
296
297 // Set print zoom...
298 SendMessage(hwnd,SCI_SETPRINTMAGNIFICATION,(WPARAM)iPrintZoom,0);
299
300 lengthDoc = SendMessage(hwnd,SCI_GETLENGTH,0,0);
301 lengthDocMax = lengthDoc;
302 lengthPrinted = 0;
303
304 // Requested to print selection
305 if (pdlg.Flags & PD_SELECTION) {
306 if (startPos > endPos) {
307 lengthPrinted = endPos;
308 lengthDoc = startPos;
309 } else {
310 lengthPrinted = startPos;
311 lengthDoc = endPos;
312 }
313
314 if (lengthPrinted < 0)
315 lengthPrinted = 0;
316 if (lengthDoc > lengthDocMax)
317 lengthDoc = lengthDocMax;
318 }
319
320 // We must substract the physical margins from the printable area
321 frPrint.hdc = hdc;
322 frPrint.hdcTarget = hdc;
323 frPrint.rc.left = rectMargins.left - rectPhysMargins.left;
324 frPrint.rc.top = rectMargins.top - rectPhysMargins.top;
325 frPrint.rc.right = ptPage.x - rectMargins.right - rectPhysMargins.left;
326 frPrint.rc.bottom = ptPage.y - rectMargins.bottom - rectPhysMargins.top;
327 frPrint.rcPage.left = 0;
328 frPrint.rcPage.top = 0;
329 frPrint.rcPage.right = ptPage.x - rectPhysMargins.left - rectPhysMargins.right - 1;
330 frPrint.rcPage.bottom = ptPage.y - rectPhysMargins.top - rectPhysMargins.bottom - 1;
331 frPrint.rc.top += headerLineHeight + headerLineHeight / 2;
332 frPrint.rc.bottom -= footerLineHeight + footerLineHeight / 2;
333 // Print each page
334 pageNum = 1;
335
336 while (lengthPrinted < lengthDoc) {
337 printPage = (!(pdlg.Flags & PD_PAGENUMS) ||
338 (pageNum >= pdlg.nFromPage) && (pageNum <= pdlg.nToPage));
339
340 wsprintf(pageString, pszPageFormat, pageNum);
341
342 if (printPage) {
343
344 // Show wait cursor...
345 SendMessage(hwnd,SCI_SETCURSOR,SC_CURSORWAIT,0);
346
347 // Display current page number in Statusbar
348 StatusUpdatePrintPage(pageNum);
349
350 StartPage(hdc);
351
352 SetTextColor(hdc, RGB(0,0,0));
353 SetBkColor(hdc, RGB(255,255,255));
354 SelectObject(hdc, fontHeader);
355 UINT ta = SetTextAlign(hdc, TA_BOTTOM);
356 RECT rcw = {frPrint.rc.left, frPrint.rc.top - headerLineHeight - headerLineHeight / 2,
357 frPrint.rc.right, frPrint.rc.top - headerLineHeight / 2};
358 rcw.bottom = rcw.top + headerLineHeight;
359
360 if (iPrintHeader < 3)
361 {
362 ExtTextOut(hdc, frPrint.rc.left + 5, frPrint.rc.top - headerLineHeight / 2,
363 /*ETO_OPAQUE*/0, &rcw, pszDocTitle,
364 lstrlen(pszDocTitle), NULL);
365 }
366
367 // Print date in header
368 if (iPrintHeader == 0 || iPrintHeader == 1)
369 {
370 SIZE sizeInfo;
371 SelectObject(hdc,fontFooter);
372 GetTextExtentPoint32(hdc,dateString,lstrlen(dateString),&sizeInfo);
373 ExtTextOut(hdc, frPrint.rc.right - 5 - sizeInfo.cx, frPrint.rc.top - headerLineHeight / 2,
374 /*ETO_OPAQUE*/0, &rcw, dateString,
375 lstrlen(dateString), NULL);
376 }
377
378 if (iPrintHeader < 3)
379 {
380 SetTextAlign(hdc, ta);
381 pen = CreatePen(0, 1, RGB(0,0,0));
382 penOld = (HPEN)SelectObject(hdc, pen);
383 MoveToEx(hdc, frPrint.rc.left, frPrint.rc.top - headerLineHeight / 4, NULL);
384 LineTo(hdc, frPrint.rc.right, frPrint.rc.top - headerLineHeight / 4);
385 SelectObject(hdc, penOld);
386 DeleteObject(pen);
387 }
388 }
389
390 frPrint.chrg.cpMin = lengthPrinted;
391 frPrint.chrg.cpMax = lengthDoc;
392
393 lengthPrinted = SendMessage(hwnd,SCI_FORMATRANGE,printPage,(LPARAM)&frPrint);
394
395 if (printPage) {
396 SetTextColor(hdc, RGB(0,0,0));
397 SetBkColor(hdc, RGB(255,255,255));
398 SelectObject(hdc, fontFooter);
399 UINT ta = SetTextAlign(hdc, TA_TOP);
400 RECT rcw = {frPrint.rc.left, frPrint.rc.bottom + footerLineHeight / 2,
401 frPrint.rc.right, frPrint.rc.bottom + footerLineHeight + footerLineHeight / 2};
402
403 if (iPrintFooter == 0)
404 {
405 SIZE sizeFooter;
406 GetTextExtentPoint32(hdc,pageString,lstrlen(pageString),&sizeFooter);
407 ExtTextOut(hdc, frPrint.rc.right - 5 - sizeFooter.cx, frPrint.rc.bottom + footerLineHeight / 2,
408 /*ETO_OPAQUE*/0, &rcw, pageString,
409 lstrlen(pageString), NULL);
410
411 SetTextAlign(hdc, ta);
412 pen = ::CreatePen(0, 1, RGB(0,0,0));
413 penOld = (HPEN)SelectObject(hdc, pen);
414 SetBkColor(hdc, RGB(0,0,0));
415 MoveToEx(hdc, frPrint.rc.left, frPrint.rc.bottom + footerLineHeight / 4, NULL);
416 LineTo(hdc, frPrint.rc.right, frPrint.rc.bottom + footerLineHeight / 4);
417 SelectObject(hdc, penOld);
418 DeleteObject(pen);
419 }
420
421 EndPage(hdc);
422 }
423 pageNum++;
424
425 if ((pdlg.Flags & PD_PAGENUMS) && (pageNum > pdlg.nToPage))
426 break;
427 }
428
429 SendMessage(hwnd,SCI_FORMATRANGE, FALSE, 0);
430
431 EndDoc(hdc);
432 DeleteDC(hdc);
433 if (fontHeader)
434 DeleteObject(fontHeader);
435 if (fontFooter)
436 DeleteObject(fontFooter);
437
438 // Reset Statusbar to default mode
439 StatusSetSimple(hwndStatus,FALSE);
440
441 // Remove wait cursor...
442 SendMessage(hwnd,SCI_SETCURSOR,SC_CURSORNORMAL,0);
443
444 return TRUE;
445 }
446
447
448 //=============================================================================
449 //
450 // EditPrintSetup() - Code from SciTE
451 //
452 // Custom controls: 30 Zoom
453 // 31 Spin
454 // 32 Header
455 // 33 Footer
456 // 34 Colors
457 //
458 extern "C" UINT_PTR CALLBACK PageSetupHook(HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
459 {
460 switch (uiMsg)
461 {
462 case WM_INITDIALOG:
463 {
464 WCHAR tch[512];
465 WCHAR *p1,*p2;
466
467 SendDlgItemMessage(hwnd,30,EM_LIMITTEXT,32,0);
468
469 SendDlgItemMessage(hwnd,31,UDM_SETRANGE,0,MAKELONG((short)20,(short)-10));
470 SendDlgItemMessage(hwnd,31,UDM_SETPOS,0,MAKELONG((short)iPrintZoom,0));
471
472 // Set header options
473 GetString(IDS_PRINT_HEADER,tch,COUNTOF(tch));
474 lstrcat(tch,L"|");
475 p1 = tch;
476 while (p2 = StrChr(p1,L'|')) {
477 *p2++ = L'\0';
478 if (*p1)
479 SendDlgItemMessage(hwnd,32,CB_ADDSTRING,0,(LPARAM)p1);
480 p1 = p2; }
481 SendDlgItemMessage(hwnd,32,CB_SETCURSEL,(WPARAM)iPrintHeader,0);
482
483 // Set footer options
484 GetString(IDS_PRINT_FOOTER,tch,COUNTOF(tch));
485 lstrcat(tch,L"|");
486 p1 = tch;
487 while (p2 = StrChr(p1,L'|')) {
488 *p2++ = L'\0';
489 if (*p1)
490 SendDlgItemMessage(hwnd,33,CB_ADDSTRING,0,(LPARAM)p1);
491 p1 = p2; }
492 SendDlgItemMessage(hwnd,33,CB_SETCURSEL,(WPARAM)iPrintFooter,0);
493
494 // Set color options
495 GetString(IDS_PRINT_COLOR,tch,COUNTOF(tch));
496 lstrcat(tch,L"|");
497 p1 = tch;
498 while (p2 = StrChr(p1,L'|')) {
499 *p2++ = L'\0';
500 if (*p1)
501 SendDlgItemMessage(hwnd,34,CB_ADDSTRING,0,(LPARAM)p1);
502 p1 = p2; }
503 SendDlgItemMessage(hwnd,34,CB_SETCURSEL,(WPARAM)iPrintColor,0);
504
505 // Make combos handier
506 SendDlgItemMessage(hwnd,32,CB_SETEXTENDEDUI,TRUE,0);
507 SendDlgItemMessage(hwnd,33,CB_SETEXTENDEDUI,TRUE,0);
508 SendDlgItemMessage(hwnd,34,CB_SETEXTENDEDUI,TRUE,0);
509 SendDlgItemMessage(hwnd,1137,CB_SETEXTENDEDUI,TRUE,0);
510 SendDlgItemMessage(hwnd,1138,CB_SETEXTENDEDUI,TRUE,0);
511 }
512 break;
513
514 case WM_COMMAND:
515 if (LOWORD(wParam) == IDOK)
516 {
517 LONG lPos = SendDlgItemMessage(hwnd,31,UDM_GETPOS,0,0);
518 if (HIWORD(lPos) == 0)
519 iPrintZoom = (int)(short)LOWORD(lPos);
520 else
521 iPrintZoom = 0;
522
523 iPrintHeader = SendDlgItemMessage(hwnd,32,CB_GETCURSEL,0,0);
524 iPrintFooter = SendDlgItemMessage(hwnd,33,CB_GETCURSEL,0,0);
525 iPrintColor = SendDlgItemMessage(hwnd,34,CB_GETCURSEL,0,0);
526 }
527 break;
528
529 default:
530 break;
531 }
532 return(0);
533 }
534
535
536 extern "C" void EditPrintSetup(HWND hwnd)
537 {
538 DLGTEMPLATE* pDlgTemplate =
539 LoadThemedDialogTemplate(MAKEINTRESOURCE(IDD_PAGESETUP),g_hInstance);
540
541 PAGESETUPDLG pdlg;
542 ZeroMemory(&pdlg,sizeof(PAGESETUPDLG));
543 pdlg.lStructSize = sizeof(PAGESETUPDLG);
544 pdlg.Flags = PSD_ENABLEPAGESETUPHOOK | PSD_ENABLEPAGESETUPTEMPLATEHANDLE;
545 pdlg.lpfnPageSetupHook = PageSetupHook;
546 pdlg.hPageSetupTemplate = pDlgTemplate;
547 pdlg.hwndOwner = GetParent(hwnd);
548 pdlg.hInstance = g_hInstance;
549
550 if (pagesetupMargin.left != 0 || pagesetupMargin.right != 0 ||
551 pagesetupMargin.top != 0 || pagesetupMargin.bottom != 0) {
552 pdlg.Flags |= PSD_MARGINS;
553
554 pdlg.rtMargin.left = pagesetupMargin.left;
555 pdlg.rtMargin.top = pagesetupMargin.top;
556 pdlg.rtMargin.right = pagesetupMargin.right;
557 pdlg.rtMargin.bottom = pagesetupMargin.bottom;
558 }
559
560 pdlg.hDevMode = hDevMode;
561 pdlg.hDevNames = hDevNames;
562
563 if (PageSetupDlg(&pdlg)) {
564
565 pagesetupMargin.left = pdlg.rtMargin.left;
566 pagesetupMargin.top = pdlg.rtMargin.top;
567 pagesetupMargin.right = pdlg.rtMargin.right;
568 pagesetupMargin.bottom = pdlg.rtMargin.bottom;
569
570 hDevMode = pdlg.hDevMode;
571 hDevNames = pdlg.hDevNames;
572 }
573
574 LocalFree(pDlgTemplate);
575 }
576
577
578 //=============================================================================
579 //
580 // EditPrintInit() - Setup default page margin if no values from registry
581 //
582 extern "C" void EditPrintInit()
583 {
584 if (pagesetupMargin.left == -1 || pagesetupMargin.top == -1 ||
585 pagesetupMargin.right == -1 || pagesetupMargin.bottom == -1)
586 {
587 WCHAR localeInfo[3];
588 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IMEASURE, localeInfo, 3);
589
590 if (localeInfo[0] == L'0') { // Metric system. L'1' is US System
591 pagesetupMargin.left = 2000;
592 pagesetupMargin.top = 2000;
593 pagesetupMargin.right = 2000;
594 pagesetupMargin.bottom = 2000; }
595
596 else {
597 pagesetupMargin.left = 1000;
598 pagesetupMargin.top = 1000;
599 pagesetupMargin.right = 1000;
600 pagesetupMargin.bottom = 1000; }
601 }
602 }
603
604
605 // End of Print.cpp
Something went wrong with that request. Please try again.