[docx] Fix position error in libre/only office
This commit is contained in:
parent
4448539307
commit
4437a6856f
33
docx/main.ts
33
docx/main.ts
@ -8,6 +8,7 @@ import {
|
||||
VerticalPositionAlign,
|
||||
TextRun,
|
||||
AlignmentType,
|
||||
ShadingType,
|
||||
} from "docx";
|
||||
import { join } from "path";
|
||||
import * as QR from "qrcode";
|
||||
@ -277,10 +278,6 @@ const certificateName = new Paragraph({
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
@ -305,10 +302,6 @@ const certificatePersonName = new Paragraph({
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
@ -336,10 +329,6 @@ const certificateExpedite = new Paragraph({
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
@ -364,10 +353,6 @@ const certificateCode = new Paragraph({
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
@ -392,10 +377,6 @@ const certificateBody = new Paragraph({
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
@ -442,10 +423,6 @@ const certificateFinishLabel = new Paragraph({
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
@ -455,6 +432,7 @@ const certificateFinishLabel = new Paragraph({
|
||||
}),
|
||||
],
|
||||
alignment: AlignmentType.CENTER,
|
||||
style: "highlighting: none;",
|
||||
});
|
||||
|
||||
// Fecha de Emision: ...
|
||||
@ -468,11 +446,7 @@ const certificateDate = new Paragraph({
|
||||
height: cmText(1.4),
|
||||
anchor: {
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
vertical: FrameAnchorType.TEXT,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
@ -490,6 +464,7 @@ const certificateDate = new Paragraph({
|
||||
}),
|
||||
],
|
||||
alignment: AlignmentType.LEFT,
|
||||
style: "highlighting: none;",
|
||||
});
|
||||
|
||||
|
||||
|
@ -160,10 +160,6 @@ export async function matpelCert(props: CertData): Promise<Buffer> {
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
@ -188,10 +184,6 @@ export async function matpelCert(props: CertData): Promise<Buffer> {
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
@ -219,10 +211,6 @@ export async function matpelCert(props: CertData): Promise<Buffer> {
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
@ -275,10 +263,6 @@ export async function matpelCert(props: CertData): Promise<Buffer> {
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
@ -325,10 +309,6 @@ export async function matpelCert(props: CertData): Promise<Buffer> {
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
@ -353,10 +333,6 @@ export async function matpelCert(props: CertData): Promise<Buffer> {
|
||||
horizontal: FrameAnchorType.MARGIN,
|
||||
vertical: FrameAnchorType.MARGIN,
|
||||
},
|
||||
alignment: {
|
||||
x: HorizontalPositionAlign.CENTER,
|
||||
y: VerticalPositionAlign.TOP,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new TextRun({
|
||||
|
Loading…
Reference in New Issue
Block a user