first commit
This commit is contained in:
commit
42b7abe4f0
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
obj
|
||||
bin
|
||||
obj
|
||||
bin
|
||||
TestResult.xml
|
||||
*.suo
|
BIN
Lib/PS5UI.DLL
Normal file
BIN
Lib/PS5UI.DLL
Normal file
Binary file not shown.
BIN
Lib/PSCRIPT.HLP
Normal file
BIN
Lib/PSCRIPT.HLP
Normal file
Binary file not shown.
BIN
Lib/PSCRIPT.NTF
Normal file
BIN
Lib/PSCRIPT.NTF
Normal file
Binary file not shown.
BIN
Lib/PSCRIPT5.DLL
Normal file
BIN
Lib/PSCRIPT5.DLL
Normal file
Binary file not shown.
521
Lib/SCPDFPRN.ppd
Normal file
521
Lib/SCPDFPRN.ppd
Normal file
@ -0,0 +1,521 @@
|
||||
*PPD-Adobe: "4.3"
|
||||
*FileVersion: "1.1"
|
||||
*FormatVersion: "4.3"
|
||||
*LanguageEncoding: ISOLatin1
|
||||
*LanguageVersion: English
|
||||
*Manufacturer: "Ghostscript"
|
||||
*ModelName: "Ghostscript PDF Writer"
|
||||
*ShortNickName: "Ghostscript"
|
||||
*NickName: "Ghostscript"
|
||||
*% PCFileName should be of the form XXNNNNNN.PPD where XX is an assigned
|
||||
*% manufacturer code.
|
||||
*PCFileName: "SCPDFPRN.PPD"
|
||||
*Product: "(PDF Scribe)"
|
||||
*PSVersion: "(3010) 815"
|
||||
|
||||
*% *DefaultImageableArea:
|
||||
*% *DefaultPageRegion:
|
||||
*% *PageRegion:
|
||||
*% *ImageableArea:
|
||||
*% *DefaultPageSize:
|
||||
*% *PageSize:
|
||||
*% *DefaultPaperDimension:
|
||||
*% *PaperDimension:
|
||||
|
||||
*% == Above are required
|
||||
|
||||
*% This file was adapted from GHOSTPDF.PPD for PDF Scribe
|
||||
|
||||
*Copyright: "2004-2006 Ghostgum Software Pty Ltd"
|
||||
*%
|
||||
*% Copyright (C) 2004-2006, Ghostgum Software Pty Ltd. All rights reserved.
|
||||
*%
|
||||
*% Permission is hereby granted, free of charge, to any person obtaining
|
||||
*% a copy of this file ("Software"), to deal in the Software without
|
||||
*% restriction, including without limitation the rights to use, copy,
|
||||
*% modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
*% this Software, and to permit persons to whom this file is furnished to
|
||||
*% do so, subject to the following conditions:
|
||||
*%
|
||||
*% This Software is distributed with NO WARRANTY OF ANY KIND. No author
|
||||
*% or distributor accepts any responsibility for the consequences of using it,
|
||||
*% or for whether it serves any particular purpose or works at all, unless he
|
||||
*% or she says so in writing.
|
||||
*%
|
||||
*% The above copyright notice and this permission notice shall be included
|
||||
*% in all copies or substantial portions of the Software.
|
||||
|
||||
*% There is an accompanying file ghostpdf.inf that is used to
|
||||
*% install this PPD on Windows 2k/XP.
|
||||
*% This PPD includes configuration items specific to generating
|
||||
*% PDF files with ghostscript.
|
||||
*% If you are not using the ghostscript pdfwrite device,
|
||||
*% all items in the PDF group should be left as "Default".
|
||||
|
||||
|
||||
*% == Basic Capabilities
|
||||
*LanguageLevel: "3"
|
||||
*ColorDevice: True
|
||||
*DefaultColorSpace: RGB
|
||||
*FileSystem: True
|
||||
*Extensions: CMYK FileSystem Composite
|
||||
*TTRasterizer: Type42
|
||||
*FreeVM: "10000000"
|
||||
*PrintPSErrors: True
|
||||
*ContoneOnly: True
|
||||
*% AccurateScreensSupport: True
|
||||
|
||||
*% order dependency
|
||||
*% 10 HWResolution
|
||||
*% 20 PageSize and other page device parameters
|
||||
*% 30 PDFSETTINGS
|
||||
*% 40 distiller parameters
|
||||
|
||||
*% == Resolution
|
||||
*OpenUI *Resolution: PickOne
|
||||
*DefaultResolution: 600dpi
|
||||
*OrderDependency: 10 AnySetup *Resolution
|
||||
*Resolution 72dpi: "<< /HWResolution [72 72] >> setpagedevice"
|
||||
*Resolution 96dpi: "<< /HWResolution [96 96] >> setpagedevice"
|
||||
*Resolution 144dpi: "<< /HWResolution [144 144] >> setpagedevice"
|
||||
*Resolution 150dpi: "<< /HWResolution [150 150] >> setpagedevice"
|
||||
*Resolution 300dpi: "<< /HWResolution [300 300] >> setpagedevice"
|
||||
*Resolution 600dpi: "<< /HWResolution [600 600] >> setpagedevice"
|
||||
*Resolution 720dpi: "<< /HWResolution [720 720] >> setpagedevice"
|
||||
*Resolution 1200dpi: "<< /HWResolution [1200 1200] >> setpagedevice"
|
||||
*Resolution 2400dpi: "<< /HWResolution [2400 2400] >> setpagedevice"
|
||||
*Resolution 3600dpi: "<< /HWResolution [3600 3600] >> setpagedevice"
|
||||
*Resolution 4000dpi: "<< /HWResolution [4000 4000] >> setpagedevice"
|
||||
*CloseUI: *Resolution
|
||||
|
||||
|
||||
*% == Paper stuff
|
||||
*% Page sizes taken from ghostscript gs_statd.ps.
|
||||
*% Ghostscript pdfwrite ignores Orientation, so set the
|
||||
*% custom page width/height and then use an Install procedure
|
||||
*% to rotate the image.
|
||||
|
||||
*HWMargins: 0 0 0 0
|
||||
*ParamCustomPageSize Width: 1 points 1 5670
|
||||
*ParamCustomPageSize Height: 2 points 1 5670
|
||||
*ParamCustomPageSize WidthOffset/Width Margin: 3 points 0 5670
|
||||
*ParamCustomPageSize HeightOffset/Height Margin: 4 points 0 5670
|
||||
*ParamCustomPageSize Orientation: 5 int 0 3
|
||||
*NonUIOrderDependency: 20 AnySetup *CustomPageSize
|
||||
*CustomPageSize True: "
|
||||
5 -2 roll exch 5 2 roll
|
||||
3 -2 roll exch 3 2 roll
|
||||
[ {}
|
||||
{90 rotate 0 currentpagedevice /PageSize get 0 get neg translate}
|
||||
{180 rotate currentpagedevice /PageSize get
|
||||
dup 0 get neg exch 1 get neg translate}
|
||||
{270 rotate currentpagedevice /PageSize get 1 get neg 0 translate}
|
||||
] exch get
|
||||
4 dict dup begin 6 1 roll
|
||||
/Install exch def
|
||||
2 array astore /PageOffset exch def
|
||||
2 array astore /PageSize exch def
|
||||
/ImagingBBox null def
|
||||
end setpagedevice"
|
||||
*End
|
||||
*MaxMediaWidth: "5670"
|
||||
*MaxMediaHeight: "5670"
|
||||
|
||||
*LandscapeOrientation: Any
|
||||
|
||||
*OpenUI *PageSize: PickOne
|
||||
*DefaultPageSize: Letter
|
||||
*OrderDependency: 20 AnySetup *PageSize
|
||||
*PageSize Tabloid: "<< /PageSize [792 1224] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize Ledger: "<< /PageSize [1224 792] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize Legal: "<< /PageSize [612 1008] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize Letter: "<< /PageSize [612 792] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize LetterSmall: "<< /PageSize [612 792] /ImagingBBox [25 25 587 767] >> setpagedevice"
|
||||
*PageSize Statement: "<< /PageSize [396 612] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize Note: "<< /PageSize [612 792] /ImagingBBox [25 25 587 767] >> setpagedevice"
|
||||
*PageSize A0: "<< /PageSize [2384 3370] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A1: "<< /PageSize [1684 2384] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A2: "<< /PageSize [1191 1684] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A3: "<< /PageSize [842 1191] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A4: "<< /PageSize [595 842] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A4Small: "<< /PageSize [595 842] /ImagingBBox [25 25 570 817] >> setpagedevice"
|
||||
*PageSize A5: "<< /PageSize [420 595] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A6: "<< /PageSize [297 420] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A7: "<< /PageSize [210 297] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A8: "<< /PageSize [148 210] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A9: "<< /PageSize [105 148] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A10: "<< /PageSize [73 105] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ISOB0/ISO B0: "<< /PageSize [2835 4008] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ISOB1/ISO B1: "<< /PageSize [2004 2835] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ISOB2/ISO B2: "<< /PageSize [1417 2004] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ISOB3/ISO B3: "<< /PageSize [1001 1417] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ISOB4/ISO B4: "<< /PageSize [709 1001] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ISOB5/ISO B5: "<< /PageSize [499 709] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ISOB6/ISO B6: "<< /PageSize [354 499] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize B0/JIS B0: "<< /PageSize [2920 4127] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize B1/JIS B1: "<< /PageSize [2064 2920] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize B2/JIS B2: "<< /PageSize [1460 2064] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize B3/JIS B3: "<< /PageSize [1032 1460] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize B4/JIS B4: "<< /PageSize [729 1032] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize B5/JIS B5: "<< /PageSize [516 729] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize B6/JIS B6: "<< /PageSize [363 516] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize EnvC0/Envelope C0: "<< /PageSize [2599 3677] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize EnvC1/Envelope C1: "<< /PageSize [1837 2599] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize EnvC2/Envelope C2: "<< /PageSize [1296 1837] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize EnvC3/Envelope C3: "<< /PageSize [918 1296] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize EnvC4/Envelope C4: "<< /PageSize [649 918] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize EnvC5/Envelope C5: "<< /PageSize [459 649] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize EnvC6/Envelope C6: "<< /PageSize [323 459] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ARCHE: "<< /PageSize [2592 3456] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ARCHD: "<< /PageSize [1728 2592] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ARCHC: "<< /PageSize [1296 1728] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ARCHB: "<< /PageSize [864 1296] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize ARCHA: "<< /PageSize [648 864] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize FLSA: "<< /PageSize [612 936] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize FLSE: "<< /PageSize [612 936] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize PA4: "<< /PageSize [595 792] /ImagingBBox null >> setpagedevice"
|
||||
*CloseUI: *PageSize
|
||||
|
||||
*OpenUI *PageRegion: PickOne
|
||||
*DefaultPageRegion: Letter
|
||||
*OrderDependency: 20 AnySetup *PageRegion
|
||||
*PageRegion Tabloid: "<< /PageSize [792 1224] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion Ledger: "<< /PageSize [1224 792] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion Legal: "<< /PageSize [612 1008] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion Letter: "<< /PageSize [612 792] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion LetterSmall: "<< /PageSize [612 792] /ImagingBBox [25 25 587 767] >> setpagedevice"
|
||||
*PageRegion Note: "<< /PageSize [612 792] /ImagingBBox [25 25 587 767] >> setpagedevice"
|
||||
*PageRegion Statement: "<< /PageSize [396 612] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A0: "<< /PageSize [2384 3370] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A1: "<< /PageSize [1684 2384] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A2: "<< /PageSize [1191 1684] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A3: "<< /PageSize [842 1191] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A4: "<< /PageSize [595 842] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A4Small: "<< /PageSize [595 842] /ImagingBBox [25 25 570 817] >> setpagedevice"
|
||||
*PageRegion A5: "<< /PageSize [420 595] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A6: "<< /PageSize [297 420] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A7: "<< /PageSize [210 297] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A8: "<< /PageSize [148 210] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A9: "<< /PageSize [105 148] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A10: "<< /PageSize [73 105] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ISOB0/ISO B0: "<< /PageSize [2835 4008] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ISOB1/ISO B1: "<< /PageSize [2004 2835] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ISOB2/ISO B2: "<< /PageSize [1417 2004] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ISOB3/ISO B3: "<< /PageSize [1001 1417] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ISOB4/ISO B4: "<< /PageSize [709 1001] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ISOB5/ISO B5: "<< /PageSize [499 709] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ISOB6/ISO B6: "<< /PageSize [354 499] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion B0/JIS B0: "<< /PageSize [2920 4127] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion B1/JIS B1: "<< /PageSize [2064 2920] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion B2/JIS B2: "<< /PageSize [1460 2064] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion B3/JIS B3: "<< /PageSize [1032 1460] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion B4/JIS B4: "<< /PageSize [729 1032] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion B5/JIS B5: "<< /PageSize [516 729] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion B6/JIS B6: "<< /PageSize [363 516] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion EnvC0/Envelope C0: "<< /PageSize [2599 3677] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion EnvC1/Envelope C1: "<< /PageSize [1837 2599] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion EnvC2/Envelope C2: "<< /PageSize [1296 1837] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion EnvC3/Envelope C3: "<< /PageSize [918 1296] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion EnvC4/Envelope C4: "<< /PageSize [649 918] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion EnvC5/Envelope C5: "<< /PageSize [459 649] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion EnvC6/Envelope C6: "<< /PageSize [323 459] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ARCHE: "<< /PageSize [2592 3456] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ARCHD: "<< /PageSize [1728 2592] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ARCHC: "<< /PageSize [1296 1728] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ARCHB: "<< /PageSize [864 1296] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion ARCHA: "<< /PageSize [648 864] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion FLSA: "<< /PageSize [612 936] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion FLSE: "<< /PageSize [612 936] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion PA4: "<< /PageSize [595 792] /ImagingBBox null >> setpagedevice"
|
||||
*CloseUI: *PageRegion
|
||||
|
||||
*DefaultImageableArea: Letter
|
||||
*ImageableArea Tabloid: "0 0 792 1224"
|
||||
*ImageableArea Ledger: "0 0 1224 792"
|
||||
*ImageableArea Legal: "0 0 612 1008"
|
||||
*ImageableArea Letter: "0 0 612 792"
|
||||
*ImageableArea LetterSmall: "25 25 587 767"
|
||||
*ImageableArea Note: "25 25 587 767"
|
||||
*ImageableArea Statement: "0 0 396 612"
|
||||
*ImageableArea A0: "0 0 2384 3370"
|
||||
*ImageableArea A1: "0 0 1684 2384"
|
||||
*ImageableArea A2: "0 0 1191 1684"
|
||||
*ImageableArea A3: "0 0 842 1191"
|
||||
*ImageableArea A4: "0 0 595 842"
|
||||
*ImageableArea A4Small: "25 25 570 817"
|
||||
*ImageableArea A5: "0 0 420 595"
|
||||
*ImageableArea A6: "0 0 297 420"
|
||||
*ImageableArea A7: "0 0 210 297"
|
||||
*ImageableArea A8: "0 0 148 210"
|
||||
*ImageableArea A9: "0 0 105 148"
|
||||
*ImageableArea A10: "0 0 73 105"
|
||||
*ImageableArea ISOB0/ISO B0: "0 0 2835 4008"
|
||||
*ImageableArea ISOB1/ISO B1: "0 0 2004 2835"
|
||||
*ImageableArea ISOB2/ISO B2: "0 0 1417 2004"
|
||||
*ImageableArea ISOB3/ISO B3: "0 0 1001 1417"
|
||||
*ImageableArea ISOB4/ISO B4: "0 0 709 1001"
|
||||
*ImageableArea ISOB5/ISO B5: "0 0 499 709"
|
||||
*ImageableArea ISOB6/ISO B6: "0 0 354 499"
|
||||
*ImageableArea B0/JIS B0: "0 0 2920 4127"
|
||||
*ImageableArea B1/JIS B1: "0 0 2064 2920"
|
||||
*ImageableArea B2/JIS B2: "0 0 1460 2064"
|
||||
*ImageableArea B3/JIS B3: "0 0 1032 1460"
|
||||
*ImageableArea B4/JIS B4: "0 0 729 1032"
|
||||
*ImageableArea B5/JIS B5: "0 0 516 729"
|
||||
*ImageableArea B6/JIS B6: "0 0 363 516"
|
||||
*ImageableArea EnvC0/Envelope C0: "0 0 2599 3677"
|
||||
*ImageableArea EnvC1/Envelope C1: "0 0 1837 2599"
|
||||
*ImageableArea EnvC2/Envelope C2: "0 0 1296 1837"
|
||||
*ImageableArea EnvC3/Envelope C3: "0 0 918 1296"
|
||||
*ImageableArea EnvC4/Envelope C4: "0 0 649 918"
|
||||
*ImageableArea EnvC5/Envelope C5: "0 0 459 649"
|
||||
*ImageableArea EnvC6/Envelope C6: "0 0 323 459"
|
||||
*ImageableArea ARCHE: "0 0 2592 3456"
|
||||
*ImageableArea ARCHD: "0 0 1728 2592"
|
||||
*ImageableArea ARCHC: "0 0 1296 1728"
|
||||
*ImageableArea ARCHB: "0 0 864 1296"
|
||||
*ImageableArea ARCHA: "0 0 648 864"
|
||||
*ImageableArea FLSA: "0 0 612 936"
|
||||
*ImageableArea FLSE: "0 0 612 936"
|
||||
*ImageableArea PA4: "0 0 595 792"
|
||||
|
||||
*DefaultPaperDimension: Letter
|
||||
*PaperDimension Tabloid: "792 1224"
|
||||
*PaperDimension Ledger: "1224 792"
|
||||
*PaperDimension Legal: "612 1008"
|
||||
*PaperDimension Letter: "612 792"
|
||||
*PaperDimension LetterSmall: "612 792"
|
||||
*PaperDimension Note: "612 792"
|
||||
*PaperDimension Statement: "396 612"
|
||||
*PaperDimension A0: "2384 3370"
|
||||
*PaperDimension A1: "1684 2384"
|
||||
*PaperDimension A2: "1191 1684"
|
||||
*PaperDimension A3: "842 1191"
|
||||
*PaperDimension A4: "595 842"
|
||||
*PaperDimension A4Small: "595 842"
|
||||
*PaperDimension A5: "420 595"
|
||||
*PaperDimension A6: "297 420"
|
||||
*PaperDimension A7: "210 297"
|
||||
*PaperDimension A8: "148 210"
|
||||
*PaperDimension A9: "105 148"
|
||||
*PaperDimension A10: "73 105"
|
||||
*PaperDimension ISOB0/ISO B0: "2835 4008"
|
||||
*PaperDimension ISOB1/ISO B1: "2004 2835"
|
||||
*PaperDimension ISOB2/ISO B2: "1417 2004"
|
||||
*PaperDimension ISOB3/ISO B3: "1001 1417"
|
||||
*PaperDimension ISOB4/ISO B4: "709 1001"
|
||||
*PaperDimension ISOB5/ISO B5: "499 709"
|
||||
*PaperDimension ISOB6/ISO B6: "354 499"
|
||||
*PaperDimension B0/JIS B0: "2920 4127"
|
||||
*PaperDimension B1/JIS B1: "2064 2920"
|
||||
*PaperDimension B2/JIS B2: "1460 2064"
|
||||
*PaperDimension B3/JIS B3: "1032 1460"
|
||||
*PaperDimension B4/JIS B4: "729 1032"
|
||||
*PaperDimension B5/JIS B5: "516 729"
|
||||
*PaperDimension B6/JIS B6: "363 516"
|
||||
*PaperDimension EnvC0/Envelope C0: "2599 3677"
|
||||
*PaperDimension EnvC1/Envelope C1: "1837 2599"
|
||||
*PaperDimension EnvC2/Envelope C2: "1296 1837"
|
||||
*PaperDimension EnvC3/Envelope C3: "918 1296"
|
||||
*PaperDimension EnvC4/Envelope C4: "649 918"
|
||||
*PaperDimension EnvC5/Envelope C5: "459 649"
|
||||
*PaperDimension EnvC6/Envelope C6: "323 459"
|
||||
*PaperDimension ARCHE: "2592 3456"
|
||||
*PaperDimension ARCHD: "1728 2592"
|
||||
*PaperDimension ARCHC: "1296 1728"
|
||||
*PaperDimension ARCHB: "864 1296"
|
||||
*PaperDimension ARCHA: "648 864"
|
||||
*PaperDimension FLSA: "612 936"
|
||||
*PaperDimension FLSE: "612 936"
|
||||
*PaperDimension PA4: "595 792"
|
||||
|
||||
|
||||
*% == Fonts
|
||||
*DefaultFont: Courier
|
||||
*% First the standard 35 aliases with the actual fonts commented out.
|
||||
*Font Bookman-Demi: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWBookmanL-DemiBold: Standard "(1.05)" Standard ROM
|
||||
*Font Bookman-DemiItalic: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWBookmanL-DemiBoldItal: Standard "(1.05)" Standard ROM
|
||||
*Font Bookman-Light: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWBookmanL-Ligh: Standard "(1.05)" Standard ROM
|
||||
*Font Bookman-LightItalic: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWBookmanL-LighItal: Standard "(1.05)" Standard ROM
|
||||
*Font Courier: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusMonL-Regu: Standard "(1.05)" Standard ROM
|
||||
*Font Courier-Oblique: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusMonL-ReguObli: Standard "(1.05)" Standard ROM
|
||||
*Font Courier-Bold: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusMonL-Bold: Standard "(1.05)" Standard ROM
|
||||
*Font Courier-BoldOblique: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusMonL-BoldObli: Standard "(1.05)" Standard ROM
|
||||
*Font AvantGarde-Book: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWGothicL-Book: Standard "(1.05)" Standard ROM
|
||||
*Font AvantGarde-BookOblique: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWGothicL-BookObli: Standard "(1.05)" Standard ROM
|
||||
*Font AvantGarde-Demi: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWGothicL-Demi: Standard "(1.05)" Standard ROM
|
||||
*Font AvantGarde-DemiOblique: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWGothicL-DemiObli: Standard "(1.05)" Standard ROM
|
||||
*Font Helvetica: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusSanL-Regu: Standard "(1.05)" Standard ROM
|
||||
*Font Helvetica-Oblique: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusSanL-ReguItal: Standard "(1.05)" Standard ROM
|
||||
*Font Helvetica-Bold: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusSanL-Bold: Standard "(1.05)" Standard ROM
|
||||
*Font Helvetica-BoldOblique: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusSanL-BoldItal: Standard "(1.05)" Standard ROM
|
||||
*Font Helvetica-Narrow: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusSanL-ReguCond: Standard "(1.05)" Standard ROM
|
||||
*Font Helvetica-Narrow-Oblique: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusSanL-ReguCondItal: Standard "(1.05)" Standard ROM
|
||||
*Font Helvetica-Narrow-Bold: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusSanL-BoldCond: Standard "(1.05)" Standard ROM
|
||||
*Font Helvetica-Narrow-BoldOblique: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusSanL-BoldCondItal: Standard "(1.05)" Standard ROM
|
||||
*Font Palatino-Roman: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWPalladioL-Roma: Standard "(1.05)" Standard ROM
|
||||
*Font Palatino-Italic: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWPalladioL-Ital: Standard "(1.05)" Standard ROM
|
||||
*Font Palatino-Bold: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWPalladioL-Bold: Standard "(1.05)" Standard ROM
|
||||
*Font Palatino-BoldItalic: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWPalladioL-BoldItal: Standard "(1.05)" Standard ROM
|
||||
*Font NewCenturySchlbk-Roman: Standard "(1.05)" Standard ROM
|
||||
*% *Font CenturySchL-Roma: Standard "(1.05)" Standard ROM
|
||||
*Font NewCenturySchlbk-Italic: Standard "(1.05)" Standard ROM
|
||||
*% *Font CenturySchL-Ital: Standard "(1.05)" Standard ROM
|
||||
*Font NewCenturySchlbk-Bold: Standard "(1.05)" Standard ROM
|
||||
*% *Font CenturySchL-Bold: Standard "(1.05)" Standard ROM
|
||||
*Font NewCenturySchlbk-BoldItalic: Standard "(1.05)" Standard ROM
|
||||
*% *Font CenturySchL-BoldItal: Standard "(1.05)" Standard ROM
|
||||
*Font Times-Roman: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusRomNo9L-Regu: Standard "(1.05)" Standard ROM
|
||||
*Font Times-Italic: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusRomNo9L-ReguItal: Standard "(1.05)" Standard ROM
|
||||
*Font Times-Bold: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusRomNo9L-Medi: Standard "(1.05)" Standard ROM
|
||||
*Font Times-BoldItalic: Standard "(1.05)" Standard ROM
|
||||
*% *Font NimbusRomNo9L-MediItal: Standard "(1.05)" Standard ROM
|
||||
*Font Symbol: Special "(001.005)" Special ROM
|
||||
*% *Font StandardSymL: Special (001.005)" Special ROM
|
||||
*Font ZapfChancery-MediumItalic: Standard "(1.05)" Standard ROM
|
||||
*% *Font URWChanceryL-MediItal: Standard "(1.05)" Standard ROM
|
||||
*Font ZapfDingbats: Special (001.005)" Special ROM
|
||||
*% *Font Dingbats: Special (001.005)" Special ROM
|
||||
*% Then a few ghostscript extras
|
||||
*Font Charter-Roman: Standard "(2.0-1.0)" Standard ROM
|
||||
*Font CharterBT-Roman: Standard "(2.0-1.0)" Standard ROM
|
||||
*Font Charter-Italic: Standard "(2.0-1.0)" Standard ROM
|
||||
*Font CharterBT-Italic: Standard "(2.0-1.0)" Standard ROM
|
||||
*Font Charter-Bold: Standard "(2.0-1.0)" Standard ROM
|
||||
*Font CharterBT-Bold: Standard "(2.0-1.0)" Standard ROM
|
||||
*Font Charter-BoldItalic: Standard "(2.0-1.0)" Standard ROM
|
||||
*Font CharterBT-BoldItalic: Standard "(2.0-1.0)" Standard ROM
|
||||
*Font Utopia-Regular: Standard "(001.001)" Standard ROM
|
||||
*Font Utopia-Italic: Standard "(001.001)" Standard ROM
|
||||
*Font Utopia-Bold: Standard "(001.001)" Standard ROM
|
||||
*Font Utopia-BoldItalic: Standard "(001.001)" Standard ROM
|
||||
|
||||
*% == Most of these set distiller parameters
|
||||
*% If the target device is not the Ghostscript pdfwrite device,
|
||||
*% then these should all be left at "Default"
|
||||
*OpenGroup: PDF
|
||||
|
||||
*% == The pdfwrite device can select different color spaces
|
||||
*OpenUI *ColorModel/PDF Colour Model: PickOne
|
||||
*DefaultColorModel: Default
|
||||
*OrderDependency: 20 AnySetup *ColorModel
|
||||
*ColorModel Default: ""
|
||||
*ColorModel Grey: "<< /ProcessColorModel /DeviceGray >> setpagedevice"
|
||||
*ColorModel RGB: "<< /ProcessColorModel /DeviceRGB >> setpagedevice"
|
||||
*ColorModel CMYK: "<< /ProcessColorModel /DeviceCMYK >> setpagedevice"
|
||||
*CloseUI: *ColorModel
|
||||
|
||||
*OpenUI *PDFSettings/PDF Settings: PickOne
|
||||
*DefaultPDFSettings: Default
|
||||
*OrderDependency: 30 AnySetup *PDFSettings
|
||||
*PDFSettings Default: ""
|
||||
*PDFSettings Screen: ".distillersettings /screen get setdistillerparams"
|
||||
*PDFSettings Ebook: ".distillersettings /ebook get setdistillerparams"
|
||||
*PDFSettings Printer: ".distillersettings /printer get setdistillerparams"
|
||||
*PDFSettings Prepress: ".distillersettings /prepress get setdistillerparams"
|
||||
*CloseUI: *PDFSettings
|
||||
|
||||
*OpenUI *ColorImageFilter/PDF Colour Image Compression: PickOne
|
||||
*DefaultColorImageFilter: Default
|
||||
*OrderDependency: 40 AnySetup *ColorImageFilter
|
||||
*ColorImageFilter Default: ""
|
||||
*ColorImageFilter JPEG: "<< /AutoFilterColorImages false /ColorImageFilter /DCTEncode >> setdistillerparams"
|
||||
*ColorImageFilter Flate: "<< /AutoFilterColorImages false /ColorImageFilter /FlateEncode >> setdistillerparams"
|
||||
*CloseUI: *ColorImageFilter
|
||||
|
||||
*OpenUI *GrayImageFilter/PDF Grey Image Compression: PickOne
|
||||
*DefaultGrayImageFilter: Default
|
||||
*OrderDependency: 40 AnySetup *GrayImageFilter
|
||||
*GrayImageFilter Default: ""
|
||||
*GrayImageFilter JPEG: "<< /AutoFilterGrayImages false /GrayImageFilter /DCTEncode >> setdistillerparams"
|
||||
*GrayImageFilter Flate: "<< /AutoFilterGrayImages false /GrayImageFilter /FlateEncode >> setdistillerparams"
|
||||
*CloseUI: *GrayImageFilter
|
||||
|
||||
*OpenUI *MonoImageFilter/PDF Monochrome Image Compression: PickOne
|
||||
*DefaultMonoImageFilter: Default
|
||||
*OrderDependency: 40 AnySetup *MonoImageFilter
|
||||
*MonoImageFilter Default: ""
|
||||
*MonoImageFilter FaxG3/Fax G3: "<< /AutoFilterMonoImages false /MonoImageFilter /CCITTFaxEncode >> setdistillerparams"
|
||||
*MonoImageFilter Flate: "<< /AutoFilterMonoImages false /MonoImageFilter /FlateEncode >> setdistillerparams"
|
||||
*CloseUI: *MonoImageFilter
|
||||
|
||||
*OpenUI *CompatibilityLevel/PDF Compatibility: PickOne
|
||||
*DefaultCompatibilityLevel: Default
|
||||
*OrderDependency: 40 AnySetup *CompatibilityLevel
|
||||
*CompatibilityLevel Default: ""
|
||||
*CompatibilityLevel 1.2: "<< /CompatibilityLevel 1.2 >> setdistillerparams"
|
||||
*CompatibilityLevel 1.3: "<< /CompatibilityLevel 1.3 >> setdistillerparams"
|
||||
*CompatibilityLevel 1.4: "<< /CompatibilityLevel 1.4 >> setdistillerparams"
|
||||
*CloseUI: *CompatibilityLevel
|
||||
|
||||
*OpenUI *AutoRotatePages/PDF AutoRotatePages: PickOne
|
||||
*DefaultAutoRotatePages: Default
|
||||
*OrderDependency: 40 AnySetup *AutoRotatePages
|
||||
*AutoRotatePages Default: ""
|
||||
*AutoRotatePages None: "<< /AutoRotatePages /None >> setdistillerparams"
|
||||
*AutoRotatePages PageByPage: "<< /AutoRotatePages /PageByPage >> setdistillerparams"
|
||||
*AutoRotatePages All: "<< /AutoRotatePages /All >> setdistillerparams"
|
||||
*CloseUI: *AutoRotatePages
|
||||
|
||||
*OpenUI *ParseDSCComments/PDF ParseDSCComments: PickOne
|
||||
*DefaultParseDSCComments: Default
|
||||
*OrderDependency: 40 AnySetup *ParseDSCComments
|
||||
*ParseDSCComments Default: ""
|
||||
*ParseDSCComments True: "<< /ParseDSCComments true >> setdistillerparams"
|
||||
*ParseDSCComments False: "<< /ParseDSCComments false >> setdistillerparams"
|
||||
*CloseUI: *ParseDSCComments
|
||||
|
||||
*OpenUI *EmbedAllFonts/PDF EmbedAllFonts: PickOne
|
||||
*DefaultEmbedAllFonts: Default
|
||||
*OrderDependency: 40 AnySetup *EmbedAllFonts
|
||||
*EmbedAllFonts Default: ""
|
||||
*EmbedAllFonts True: "<< /EmbedAllFonts true >> setdistillerparams"
|
||||
*EmbedAllFonts False: "<< /EmbedAllFonts false >> setdistillerparams"
|
||||
*CloseUI: *EmbedAllFonts
|
||||
|
||||
*OpenUI *SubsetFonts/PDF SubsetFonts: PickOne
|
||||
*DefaultSubsetFonts: Default
|
||||
*OrderDependency: 40 AnySetup *SubsetFonts
|
||||
*SubsetFonts Default: ""
|
||||
*SubsetFonts True: "<< /SubsetFonts true >> setdistillerparams"
|
||||
*SubsetFonts False: "<< /SubsetFonts false >> setdistillerparams"
|
||||
*CloseUI: *SubsetFonts
|
||||
|
||||
*OpenUI *CompressPages/PDF Compress Pages: PickOne
|
||||
*DefaultCompressPages: Default
|
||||
*OrderDependency: 40 AnySetup *CompressPages
|
||||
*CompressPages Default: ""
|
||||
*CompressPages True: "<< /CompressPages true >> setdistillerparams"
|
||||
*CompressPages False: "<< /CompressPages false >> setdistillerparams"
|
||||
*CloseUI: *CompressPages
|
||||
|
||||
*CloseGroup: PDF
|
||||
|
||||
*% End of Ghostscript PDF Writer PPD file
|
BIN
Lib/nunit-console-runner.dll
Normal file
BIN
Lib/nunit-console-runner.dll
Normal file
Binary file not shown.
BIN
Lib/nunit.core.dll
Normal file
BIN
Lib/nunit.core.dll
Normal file
Binary file not shown.
BIN
Lib/nunit.core.interfaces.dll
Normal file
BIN
Lib/nunit.core.interfaces.dll
Normal file
Binary file not shown.
BIN
Lib/nunit.framework.dll
Normal file
BIN
Lib/nunit.framework.dll
Normal file
Binary file not shown.
BIN
Lib/nunit.util.dll
Normal file
BIN
Lib/nunit.util.dll
Normal file
Binary file not shown.
BIN
Lib/redmon64.dll
Normal file
BIN
Lib/redmon64.dll
Normal file
Binary file not shown.
35
PdfScribe.sln
Normal file
35
PdfScribe.sln
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C# Express 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PdfScribe", "PdfScribe\PdfScribe.csproj", "{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PdfScribeUnitTests", "PdfScribeUnitTests\PdfScribeUnitTests.csproj", "{D387573C-D122-461C-B525-1545DBDB4FBA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x64.Build.0 = Debug|x64
|
||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x86.Build.0 = Debug|x86
|
||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x64.ActiveCfg = Release|x64
|
||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x64.Build.0 = Release|x64
|
||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x86.ActiveCfg = Release|x86
|
||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x86.Build.0 = Release|x86
|
||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x64.ActiveCfg = Debug|x86
|
||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x64.Build.0 = Debug|x86
|
||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x86.Build.0 = Debug|x86
|
||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Release|x64.ActiveCfg = Release|x86
|
||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Release|x86.ActiveCfg = Release|x86
|
||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
181
PdfScribe/NativeMethods.cs
Normal file
181
PdfScribe/NativeMethods.cs
Normal file
@ -0,0 +1,181 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace PdfScribe
|
||||
{
|
||||
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public struct MONITOR_INFO_2
|
||||
{
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pName;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pEnvironment;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pDLLName;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public struct FILETIME
|
||||
{
|
||||
public UInt32 dwLowDateTime;
|
||||
public UInt32 dwHighDateTime;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public struct DRIVER_INFO_6
|
||||
{
|
||||
public UInt32 cVersion;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pName;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pEnvironment;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pDriverPath;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pDataFile;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pConfigFile;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pHelpFile;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pDependentFiles;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pMonitorName;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pDefaultDataType;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pszzPreviousNames;
|
||||
public FILETIME ftDriverDate;
|
||||
public UInt64 dwlDriverVersion;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pszMfgName;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pszOEMUrl;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pszHardwareID;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pszProvider;
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class PRINTER_DEFAULTS
|
||||
{
|
||||
public string pDatatype;
|
||||
public IntPtr pDevMode;
|
||||
public int DesiredAccess;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public struct PRINTER_INFO_2
|
||||
{
|
||||
public string pServerName;
|
||||
public string pPrinterName;
|
||||
public string pShareName;
|
||||
public string pPortName;
|
||||
public string pDriverName;
|
||||
public string pComment;
|
||||
public string pLocation;
|
||||
public IntPtr pDevMode;
|
||||
public string pSepFile;
|
||||
public string pPrintProcessor;
|
||||
public string pDatatype;
|
||||
public string pParameters;
|
||||
public IntPtr pSecurityDescriptor;
|
||||
public uint Attributes;
|
||||
public uint Priority;
|
||||
public uint DefaultPriority;
|
||||
public uint StartTime;
|
||||
public uint UntilTime;
|
||||
public uint Status;
|
||||
public uint cJobs;
|
||||
public uint AveragePPM;
|
||||
}
|
||||
|
||||
public static class NativeMethods
|
||||
{
|
||||
[DllImport("winspool.drv", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern bool EnumMonitors(string pName, uint level, IntPtr pMonitors, uint cbBuf, ref uint pcbNeeded, ref uint pcReturned);
|
||||
|
||||
[DllImport("winspool.drv", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
public static extern Int32 AddMonitor(String pName, UInt32 Level, ref MONITOR_INFO_2 pMonitors);
|
||||
|
||||
[DllImport("winspool.drv", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
public static extern Int32 DeleteMonitor(String pName, String pEnvironment, String pMonitorName);
|
||||
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern bool Wow64DisableWow64FsRedirection(ref IntPtr ptr);
|
||||
|
||||
|
||||
[DllImport("winspool.drv", EntryPoint = "XcvDataW", SetLastError = true)]
|
||||
public static extern bool XcvData(IntPtr hXcv,
|
||||
[MarshalAs(UnmanagedType.LPWStr)] string pszDataName,
|
||||
IntPtr pInputData,
|
||||
uint cbInputData,
|
||||
IntPtr pOutputData,
|
||||
uint cbOutputData,
|
||||
out uint pcbOutputNeeded,
|
||||
out uint pwdStatus);
|
||||
|
||||
|
||||
|
||||
[DllImport("winspool.drv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
|
||||
public static extern int AddPrinter(string pName, uint Level, [In] ref PRINTER_INFO_2 pPrinter);
|
||||
|
||||
[DllImport("winspool.drv", EntryPoint = "OpenPrinterA", SetLastError = true)]
|
||||
public static extern int OpenPrinter(
|
||||
string pPrinterName,
|
||||
ref IntPtr phPrinter,
|
||||
PRINTER_DEFAULTS pDefault);
|
||||
|
||||
[DllImport("winspool.drv", SetLastError = true)]
|
||||
public static extern int ClosePrinter(IntPtr hPrinter);
|
||||
|
||||
[DllImport("winspool.drv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
|
||||
public static extern bool DeletePrinter(IntPtr hPrinter);
|
||||
|
||||
|
||||
[DllImport("winspool.drv", EntryPoint="AddPrinterDriver", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern bool AddPrinterDriver(String pName,
|
||||
int Level,
|
||||
ref DRIVER_INFO_6 pDriverInfo);
|
||||
|
||||
[DllImport("winspool.drv")]
|
||||
public static extern bool GetPrinterDriverDirectory(StringBuilder pName,
|
||||
StringBuilder pEnv,
|
||||
int Level,
|
||||
[Out] StringBuilder outPath,
|
||||
int bufferSize,
|
||||
ref int Bytes);
|
||||
|
||||
public static IntPtr DisableWow64Redirection()
|
||||
{
|
||||
IntPtr oldValue = IntPtr.Zero;
|
||||
if (Environment.Is64BitOperatingSystem && !Environment.Is64BitProcess)
|
||||
if (!NativeMethods.Wow64DisableWow64FsRedirection(ref oldValue))
|
||||
throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not disable Wow64 file system redirection.");
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern bool Wow64RevertWow64FsRedirection(IntPtr ptr);
|
||||
|
||||
public static void RevertWow64Redirection(IntPtr oldValue)
|
||||
{
|
||||
if (Environment.Is64BitOperatingSystem && !Environment.Is64BitProcess)
|
||||
{
|
||||
if (!NativeMethods.Wow64RevertWow64FsRedirection(oldValue))
|
||||
{
|
||||
throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not reenable Wow64 file system redirection.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
111
PdfScribe/PdfScribe.csproj
Normal file
111
PdfScribe/PdfScribe.csproj
Normal file
@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PdfScribe</RootNamespace>
|
||||
<AssemblyName>PdfScribe</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="PdfScribeInstaller.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="NativeMethods.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.manifest">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
406
PdfScribe/PdfScribeInstaller.cs
Normal file
406
PdfScribe/PdfScribeInstaller.cs
Normal file
@ -0,0 +1,406 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PdfScribe
|
||||
{
|
||||
public class PdfScribeInstaller
|
||||
{
|
||||
|
||||
const string ENVIRONMENT_64 = "Windows x64";
|
||||
const string PRINTERNAME = "PDF Scribe";
|
||||
const string DRIVERNAME = "PDF Scribe Virtual Printer";
|
||||
const string HARDWAREID = "PDFScribe_Driver0101";
|
||||
const string PORTMONITOR = "PDFSCRIBE";
|
||||
const string MONITORDLL = "redmon64.dll";
|
||||
const string PORTNAME = "PSCRIBE:";
|
||||
const string PRINTPROCESOR = "winprint";
|
||||
|
||||
const string DRIVERMANUFACTURER = "S T Chan";
|
||||
|
||||
const string DRIVERFILE = "PSCRIPT5.DLL";
|
||||
const int DRIVERFILE_INDEX = 0;
|
||||
const string DRIVERUIFILE = "PS5UI.DLL";
|
||||
const int DRIVERUIFILE_INDEX = 1;
|
||||
const string DRIVERHELPFILE = "PSCRIPT.HLP";
|
||||
const int DRIVERHELPFILE_INDEX = 2;
|
||||
const string DRIVERDATAFILE = "SCPDFPRN.PPD";
|
||||
const int DRIVERDATAFILE_INDEX = 3;
|
||||
|
||||
|
||||
#region Port operations
|
||||
private int AddPdfScribePort(string portName)
|
||||
{
|
||||
return DoXcvDataPortOperation(portName, "AddPort");
|
||||
}
|
||||
|
||||
public void DeletePdfScribePort(string portName)
|
||||
{
|
||||
DoXcvDataPortOperation(portName, "DeletePort");
|
||||
}
|
||||
|
||||
private int DoXcvDataPortOperation(string portName, string xcvDataOperation)
|
||||
{
|
||||
|
||||
int win32ErrorCode;
|
||||
|
||||
PRINTER_DEFAULTS def = new PRINTER_DEFAULTS();
|
||||
|
||||
def.pDatatype = null;
|
||||
def.pDevMode = IntPtr.Zero;
|
||||
def.DesiredAccess = 1; //Server Access Administer
|
||||
|
||||
IntPtr hPrinter = IntPtr.Zero;
|
||||
|
||||
if (NativeMethods.OpenPrinter(",XcvMonitor " + PORTMONITOR, ref hPrinter, def) != 0)
|
||||
{
|
||||
if (!portName.EndsWith("\0"))
|
||||
portName += "\0"; // Must be a null terminated string
|
||||
|
||||
// Must get the size in bytes. Rememeber .NET strings are formed by 2-byte characters
|
||||
uint size = (uint)(portName.Length * 2);
|
||||
|
||||
// Alloc memory in HGlobal to set the portName
|
||||
IntPtr portPtr = Marshal.AllocHGlobal((int)size);
|
||||
Marshal.Copy(portName.ToCharArray(), 0, portPtr, portName.Length);
|
||||
|
||||
uint needed; // Not that needed in fact...
|
||||
uint xcvResult; // Will receive de result here
|
||||
|
||||
NativeMethods.XcvData(hPrinter, xcvDataOperation, portPtr, size, IntPtr.Zero, 0, out needed, out xcvResult);
|
||||
|
||||
NativeMethods.ClosePrinter(hPrinter);
|
||||
Marshal.FreeHGlobal(portPtr);
|
||||
win32ErrorCode = (int)xcvResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
win32ErrorCode = Marshal.GetLastWin32Error();
|
||||
}
|
||||
return win32ErrorCode;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Port Monitor
|
||||
|
||||
public bool AddPdfScribePortMonitor(String monitorName,
|
||||
String monitorFile,
|
||||
String monitorPath)
|
||||
{
|
||||
bool monitorAdded = false;
|
||||
|
||||
IntPtr oldRedirectValue = IntPtr.Zero;
|
||||
|
||||
try
|
||||
{
|
||||
oldRedirectValue = NativeMethods.DisableWow64Redirection();
|
||||
if (!DoesMonitorExist(monitorName))
|
||||
{
|
||||
// Copy the monitor DLL to
|
||||
// the system directory
|
||||
String fileSourcePath = Path.Combine(monitorPath, monitorFile);
|
||||
String fileDestinationPath = Path.Combine(Environment.SystemDirectory, monitorFile);
|
||||
File.Copy(fileSourcePath, fileDestinationPath, true);
|
||||
MONITOR_INFO_2 newMonitor = new MONITOR_INFO_2();
|
||||
newMonitor.pName = monitorName;
|
||||
newMonitor.pEnvironment = ENVIRONMENT_64;
|
||||
newMonitor.pDLLName = monitorFile;
|
||||
if (!AddPortMonitor(newMonitor))
|
||||
throw new Win32Exception(Marshal.GetLastWin32Error(), String.Format("Could not add port monitor {0}", monitorName));
|
||||
else
|
||||
monitorAdded = true;
|
||||
}
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
/*
|
||||
// Remove the monitor dll if copied
|
||||
try
|
||||
{
|
||||
File.Delete(Path.Combine(Environment.SystemDirectory, monitorFile));
|
||||
}
|
||||
catch { }
|
||||
*/
|
||||
if (oldRedirectValue != IntPtr.Zero) NativeMethods.RevertWow64Redirection(oldRedirectValue);
|
||||
}
|
||||
|
||||
|
||||
return monitorAdded;
|
||||
}
|
||||
|
||||
public bool RemoveSoftscanPortMonitor(String monitorName)
|
||||
{
|
||||
bool monitorRemoved = false;
|
||||
if ((NativeMethods.DeleteMonitor(null, ENVIRONMENT_64, monitorName)) != 0)
|
||||
monitorRemoved = true;
|
||||
return monitorRemoved;
|
||||
}
|
||||
|
||||
private bool AddPortMonitor(MONITOR_INFO_2 newMonitor)
|
||||
{
|
||||
bool monitorAdded = false;
|
||||
if ((NativeMethods.AddMonitor(null, 2, ref newMonitor) != 0))
|
||||
{
|
||||
monitorAdded = true;
|
||||
}
|
||||
return monitorAdded;
|
||||
}
|
||||
|
||||
private bool DeletePortMonitor(String monitorName)
|
||||
{
|
||||
bool monitorDeleted = false;
|
||||
if ((NativeMethods.DeleteMonitor(null, ENVIRONMENT_64, monitorName)) != 0)
|
||||
{
|
||||
monitorDeleted = true;
|
||||
}
|
||||
return monitorDeleted;
|
||||
}
|
||||
|
||||
private bool DoesMonitorExist(String monitorName)
|
||||
{
|
||||
bool monitorExists = false;
|
||||
List<MONITOR_INFO_2> portMonitors = EnumerateMonitors();
|
||||
foreach (MONITOR_INFO_2 portMonitor in portMonitors)
|
||||
{
|
||||
if (portMonitor.pName == monitorName)
|
||||
{
|
||||
monitorExists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return monitorExists;
|
||||
}
|
||||
|
||||
public List<MONITOR_INFO_2> EnumerateMonitors()
|
||||
{
|
||||
List<MONITOR_INFO_2> portMonitors = new List<MONITOR_INFO_2>();
|
||||
|
||||
uint pcbNeeded = 0;
|
||||
uint pcReturned = 0;
|
||||
|
||||
if (!NativeMethods.EnumMonitors(null, 2, IntPtr.Zero, 0, ref pcbNeeded, ref pcReturned))
|
||||
{
|
||||
IntPtr pMonitors = Marshal.AllocHGlobal((int)pcbNeeded);
|
||||
if (NativeMethods.EnumMonitors(null, 2, pMonitors, pcbNeeded, ref pcbNeeded, ref pcReturned))
|
||||
{
|
||||
IntPtr currentMonitor = pMonitors;
|
||||
|
||||
for (int i = 0; i < pcReturned; i++)
|
||||
{
|
||||
portMonitors.Add((MONITOR_INFO_2)Marshal.PtrToStructure(currentMonitor, typeof(MONITOR_INFO_2)));
|
||||
currentMonitor = (IntPtr)(currentMonitor.ToInt32() + Marshal.SizeOf(typeof(MONITOR_INFO_2)));
|
||||
}
|
||||
Marshal.FreeHGlobal(pMonitors);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// Failed to retrieve enumerate
|
||||
throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not enumerate monitor ports.");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ApplicationException("Call to winspool.drv succeeded with a zero size buffer - unexpected error.");
|
||||
}
|
||||
|
||||
return portMonitors;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Printer Install
|
||||
|
||||
public String RetrievePrinterDriverDirectory()
|
||||
{
|
||||
StringBuilder driverDirectory = new StringBuilder(1024);
|
||||
int dirSizeInBytes = 0;
|
||||
if (!NativeMethods.GetPrinterDriverDirectory(null,
|
||||
null,
|
||||
1,
|
||||
driverDirectory,
|
||||
1024,
|
||||
ref dirSizeInBytes))
|
||||
throw new ApplicationException("Could not retrieve printer driver directory.");
|
||||
return driverDirectory.ToString();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
public bool InstallSoftscanPrinter_Test()
|
||||
{
|
||||
String printerName = PRINTERNAME;
|
||||
String driverSourceDirectory = @"C:\Code\OaisisRedmonInstaller\Lib\";
|
||||
String[] driverFilesToCopy = new String[] { DRIVERFILE, DRIVERDATAFILE, DRIVERHELPFILE, DRIVERUIFILE };
|
||||
String[] dependentFilesToCopy = new String[] { "PSCRIPT.NTF" };
|
||||
return InstallPdfScribePrinter(printerName, driverSourceDirectory, driverFilesToCopy, dependentFilesToCopy);
|
||||
}
|
||||
#endif
|
||||
public bool InstallPdfScribePrinter(String printerName,
|
||||
String driverSourceDirectory,
|
||||
String[] driverFilesToCopy,
|
||||
String[] dependentFilesToCopy)
|
||||
{
|
||||
bool printerInstalled = false;
|
||||
|
||||
String driverDirectory = RetrievePrinterDriverDirectory();
|
||||
if (AddPdfScribePort(PORTNAME) == 0)
|
||||
{
|
||||
if (CopyPrinterDriverFiles(driverSourceDirectory, driverFilesToCopy.Concat(dependentFilesToCopy).ToArray()))
|
||||
{
|
||||
if (AddPdfScribePortMonitor(PORTMONITOR, MONITORDLL, driverSourceDirectory))
|
||||
{
|
||||
if (InstallPrinterDriver(driverDirectory, dependentFilesToCopy))
|
||||
{
|
||||
printerInstalled = AddPdfScribePrinter();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return printerInstalled;
|
||||
}
|
||||
|
||||
private bool CopyPrinterDriverFiles(String driverSourceDirectory,
|
||||
String[] filesToCopy)
|
||||
{
|
||||
bool filesCopied = false;
|
||||
String driverDestinationDirectory = RetrievePrinterDriverDirectory();
|
||||
try
|
||||
{
|
||||
for (int loop = 0; loop < filesToCopy.Length; loop++)
|
||||
{
|
||||
String fileSourcePath = Path.Combine(driverSourceDirectory, filesToCopy[loop]);
|
||||
String fileDestinationPath = Path.Combine(driverDestinationDirectory, filesToCopy[loop]);
|
||||
try
|
||||
{
|
||||
File.Copy(fileSourcePath, fileDestinationPath);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
// Just keep going - file was already
|
||||
// there, but we didn't overwrite
|
||||
continue;
|
||||
}
|
||||
}
|
||||
filesCopied = true;
|
||||
}
|
||||
catch (UnauthorizedAccessException)
|
||||
{ }
|
||||
catch (PathTooLongException)
|
||||
{ }
|
||||
catch (DirectoryNotFoundException)
|
||||
{ }
|
||||
catch (FileNotFoundException)
|
||||
{ }
|
||||
catch (NotSupportedException)
|
||||
{ }
|
||||
|
||||
|
||||
return filesCopied;
|
||||
}
|
||||
|
||||
private bool DeletePrinterDriverFiles(String driverSourceDirectory,
|
||||
String[] filesToDelete)
|
||||
{
|
||||
bool allFilesDeleted = true;
|
||||
for (int loop = 0; loop < filesToDelete.Length; loop++)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Delete(Path.Combine(driverSourceDirectory, filesToDelete[loop]));
|
||||
}
|
||||
catch
|
||||
{
|
||||
allFilesDeleted = false;
|
||||
}
|
||||
}
|
||||
return allFilesDeleted;
|
||||
}
|
||||
|
||||
private bool InstallPrinterDriver(String driverSourceDirectory,
|
||||
String[] dependentDriverFiles)
|
||||
{
|
||||
bool printerDriverInstalled = false;
|
||||
DRIVER_INFO_6 printerDriverInfo = new DRIVER_INFO_6();
|
||||
|
||||
printerDriverInfo.cVersion = 3;
|
||||
printerDriverInfo.pName = DRIVERNAME;
|
||||
printerDriverInfo.pEnvironment = ENVIRONMENT_64;
|
||||
printerDriverInfo.pDriverPath = Path.Combine(driverSourceDirectory, DRIVERFILE);
|
||||
printerDriverInfo.pConfigFile = Path.Combine(driverSourceDirectory,DRIVERUIFILE);
|
||||
printerDriverInfo.pHelpFile = Path.Combine(driverSourceDirectory,DRIVERHELPFILE);
|
||||
printerDriverInfo.pDataFile = Path.Combine(driverSourceDirectory,DRIVERDATAFILE);
|
||||
|
||||
StringBuilder nullTerminatedDependentFiles = new StringBuilder();
|
||||
if (dependentDriverFiles != null &&
|
||||
dependentDriverFiles.Length > 0)
|
||||
{
|
||||
for (int loop = 0; loop <= dependentDriverFiles.GetUpperBound(0); loop++)
|
||||
{
|
||||
nullTerminatedDependentFiles.Append(dependentDriverFiles[loop]);
|
||||
nullTerminatedDependentFiles.Append("\0");
|
||||
}
|
||||
nullTerminatedDependentFiles.Append("\0");
|
||||
}
|
||||
else
|
||||
{
|
||||
nullTerminatedDependentFiles.Append("\0\0");
|
||||
}
|
||||
printerDriverInfo.pDependentFiles = nullTerminatedDependentFiles.ToString();
|
||||
|
||||
printerDriverInfo.pMonitorName = PORTMONITOR;
|
||||
printerDriverInfo.pDefaultDataType = String.Empty;
|
||||
printerDriverInfo.dwlDriverVersion = 0x0000000200000000U;
|
||||
printerDriverInfo.pszMfgName = DRIVERMANUFACTURER;
|
||||
printerDriverInfo.pszHardwareID = HARDWAREID;
|
||||
printerDriverInfo.pszProvider = DRIVERMANUFACTURER;
|
||||
|
||||
printerDriverInstalled = NativeMethods.AddPrinterDriver(null, 6, ref printerDriverInfo);
|
||||
if (printerDriverInstalled == false)
|
||||
{
|
||||
int lastWinError = Marshal.GetLastWin32Error();
|
||||
throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not add printer PDF Scribe printer driver.");
|
||||
}
|
||||
return printerDriverInstalled;
|
||||
}
|
||||
|
||||
|
||||
private bool AddPdfScribePrinter()
|
||||
{
|
||||
bool printerAdded = false;
|
||||
PRINTER_INFO_2 pdfScribePrinter = new PRINTER_INFO_2();
|
||||
|
||||
pdfScribePrinter.pServerName = null;
|
||||
pdfScribePrinter.pPrinterName = PRINTERNAME;
|
||||
pdfScribePrinter.pPortName = PORTNAME;
|
||||
pdfScribePrinter.pDriverName = DRIVERNAME;
|
||||
pdfScribePrinter.pPrintProcessor = PRINTPROCESOR;
|
||||
pdfScribePrinter.pDatatype = "RAW";
|
||||
pdfScribePrinter.Attributes = 0x00000002;
|
||||
|
||||
int softScanPrinterHandle = NativeMethods.AddPrinter(null, 2, ref pdfScribePrinter);
|
||||
if (softScanPrinterHandle != 0)
|
||||
{
|
||||
// Added ok
|
||||
int closeCode = NativeMethods.ClosePrinter((IntPtr)softScanPrinterHandle);
|
||||
printerAdded = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not add PDF Scribe virtual printer.");
|
||||
}
|
||||
return printerAdded;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
72
PdfScribe/Program.cs
Normal file
72
PdfScribe/Program.cs
Normal file
@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PdfScribe
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
//RemovePort();
|
||||
//RemovePortMonitor();
|
||||
//TestGetPorts();
|
||||
//AddPort();
|
||||
//TestGetPrinterDriverDir();
|
||||
//TestInstallPrinterDriver();
|
||||
DeletePdfScribePort();
|
||||
}
|
||||
|
||||
public static void AddPort()
|
||||
{
|
||||
var installer = new PdfScribeInstaller();
|
||||
installer.AddPdfScribePortMonitor("SOFTSCAN",
|
||||
"redmon64.dll",
|
||||
@"C:\Code\PdfScribe\Lib\");
|
||||
}
|
||||
|
||||
public static void DeletePdfScribePort()
|
||||
{
|
||||
var installer = new PdfScribeInstaller();
|
||||
installer.DeletePdfScribePort("SSCAN");
|
||||
}
|
||||
|
||||
public static void RemovePortMonitor()
|
||||
{
|
||||
var installer = new PdfScribeInstaller();
|
||||
installer.RemoveSoftscanPortMonitor("SOFTSCAN");
|
||||
installer.RemoveSoftscanPortMonitor("OAISISSOFTSCAN");
|
||||
}
|
||||
|
||||
public static void TestGetPorts()
|
||||
{
|
||||
var installer = new PdfScribeInstaller();
|
||||
List<MONITOR_INFO_2> monList = installer.EnumerateMonitors();
|
||||
foreach (MONITOR_INFO_2 currentMonitor in monList)
|
||||
{
|
||||
Console.WriteLine(currentMonitor.pName + " / " +
|
||||
currentMonitor.pEnvironment + " / " +
|
||||
currentMonitor.pDLLName);
|
||||
}
|
||||
}
|
||||
|
||||
public static void TestGetPrinterDriverDir()
|
||||
{
|
||||
var installer = new PdfScribeInstaller();
|
||||
String driverDir = installer.RetrievePrinterDriverDirectory();
|
||||
}
|
||||
|
||||
public static void TestInstallPrinterDriver()
|
||||
{
|
||||
var installer = new PdfScribeInstaller();
|
||||
/*installer.AddSoftscanPortMonitor("OAISISSOFTSCAN",
|
||||
"redmon64.dll",
|
||||
@"C:\Code\OaisisRedmonInstaller\Lib\"); */
|
||||
installer.InstallSoftscanPrinter_Test();
|
||||
//installer.RemoveSoftscanPortMonitor("SOFTSCAN");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
36
PdfScribe/Properties/AssemblyInfo.cs
Normal file
36
PdfScribe/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("PDF Scribe")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("S T Chan")]
|
||||
[assembly: AssemblyProduct("PDF Scribe")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("4bd5734a-468e-47bc-a038-112129182f70")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
48
PdfScribe/app.manifest
Normal file
48
PdfScribe/app.manifest
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- UAC Manifest Options
|
||||
If you want to change the Windows User Account Control level replace the
|
||||
requestedExecutionLevel node with one of the following.
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
Specifying requestedExecutionLevel node will disable file and registry virtualization.
|
||||
If you want to utilize File and Registry Virtualization for backward
|
||||
compatibility then delete the requestedExecutionLevel node.
|
||||
-->
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- A list of all Windows versions that this application is designed to work with. Windows will automatically select the most compatible environment.-->
|
||||
|
||||
<!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
|
||||
<!-- <dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>-->
|
||||
|
||||
</asmv1:assembly>
|
6
PdfScribeUnitTests/App.config
Normal file
6
PdfScribeUnitTests/App.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
|
||||
</startup>
|
||||
</configuration>
|
14
PdfScribeUnitTests/NUnitConsoleRunner.cs
Normal file
14
PdfScribeUnitTests/NUnitConsoleRunner.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace PdfScribeUnitTests
|
||||
{
|
||||
// Written by blokeley
|
||||
class NUnitConsoleRunner
|
||||
{
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
NUnit.ConsoleRunner.Runner.Main(args);
|
||||
}
|
||||
}
|
||||
}
|
142
PdfScribeUnitTests/PdfScribeUnitTests.csproj
Normal file
142
PdfScribeUnitTests/PdfScribeUnitTests.csproj
Normal file
@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{D387573C-D122-461C-B525-1545DBDB4FBA}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PdfScribeUnitTests</RootNamespace>
|
||||
<AssemblyName>PdfScribeUnitTests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>PdfScribeUnitTests.NUnitConsoleRunner</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="nunit-console-runner">
|
||||
<HintPath>..\Lib\nunit-console-runner.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.core">
|
||||
<HintPath>..\Lib\nunit.core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.core.interfaces">
|
||||
<HintPath>..\Lib\nunit.core.interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework">
|
||||
<HintPath>..\Lib\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.util">
|
||||
<HintPath>..\Lib\nunit.util.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="NUnitConsoleRunner.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="UnitTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PdfScribe\PdfScribe.csproj">
|
||||
<Project>{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}</Project>
|
||||
<Name>PdfScribe</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
33
PdfScribeUnitTests/PdfScribeUnitTests.csproj.user
Normal file
33
PdfScribeUnitTests/PdfScribeUnitTests.csproj.user
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<StartWorkingDirectory>C:\Code\PdfScribe\PdfScribeUnitTests\</StartWorkingDirectory>
|
||||
<StartArguments>PdfScribeUnitTests.csproj</StartArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<StartWorkingDirectory>C:\Code\PdfScribe\PdfScribeUnitTests\</StartWorkingDirectory>
|
||||
<StartArguments>PdfScribeUnitTests.csproj</StartArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<StartWorkingDirectory>C:\Code\PdfScribe\PdfScribeUnitTests\</StartWorkingDirectory>
|
||||
<StartArguments>PdfScribeUnitTests.csproj</StartArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<StartWorkingDirectory>C:\Code\PdfScribe\PdfScribeUnitTests\</StartWorkingDirectory>
|
||||
<StartArguments>PdfScribeUnitTests.csproj</StartArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||
<InstallUrlHistory />
|
||||
<SupportUrlHistory />
|
||||
<UpdateUrlHistory />
|
||||
<BootstrapperUrlHistory />
|
||||
<ErrorReportUrlHistory />
|
||||
<FallbackCulture>en-US</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ReferencePath>
|
||||
</ReferencePath>
|
||||
</PropertyGroup>
|
||||
</Project>
|
36
PdfScribeUnitTests/Properties/AssemblyInfo.cs
Normal file
36
PdfScribeUnitTests/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("PdfScribeUnitTests")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PdfScribeUnitTests")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("55b070cb-bccc-41b0-80b8-11cf2d169436")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
28
PdfScribeUnitTests/UnitTests.cs
Normal file
28
PdfScribeUnitTests/UnitTests.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using PdfScribe;
|
||||
|
||||
namespace PdfScribeUnitTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class UnitTests
|
||||
{
|
||||
#region Ctor
|
||||
public UnitTests()
|
||||
{ }
|
||||
#endregion
|
||||
|
||||
[Test]
|
||||
public void Test_DeletePdfScribePort()
|
||||
{
|
||||
var scribeInstaller = new PdfScribeInstaller();
|
||||
scribeInstaller.DeletePdfScribePort("SSCAN");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user