// Convert a URL to PDF
const response = await fetch('https://api.pdfforge.io/v1/convert', {
method: 'POST',
headers: {
'Authorization': 'Bearer pf_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
source: { url: 'https://example.com' },
options: {
format: 'A4',
printBackground: true
}
})
})
const result = await response.json()
console.log('PDF URL:', result.pdf.signedUrl)Demo Email:
demo@pdfforge.ioDemo API Key:
pf_demo_test_key_123456789💡 Quick Test: Visit our Test Lab to try PDF conversion instantly with real URLs!