PDF Service Deployment Files
Download all files needed to deploy the HTML→PDF microservice
Core Service Files
Documentation
Integration Instructions
Step 1: Deploy the PDF Service
- Download all files using the buttons above
- Create a new directory and extract all files
- Follow the deployment instructions for Google Cloud Run
- Note the service URL after deployment
Step 2: Update the generatePDF Function
The generatePDF function above is a placeholder. To integrate with your deployed service:
- Set the
PDF_SERVICE_URLenvironment variable to your deployed service URL - Set the
HMAC_SECRETenvironment variable (same secret used in PDF service) - Update the function to make actual HTTP calls to your PDF service
Step 3: Update Frontend Integration
Update your SubscriptionForm.jsx to call the generatePDF function instead of generateSignedAgreement.
Step 4: Test the Integration
- Use the health check endpoint to verify service is running
- Test PDF generation with the client example
- Verify fonts and styling match your website
Important Notes:
- • The PDF service should be deployed privately (no public access)
- • Use strong HMAC secrets (32+ characters) and rotate them regularly
- • Monitor service performance and adjust Cloud Run settings as needed
- • Test thoroughly with real agreement content before production use
- • Consider keeping min-instances=1 for better response times
