[docx] Fix position error in libre/only office

master
Fernando 2023-05-15 11:48:22 -05:00
parent 4448539307
commit 4437a6856f
2 changed files with 4 additions and 53 deletions

View File

@ -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;",
});

View File

@ -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({