Advanced PDF Unlocker
Unlock protected PDF files with password
Oxford TRG
Upload a protected PDF, enter the password, apply unlock, and download the unsecured version. Note: Requires the correct password to unlock protections.
PDF Unlocker
Drag & Drop your PDF here
or click to browse files
Password
Advanced Options
Actions
Preview & Export
Unlock info
Unlocked PDF will appear here
Original Size: N/A
Unlocked Size: N/A
Drag & Drop your PDF here
or click to browse files
Unlocked PDF will appear here
Original Size: N/A
Unlocked Size: N/A
`;
resetUnlocker();
showNotification('All cleared. Upload a new PDF to start.', 'info');
}
// Download PDF
function downloadPdf() {
if (!unlockedBlob) {
showNotification('Please unlock a PDF first', 'warning');
return;
}
const name = fileName.value || 'unlocked-pdf';
const url = URL.createObjectURL(unlockedBlob);
const a = document.createElement('a');
a.href = url;
a.download = `${name}.pdf`;
a.click();
URL.revokeObjectURL(url);
showNotification('PDF downloaded successfully!', 'success');
}
// Show notification
function showNotification(message, type) {
const existing = document.querySelector('.notification');
if (existing) existing.remove();
const notification = document.createElement('div');
notification.className = `notification ${type}`;
notification.innerHTML = `
${message}
`;
document.body.appendChild(notification);
notification.style.position = 'fixed';
notification.style.top = '20px';
notification.style.right = '20px';
notification.style.padding = '15px 20px';
notification.style.background = type === 'success' ? '#4CAF50' :
type === 'warning' ? '#FF9800' : '#2196F3';
notification.style.color = 'white';
notification.style.borderRadius = '8px';
notification.style.boxShadow = '0 4px 12px rgba(0,0,0,0.15)';
notification.style.zIndex = '1000';
notification.style.display = 'flex';
notification.style.alignItems = 'center';
notification.style.gap = '10px';
notification.style.animation = 'fadeIn 0.3s ease-out';
const style = document.createElement('style');
style.innerHTML = `
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-20px); }
to { opacity: 1; transform: translateY(0); }
}
`;
document.head.appendChild(style);
setTimeout(() => {
notification.style.animation = 'fadeOut 0.3s ease-out';
const fadeOutStyle = document.createElement('style');
fadeOutStyle.innerHTML = `
@keyframes fadeOut {
from { opacity: 1; transform: translateY(0); }
to { opacity: 0; transform: translateY(-20px); }
}
`;
document.head.appendChild(fadeOutStyle);
setTimeout(() => {
notification.remove();
fadeOutStyle.remove();
}, 300);
}, 3000);
}
// Initialize
initEventListeners();
});
