Skip to content

Commit 4e77432

Browse files
committed
Integrate document scanner API into Document Viewer
1 parent ef90ba2 commit 4e77432

File tree

3 files changed

+450
-7
lines changed

3 files changed

+450
-7
lines changed

src/app/document-viewer/document-viewer.component.css

Lines changed: 125 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,128 @@
1-
#document_container {
1+
/* Overlay styling to darken background */
2+
.overlay {
3+
position: fixed;
4+
top: 0;
5+
left: 0;
6+
width: 100%;
7+
height: 100%;
8+
background: rgba(0, 0, 0, 0.6);
9+
display: none;
10+
/* Hidden by default */
11+
justify-content: center;
12+
align-items: center;
13+
z-index: 9999;
14+
/* Ensures the pop-up is above other elements */
15+
}
16+
17+
/* Pop-up window styling */
18+
.popup {
19+
background: #fff;
20+
padding: 24px 32px;
21+
border-radius: 10px;
22+
width: 420px;
23+
max-width: 95vw;
24+
box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
25+
text-align: left;
26+
display: flex;
27+
flex-direction: column;
28+
align-items: stretch;
29+
}
30+
31+
/* Form group styling */
32+
.form-group {
33+
display: flex;
34+
align-items: center;
35+
margin-bottom: 18px;
36+
}
37+
38+
.form-group label {
39+
width: 140px;
40+
min-width: 120px;
41+
margin-right: 10px;
42+
font-weight: 500;
43+
text-align: right;
44+
flex-shrink: 0;
45+
}
46+
47+
.form-group input[type="checkbox"] {
48+
width: 18px;
49+
height: 18px;
50+
margin-left: 0;
51+
}
52+
53+
.form-group select {
54+
flex: 1 1 0;
55+
min-width: 0;
56+
max-width: 220px;
57+
padding: 8px;
58+
border-radius: 4px;
59+
border: 1px solid #ccc;
60+
box-sizing: border-box;
61+
}
62+
63+
.button-group {
64+
display: flex;
65+
justify-content: flex-end;
66+
gap: 10px;
67+
margin-top: 18px;
68+
}
69+
70+
/* Button styling */
71+
.popup button {
72+
padding: 8px 20px;
73+
border: none;
74+
border-radius: 4px;
75+
background: #1976d2;
76+
color: #fff;
77+
font-weight: 500;
78+
cursor: pointer;
79+
transition: background 0.2s;
80+
}
81+
82+
.popup button:hover {
83+
background: #125ea2;
84+
}
85+
86+
.dropdown-menu {
87+
display: none;
88+
position: absolute;
89+
top: 100%;
90+
left: 0;
91+
background-color: #222;
92+
min-width: 160px;
93+
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
94+
z-index: 1;
95+
border-radius: 4px;
96+
overflow: hidden;
97+
margin-top: 5px;
98+
}
99+
100+
.dropdown-menu.show {
101+
display: block;
102+
}
103+
104+
.dropdown-menu button {
105+
color: white;
106+
padding: 10px 16px;
107+
text-align: left;
108+
background-color: transparent;
109+
border: none;
110+
width: 100%;
111+
cursor: pointer;
112+
font-size: 14px;
113+
}
114+
115+
.dropdown-menu button:hover,
116+
.dropdown-menu .selected {
117+
background-color: #444;
118+
}
119+
120+
#edit-viewer {
121+
width: 100%;
122+
height: 75%;
123+
}
124+
125+
.document-viewer {
2126
width: 100%;
3127
height: 100%;
4128
position: fixed;
Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,30 @@
1-
<div id="document_container"></div>
1+
<div class="document-viewer">
2+
<div id="edit-viewer"></div>
3+
</div>
4+
5+
<div id="pop-scanner" class="overlay">
6+
<div class="popup">
7+
<div class="form-group">
8+
<label for="sources">Scanner Source:</label>
9+
<select id="sources">
10+
</select>
11+
</div>
12+
<div class="form-group">
13+
<label for="ADF">Auto Feeder:</label>
14+
<input type="checkbox" id="ADF" checked="checked">
15+
</div>
16+
<div class="form-group">
17+
<label for="Resolution">Resolution:</label>
18+
<select id="Resolution">
19+
<option value="100">100</option>
20+
<option value="150">150</option>
21+
<option value="200">200</option>
22+
<option value="300">300</option>
23+
</select>
24+
</div>
25+
<div class="button-group">
26+
<button class="button" id="acquireDocument">OK</button>
27+
<button class="button" id="cancelCapture">Cancel</button>
28+
</div>
29+
</div>
30+
</div>

0 commit comments

Comments
 (0)