개정판 ab590000
FinalPDFClient 추가
Change-Id: If44701b45542577019b74133cc8c89bf131e3398
FinalService/KCOM_FinalService/FinalPDFClient/MainWindow.xaml | ||
---|---|---|
12 | 12 |
<RowDefinition Height="Auto"/> |
13 | 13 |
<RowDefinition Height="Auto"/> |
14 | 14 |
<RowDefinition Height="Auto"/> |
15 |
<RowDefinition Height="*"/> |
|
15 | 16 |
<RowDefinition Height="Auto"/> |
16 | 17 |
</Grid.RowDefinitions> |
17 | 18 |
<Grid.ColumnDefinitions> |
... | ... | |
31 | 32 |
<TextBlock Text="Document ID : "/> |
32 | 33 |
<TextBox Name="txtDocId" Width="120" Text="30000165"/> |
33 | 34 |
</StackPanel> |
34 |
<Button Grid.Row="3" Content="Merged PDF" Margin="2" Width="100" Click="Button_Click"/> |
|
35 |
<StackPanel Orientation="Horizontal" Grid.Row="3" Grid.ColumnSpan="3" HorizontalAlignment="Left"> |
|
36 |
<TextBlock Text="Output : "/> |
|
37 |
<TextBox Name="txtOutput" Width="300" Text=""/> |
|
38 |
</StackPanel> |
|
39 |
<Button Grid.Row="4" Content="Merged PDF" Margin="2" Width="100" Click="Button_Click"/> |
|
35 | 40 |
</Grid> |
36 | 41 |
</Grid> |
37 | 42 |
</Window> |
FinalService/KCOM_FinalService/FinalPDFClient/MainWindow.xaml.cs | ||
---|---|---|
33 | 33 |
|
34 | 34 |
EventHandler<MakeFinalErrorArgs> errorEventHandler = null; |
35 | 35 |
EventHandler<EndFinalEventArgs> endFinalEventHandler = null; |
36 |
EventHandler<StatusChangedEventArgs> StatusChangedEventHandler = null; |
|
36 | 37 |
|
37 | 38 |
errorEventHandler = (snd, evt) => |
38 | 39 |
{ |
... | ... | |
40 | 41 |
|
41 | 42 |
markupToPDF.FinalMakeError -= errorEventHandler; |
42 | 43 |
markupToPDF.EndFinal -= endFinalEventHandler; |
44 |
markupToPDF.StatusChanged -= StatusChangedEventHandler; |
|
43 | 45 |
}; |
44 | 46 |
|
45 | 47 |
endFinalEventHandler = (snd, evt) => |
46 | 48 |
{ |
49 |
txtOutput.Text += evt.FinalPDFPath + " " + evt.Error; |
|
47 | 50 |
System.Diagnostics.Debug.WriteLine(evt.Message); |
48 | 51 |
|
49 | 52 |
markupToPDF.FinalMakeError -= errorEventHandler; |
50 | 53 |
markupToPDF.EndFinal -= endFinalEventHandler; |
54 |
markupToPDF.StatusChanged -= StatusChangedEventHandler; |
|
55 |
}; |
|
56 |
|
|
57 |
StatusChangedEventHandler = (snd, evt) => |
|
58 |
{ |
|
59 |
txtOutput.Dispatcher.Invoke(() => { |
|
60 |
txtOutput.Text += evt.Message + " " + evt.CurrentPage + " " + evt.Error; |
|
61 |
}); |
|
51 | 62 |
}; |
52 | 63 |
|
53 | 64 |
markupToPDF.FinalMakeError += errorEventHandler; |
54 | 65 |
markupToPDF.EndFinal += endFinalEventHandler; |
66 |
markupToPDF.StatusChanged += StatusChangedEventHandler; |
|
67 |
try |
|
68 |
{ |
|
69 |
var addResult = markupToPDF.AddFinalPDF(txtProject.Text, txtDocId.Text, txtUserId.Text); |
|
55 | 70 |
|
56 |
|
|
57 |
var addResult = markupToPDF.AddFinalPDF(txtProject.Text, txtDocId.Text, txtUserId.Text); |
|
58 |
|
|
59 |
if (addResult.Success) |
|
71 |
if (addResult.Success) |
|
72 |
{ |
|
73 |
markupToPDF.MakeFinalPDF((object)addResult.FinalPDF); |
|
74 |
} |
|
75 |
} |
|
76 |
catch (Exception ex) |
|
60 | 77 |
{ |
61 |
markupToPDF.MakeFinalPDF((object)addResult.FinalPDF);
|
|
78 |
txtOutput.Text = ex.ToString();
|
|
62 | 79 |
} |
63 | 80 |
} |
64 | 81 |
|
FinalService/KCOM_FinalService/KCOM_FinalService.sln | ||
---|---|---|
29 | 29 |
EndProject |
30 | 30 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FinalPDFClient", "FinalPDFClient\FinalPDFClient.csproj", "{DBD7598F-130F-4605-9B11-FE955A59FD4A}" |
31 | 31 |
EndProject |
32 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KcomDataService", "KcomDataService\KcomDataService.csproj", "{981AD841-0627-4485-A54D-DFBB4E9A9BFF}" |
|
33 |
EndProject |
|
32 | 34 |
Global |
33 | 35 |
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
34 | 36 |
Debug|Any CPU = Debug|Any CPU |
... | ... | |
169 | 171 |
{DBD7598F-130F-4605-9B11-FE955A59FD4A}.Release|x64.Build.0 = Release|Any CPU |
170 | 172 |
{DBD7598F-130F-4605-9B11-FE955A59FD4A}.Release|x86.ActiveCfg = Release|Any CPU |
171 | 173 |
{DBD7598F-130F-4605-9B11-FE955A59FD4A}.Release|x86.Build.0 = Release|Any CPU |
174 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
175 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
176 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Debug|x64.ActiveCfg = Debug|Any CPU |
|
177 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Debug|x64.Build.0 = Debug|Any CPU |
|
178 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Debug|x86.ActiveCfg = Debug|Any CPU |
|
179 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Debug|x86.Build.0 = Debug|Any CPU |
|
180 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
181 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Release|Any CPU.Build.0 = Release|Any CPU |
|
182 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Release|x64.ActiveCfg = Release|Any CPU |
|
183 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Release|x64.Build.0 = Release|Any CPU |
|
184 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Release|x86.ActiveCfg = Release|Any CPU |
|
185 |
{981AD841-0627-4485-A54D-DFBB4E9A9BFF}.Release|x86.Build.0 = Release|Any CPU |
|
172 | 186 |
EndGlobalSection |
173 | 187 |
GlobalSection(SolutionProperties) = preSolution |
174 | 188 |
HideSolutionNode = FALSE |
FinalService/KCOM_FinalService/MarkupToPDF/EventMember.cs | ||
---|---|---|
15 | 15 |
|
16 | 16 |
} |
17 | 17 |
|
18 |
public class StatusChangedEventArgs : EventArgs |
|
19 |
{ |
|
20 |
public string Message { get; set; } |
|
21 |
public string Error { get; set; } |
|
22 |
|
|
23 |
public int CurrentPage { get; set; } |
|
24 |
|
|
25 |
} |
|
26 |
|
|
18 | 27 |
public class MakeFinalErrorArgs : EventArgs |
19 | 28 |
{ |
20 | 29 |
public string FinalID { get; set; } |
FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs | ||
---|---|---|
37 | 37 |
//private string _PrintPDFStorgeRemote = null; |
38 | 38 |
public event EventHandler<MakeFinalErrorArgs> FinalMakeError; |
39 | 39 |
public event EventHandler<EndFinalEventArgs> EndFinal; |
40 |
public event EventHandler<StatusChangedEventArgs> StatusChanged; |
|
40 | 41 |
|
41 | 42 |
private iTextSharp.text.Rectangle pdfSize { get; set; } |
42 | 43 |
private double pageW = 0; |
... | ... | |
511 | 512 |
File.WriteAllBytes(dest, array); |
512 | 513 |
} |
513 | 514 |
|
515 |
public void StatusChange(string message,int CurrentPage) |
|
516 |
{ |
|
517 |
if(StatusChanged != null) |
|
518 |
{ |
|
519 |
StatusChanged(null, new StatusChangedEventArgs { CurrentPage = CurrentPage, Message = message }); |
|
520 |
} |
|
521 |
} |
|
522 |
|
|
514 | 523 |
public bool SetStampInPDF(FINAL_PDF finaldata, string testFile, MARKUP_INFO markupInfo) |
515 | 524 |
{ |
516 | 525 |
try |
... | ... | |
534 | 543 |
#region 코멘트 적용 + 커버시트 |
535 | 544 |
using (Stream pdfStream = new FileInfo(testFile).Open(FileMode.Open, FileAccess.ReadWrite)) // |
536 | 545 |
{ |
546 |
StatusChange("comment Cover",0); |
|
547 |
|
|
537 | 548 |
PdfReader pdfReader = new PdfReader(pdfStream); |
538 | 549 |
//List<Dictionary<string, object>> lstoutlineTop = new List<Dictionary<string, object>>(); |
539 | 550 |
Dictionary<string, object> bookmark; |
... | ... | |
544 | 555 |
var dic = new Dictionary<string, object>(); |
545 | 556 |
foreach (var data in MarkupDataSet) |
546 | 557 |
{ |
558 |
StatusChange("MarkupDataSet", 0); |
|
547 | 559 |
|
548 | 560 |
string userid = data.MARKUP_INFO_VERSION.MARKUP_INFO.USER_ID; |
549 | 561 |
|
... | ... | |
1176 | 1188 |
} |
1177 | 1189 |
catch (Exception ex) |
1178 | 1190 |
{ |
1179 |
|
|
1191 |
StatusChange($"markupItem : {markupItem.ID}" + ex.ToString(), 0); |
|
1180 | 1192 |
} |
1181 | 1193 |
} |
1182 | 1194 |
} |
INI/MARKUS_DAELIM.ini | ||
---|---|---|
1 | 1 |
[Internal] |
2 | 2 |
IP=172.20.120.141 |
3 | 3 |
[External] |
4 |
IP=ensembleitf.daelim.co.kr
|
|
4 |
IP=172.20.120.141
|
|
5 | 5 |
[BaseClientAddress] |
6 | 6 |
URL=http://172.20.120.141:5978 |
7 | 7 |
[HubAddress] |
KCOM/KCOM.csproj | ||
---|---|---|
745 | 745 |
<None Include="app.Debug_CadExport.config"> |
746 | 746 |
<DependentUpon>app.config</DependentUpon> |
747 | 747 |
</None> |
748 |
<None Include="app.Debug_Daelim.config"> |
|
749 |
<DependentUpon>app.config</DependentUpon> |
|
750 |
</None> |
|
748 | 751 |
<None Include="app.Debug_DevDoftech.config"> |
749 | 752 |
<DependentUpon>app.config</DependentUpon> |
750 | 753 |
</None> |
... | ... | |
760 | 763 |
<None Include="app.Release_Hyosung.config"> |
761 | 764 |
<DependentUpon>app.config</DependentUpon> |
762 | 765 |
</None> |
766 |
<None Include="app.Release_PEMSS.config"> |
|
767 |
<DependentUpon>app.config</DependentUpon> |
|
768 |
</None> |
|
763 | 769 |
<None Include="Connected Services\KcomService\KCOM.KcomService.FinalPDFResult.datasource"> |
764 | 770 |
<DependentUpon>Reference.svcmap</DependentUpon> |
765 | 771 |
</None> |
KCOM_API/KCOM_API.csproj | ||
---|---|---|
137 | 137 |
<None Include="Web.Debug_CadExport.config"> |
138 | 138 |
<DependentUpon>Web.config</DependentUpon> |
139 | 139 |
</None> |
140 |
<None Include="Web.Debug_Daelim.config"> |
|
141 |
<DependentUpon>Web.config</DependentUpon> |
|
142 |
</None> |
|
140 | 143 |
<None Include="Web.Debug_DevDoftech.config"> |
141 | 144 |
<DependentUpon>Web.config</DependentUpon> |
142 | 145 |
<IsTransformFile>true</IsTransformFile> |
내보내기 Unified diff