Skip to main content
Learn how to upload a PDF without addresses and have Intelliprint add them dynamically - either on a separate coversheet or on the same page as your content.

Overview

This approach is perfect when you:
  • Generate documents programmatically (invoices, statements, reports)
  • Design content without worrying about address placement
  • Want flexibility in address positioning

Two Approaches

###1. Separate Address Sheet (Coversheet) A blank page with just the address is added before your content. Pros:
  • Simple - no design changes needed
  • Address is guaranteed to show in envelope window
  • Works with any existing PDF
Use cases: Invoices, statements, reports

2. Address on Same Page

The address is printed on the first page of your content. Pros:
  • Saves paper (one fewer page)
  • Professional appearance
Use cases: Letters with designed first pages, marketing materials

Method 1: Separate Address Sheet

import Intelliprint from 'intelliprint';
import fs from 'fs';

const ip = Intelliprint('your-api-key-here');

const printJob = await ip.prints.create({
  testmode: true,
  
  // Your PDF without addresses
  file: fs.createReadStream('./invoice.pdf'),
  
  // Provide recipients
  recipients: [{
    address: {
      name: 'John Doe',
      line: '123 Main Street, London',
      postcode: 'SW1A 1AA',
      country: 'GB'
    }
  }],
  
  // This is the default behaviour - adds separate address sheet
  // add_address_sheet is automatically true
  
  confirmed: true
});

console.log('Total pages:', printJob.pages);
// If invoice.pdf is 2 pages, total will be 3 pages (address + 2)
Result: A separate page with the address is inserted before your PDF content.

Method 2: Address on Same Page

Print the address directly on the first page of your content:
const printJob = await ip.prints.create({
  testmode: true,
  file: fs.createReadStream('./letter.pdf'),
  
  recipients: [{
    address: {
      name: 'John Doe',
      line: '123 Main Street, London',
      postcode: 'SW1A 1AA',
      country: 'GB'
    }
  }],
  
  // Print address on the first page (not separate)
  letters: [{
    add_address_sheet: false
  }],
  
  confirmed: true
});
Important: When using add_address_sheet: false, make sure the top-left area of your first page is blank where the address will be printed. Standard position is 20mm from left, 45mm from top.

Bulk Sending with Coversheets

Send unique PDFs to multiple recipients:
// Each recipient gets their own PDF with a coversheet
const printJobs = await Promise.all(
  recipients.map(recipient => 
    ip.prints.create({
      testmode: true,
      file: fs.createReadStream(`./invoice_${recipient.id}.pdf`),
      recipients: [{
        address: recipient.address
      }],
      confirmed: true
    })
  )
);

console.log(`Created ${printJobs.length} print jobs`);

Address Window Position

Control which side of the envelope the address appears on:
const printJob = await ip.prints.create({
  testmode: true,
  file: fs.createReadStream('./document.pdf'),
  recipients: [{address: {/* ... */}}],
  
  // Choose address window position
  address_window: 'left',   // or 'right'
  
  confirmed: true
});
Window positions:
  • left (default): Address window on left side of envelope
  • right: Address window on right side of envelope

Fine-tuning with Nudging

If the address doesn’t align perfectly with the envelope window, use nudging:
const printJob = await ip.prints.create({
  testmode: true,
  file: fs.createReadStream('./document.pdf'),
  recipients: [{address: {/* ... */}}],
  
  // Adjust address position
  nudge: {
    x: 2,    // Move 2mm right
    y: -1    // Move 1mm up
  },
  
  confirmed: true
});
Positive X moves right, negative moves left. Positive Y moves down, negative moves up. Values are in millimeters.Learn more about nudging →

Real-World Example: Invoice Mailing

Complete example of sending invoices with coversheets:
import Intelliprint from 'intelliprint';
import fs from 'fs';

const ip = Intelliprint('your-api-key-here');

async function sendInvoices(invoiceData) {
  const printJobs = [];
  
  for (const invoice of invoiceData) {
    // Generate or load PDF for this invoice
    const pdfPath = `./invoices/invoice_${invoice.number}.pdf`;
    
    const printJob = await ip.prints.create({
      testmode: false,  // Live mode for real sending
      
      // Invoice PDF
      file: fs.createReadStream(pdfPath),
      
      // Customer address
      recipients: [{
        address: {
          name: invoice.customer_name,
          line: invoice.address_line,
          postcode: invoice.postcode,
          country: invoice.country || 'GB'
        }
      }],
      
      // Reference for tracking
      reference: `Invoice ${invoice.number}`,
      
      // Choose postage service
      postage: {
        service: 'uk_first_class'  // Faster delivery
      },
      
      confirmed: true
    });
    
    printJobs.push({
      invoice_number: invoice.number,
      print_job_id: printJob.id,
      status: printJob.letters[0].status
    });
  }
  
  return printJobs;
}

// Use it
const invoices = [
  { 
    number: 'INV-001', 
    customer_name: 'John Doe',
    address_line: '123 Main St, London',
    postcode: 'SW1A 1AA'
  },
  // ... more invoices
];

const results = await sendInvoices(invoices);
console.log(`Sent ${results.length} invoices`);

Best Practices

  • Leave 100mm x 50mm clear space at top-left of first page if using add_address_sheet: false
  • Use standard fonts and clear formatting for addresses
  • Test with one recipient before sending in bulk
  • Keep address lines under 40 characters for best fit
  • Use proper postcode formatting (e.g., “SW1A 1AA” not “sw1a1aa”)
  • Always include country code (ISO 3166-1 alpha-2)
  • Always use testmode: true first
  • Download and check the PDF preview
  • Verify address positioning looks correct
  • Check that all pages are included

Next Steps