Skip to content

The Open Source DocuSign Alternative.

chore: removed console.logs and warn

Catalin Pitd1db20ff4a49
diff --git a/packages/lib/server-only/document/complete-document-with-token.ts b/packages/lib/server-only/document/complete-document-with-token.ts
index 2c937cf93..55df75249 100644
--- a/packages/lib/server-only/document/complete-document-with-token.ts
+++ b/packages/lib/server-only/document/complete-document-with-token.ts
@@ -86,7 +86,6 @@ export const completeDocumentWithToken = async ({
console.log('documents', documents);
if (documents.count > 0) {
- console.log('sealing document');
await sealDocument({ documentId: document.id });
}
};
diff --git a/packages/lib/server-only/document/seal-document.ts b/packages/lib/server-only/document/seal-document.ts
index 89769d788..1a74cfaac 100644
--- a/packages/lib/server-only/document/seal-document.ts
+++ b/packages/lib/server-only/document/seal-document.ts
@@ -53,10 +53,6 @@ export const sealDocument = async ({ documentId }: SealDocumentOptions) => {
const doc = await PDFDocument.load(pdfData);
for (const field of fields) {
- console.log('inserting field', {
- ...field,
- Signature: null,
- });
await insertFieldInPDF(doc, field);
}
diff --git a/packages/lib/server-only/pdf/insert-field-in-pdf.ts b/packages/lib/server-only/pdf/insert-field-in-pdf.ts
index 1d58aafb2..61726f53c 100644
--- a/packages/lib/server-only/pdf/insert-field-in-pdf.ts
+++ b/packages/lib/server-only/pdf/insert-field-in-pdf.ts
@@ -35,15 +35,6 @@ export const insertFieldInPDF = async (pdf: PDFDocument, field: FieldWithSignatu
const fieldX = pageWidth * (Number(field.positionX) / 100);
const fieldY = pageHeight * (Number(field.positionY) / 100);
- console.log({
- fieldWidth,
- fieldHeight,
- fieldX,
- fieldY,
- pageWidth,
- pageHeight,
- });
-
const font = await pdf.embedFont(isSignatureField ? fontCaveat : StandardFonts.Helvetica);
if (field.type === FieldType.SIGNATURE || field.type === FieldType.FREE_SIGNATURE) {
@@ -75,15 +66,6 @@ export const insertFieldInPDF = async (pdf: PDFDocument, field: FieldWithSignatu
// Invert the Y axis since PDFs use a bottom-left coordinate system
imageY = pageHeight - imageY - imageHeight;
- console.log({
- initialDimensions,
- scalingFactor,
- imageWidth,
- imageHeight,
- imageX,
- imageY,
- });
-
page.drawImage(image, {
x: imageX,
y: imageY,
@@ -107,17 +89,6 @@ export const insertFieldInPDF = async (pdf: PDFDocument, field: FieldWithSignatu
const textX = fieldX + (fieldWidth - textWidth) / 2;
let textY = fieldY + (fieldHeight - textHeight) / 2;
- console.log({
- initialDimensions,
- scalingFactor,
- textWidth,
- textHeight,
- textX,
- textY,
- pageWidth,
- pageHeight,
- });
-
// Invert the Y axis since PDFs use a bottom-left coordinate system
textY = pageHeight - textY - textHeight;