Minor improvment for DRAFT watermark
This commit is contained in:
@@ -63,9 +63,11 @@ export const DraftButtons: React.FC = () => {
|
|||||||
// Create the textbox on the master slide
|
// Create the textbox on the master slide
|
||||||
const textBox = master.shapes.addTextBox("");
|
const textBox = master.shapes.addTextBox("");
|
||||||
|
|
||||||
textBox.left = 0; // Center it horizontally
|
// textBox.left = 0; // Center it horizontally
|
||||||
textBox.top = 0;
|
textBox.left = -275
|
||||||
textBox.width = 960;
|
textBox.top = -5;
|
||||||
|
// textBox.width = 960;
|
||||||
|
textBox.width = 2400;
|
||||||
textBox.height = 540;
|
textBox.height = 540;
|
||||||
|
|
||||||
await context.sync();
|
await context.sync();
|
||||||
@@ -91,7 +93,8 @@ export const DraftButtons: React.FC = () => {
|
|||||||
|
|
||||||
// Set font properties exactly as in the VBA code
|
// Set font properties exactly as in the VBA code
|
||||||
textBox.textFrame.textRange.font.name = "Inter";
|
textBox.textFrame.textRange.font.name = "Inter";
|
||||||
textBox.textFrame.textRange.font.size = 256;
|
// textBox.textFrame.textRange.font.size = 256;
|
||||||
|
textBox.textFrame.textRange.font.size = 64;
|
||||||
textBox.textFrame.textRange.font.bold = true;
|
textBox.textFrame.textRange.font.bold = true;
|
||||||
textBox.textFrame.verticalAlignment = "MiddleCentered"
|
textBox.textFrame.verticalAlignment = "MiddleCentered"
|
||||||
|
|
||||||
@@ -100,7 +103,16 @@ export const DraftButtons: React.FC = () => {
|
|||||||
textBox.textFrame.textRange.font.color = "#FFE9E8";
|
textBox.textFrame.textRange.font.color = "#FFE9E8";
|
||||||
|
|
||||||
// Set the text
|
// Set the text
|
||||||
textBox.textFrame.textRange.text = "DRAFT";
|
textBox.textFrame.textRange.text =
|
||||||
|
"DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" +
|
||||||
|
"DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" +
|
||||||
|
"DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" +
|
||||||
|
"DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" +
|
||||||
|
"DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" +
|
||||||
|
"DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" +
|
||||||
|
"DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" +
|
||||||
|
"DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" +
|
||||||
|
"DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n";
|
||||||
} catch (fontError) {
|
} catch (fontError) {
|
||||||
console.error("Error setting font properties:", fontError);
|
console.error("Error setting font properties:", fontError);
|
||||||
// Even if we can't set the font properties exactly, continue with default font
|
// Even if we can't set the font properties exactly, continue with default font
|
||||||
|
|||||||
Reference in New Issue
Block a user