<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>pdf tools &#8211; pk-360</title>
	<atom:link href="https://pk-360.com/pdf-tools/pdf-tools-2/feed/" rel="self" type="application/rss+xml" />
	<link>https://pk-360.com</link>
	<description>IT Solutions, Support, Insight, Ideas, and Business Solutions</description>
	<lastBuildDate>Tue, 14 Oct 2025 14:41:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://pk-360.com/wp-content/uploads/2025/08/pk-360-150x150.png</url>
	<title>pdf tools &#8211; pk-360</title>
	<link>https://pk-360.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>The Ultimate Guide to Free PDF Tools for Everyone</title>
		<link>https://pk-360.com/free-pdf-tools-for-everyone/</link>
		
		<dc:creator><![CDATA[Haider]]></dc:creator>
		<pubDate>Thu, 14 Aug 2025 15:52:15 +0000</pubDate>
				<category><![CDATA[AI Tools]]></category>
		<category><![CDATA[pdf tools]]></category>
		<category><![CDATA[All PDF tools]]></category>
		<category><![CDATA[compress pdf]]></category>
		<category><![CDATA[edit pdf]]></category>
		<category><![CDATA[excel to pdf]]></category>
		<category><![CDATA[html to pdf]]></category>
		<category><![CDATA[jpg to pdf]]></category>
		<category><![CDATA[Merge PDF]]></category>
		<category><![CDATA[pdf to excel]]></category>
		<category><![CDATA[pdf to jpg]]></category>
		<category><![CDATA[pdf to PowerPoint]]></category>
		<category><![CDATA[pdf to word]]></category>
		<category><![CDATA[PDF Tools]]></category>
		<category><![CDATA[PowerPoint to pdf]]></category>
		<category><![CDATA[rotate pdf]]></category>
		<category><![CDATA[Sign pdf]]></category>
		<category><![CDATA[split pdf]]></category>
		<category><![CDATA[word to pdf]]></category>
		<guid isPermaLink="false">https://pk-360.com/?page_id=747</guid>

					<description><![CDATA[Image to PDF Converter Image to PDF Converter Upload Images 📁 Drag &#038; Drop images here or Browse Files No images uploaded PDF Preview Upload images to see preview PDF Settings Page Size A4LetterLegalA3 Page Orientation PortraitLandscape Image Layout Fit to PageStretch to PageCenter on Page Margin (mm) Border NoneSolidDashed Border Color Image Quality HighMediumLow]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image aligncenter size-full is-resized"><img fetchpriority="high" decoding="async" width="1020" height="680" src="https://pk-360.com/wp-content/uploads/2025/10/Image-to-PDF-pk-360-1.webp" alt="" class="wp-image-1315" style="width:554px;height:auto" srcset="https://pk-360.com/wp-content/uploads/2025/10/Image-to-PDF-pk-360-1.webp 1020w, https://pk-360.com/wp-content/uploads/2025/10/Image-to-PDF-pk-360-1-300x200.webp 300w, https://pk-360.com/wp-content/uploads/2025/10/Image-to-PDF-pk-360-1-768x512.webp 768w, https://pk-360.com/wp-content/uploads/2025/10/Image-to-PDF-pk-360-1-150x100.webp 150w, https://pk-360.com/wp-content/uploads/2025/10/Image-to-PDF-pk-360-1-330x220.webp 330w, https://pk-360.com/wp-content/uploads/2025/10/Image-to-PDF-pk-360-1-420x280.webp 420w, https://pk-360.com/wp-content/uploads/2025/10/Image-to-PDF-pk-360-1-510x340.webp 510w" sizes="(max-width: 1020px) 100vw, 1020px" /></figure>



<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Image to PDF Converter</title>
    <style>
        :root {
            --primary: #4a6fa5;
            --primary-dark: #3a5984;
            --secondary: #6b8cbc;
            --light: #f8f9fa;
            --dark: #343a40;
            --success: #28a745;
            --danger: #dc3545;
            --border-radius: 8px;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            color: var(--dark);
            line-height: 1.6;
            padding: 20px;
        }
        
        .pdf-converter {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            padding: 30px;
        }
        
        h1 {
            text-align: center;
            color: var(--primary);
            margin-bottom: 30px;
            font-weight: 600;
        }
        
        .converter-container {
            display: flex;
            flex-wrap: wrap;
            gap: 30px;
            margin-bottom: 30px;
        }
        
        .upload-section, .preview-section {
            flex: 1;
            min-width: 300px;
        }
        
        .section-title {
            font-size: 1.2rem;
            margin-bottom: 15px;
            color: var(--primary);
            border-bottom: 2px solid var(--secondary);
            padding-bottom: 8px;
        }
        
        .drop-area {
            border: 2px dashed var(--secondary);
            border-radius: var(--border-radius);
            padding: 40px 20px;
            text-align: center;
            background-color: var(--light);
            transition: all 0.3s ease;
            cursor: pointer;
            margin-bottom: 20px;
        }
        
        .drop-area:hover, .drop-area.active {
            border-color: var(--primary);
            background-color: rgba(74, 111, 165, 0.05);
        }
        
        .drop-area i {
            font-size: 48px;
            color: var(--secondary);
            margin-bottom: 15px;
        }
        
        .file-input {
            display: none;
        }
        
        .btn {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-size: 1rem;
            font-weight: 500;
            transition: background-color 0.3s ease;
            display: inline-block;
            text-align: center;
        }
        
        .btn:hover {
            background-color: var(--primary-dark);
        }
        
        .btn-success {
            background-color: var(--success);
        }
        
        .btn-success:hover {
            background-color: #218838;
        }
        
        .btn-danger {
            background-color: var(--danger);
        }
        
        .btn-danger:hover {
            background-color: #c82333;
        }
        
        .btn-full {
            width: 100%;
            margin-top: 15px;
        }
        
        .image-list {
            margin-top: 20px;
            max-height: 300px;
            overflow-y: auto;
        }
        
        .image-item {
            display: flex;
            align-items: center;
            padding: 10px;
            border-bottom: 1px solid #eee;
        }
        
        .image-item:last-child {
            border-bottom: none;
        }
        
        .image-thumb {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border-radius: 4px;
            margin-right: 15px;
        }
        
        .image-info {
            flex: 1;
        }
        
        .image-name {
            font-weight: 500;
            margin-bottom: 5px;
        }
        
        .image-size {
            font-size: 0.8rem;
            color: #777;
        }
        
        .image-actions {
            display: flex;
            gap: 5px;
        }
        
        .action-btn {
            background: none;
            border: none;
            cursor: pointer;
            color: var(--secondary);
            font-size: 1.2rem;
        }
        
        .action-btn:hover {
            color: var(--primary);
        }
        
        .settings-section {
            background-color: var(--light);
            border-radius: var(--border-radius);
            padding: 20px;
            margin-bottom: 30px;
        }
        
        .settings-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 20px;
        }
        
        .setting-group {
            margin-bottom: 15px;
        }
        
        .setting-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }
        
        .setting-input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: var(--border-radius);
            font-size: 1rem;
        }
        
        .setting-select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: var(--border-radius);
            font-size: 1rem;
            background-color: white;
        }
        
        .pdf-preview {
            border: 1px solid #ddd;
            border-radius: var(--border-radius);
            padding: 20px;
            background-color: white;
            min-height: 400px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        
        .pdf-preview img {
            max-width: 100%;
            max-height: 300px;
            border: 1px solid #eee;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .pdf-page {
            margin-bottom: 20px;
            position: relative;
        }
        
        .pdf-page-number {
            position: absolute;
            bottom: 5px;
            right: 5px;
            background-color: rgba(0,0,0,0.7);
            color: white;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
        }
        
        .no-preview {
            color: #777;
        }
        
        .action-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 30px;
        }
        
        @media (max-width: 768px) {
            .converter-container {
                flex-direction: column;
            }
            
            .settings-grid {
                grid-template-columns: 1fr;
            }
            
            .action-buttons {
                flex-direction: column;
            }
            
            .btn {
                width: 100%;
            }
        }
        
        .loading {
            display: none;
            text-align: center;
            margin: 20px 0;
        }
        
        .spinner {
            border: 4px solid rgba(0, 0, 0, 0.1);
            border-left-color: var(--primary);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 0 auto 10px;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .status-message {
            padding: 10px;
            border-radius: var(--border-radius);
            margin: 10px 0;
            text-align: center;
            display: none;
        }
        
        .status-success {
            background-color: rgba(40, 167, 69, 0.2);
            color: var(--success);
            border: 1px solid var(--success);
        }
        
        .status-error {
            background-color: rgba(220, 53, 69, 0.2);
            color: var(--danger);
            border: 1px solid var(--danger);
        }
    </style>
</head>
<body>
    <div class="pdf-converter">
        <h1>Image to PDF Converter</h1>
        
        <div class="converter-container">
            <div class="upload-section">
                <h2 class="section-title">Upload Images</h2>
                <div class="drop-area" id="dropArea">
                    <i>📁</i>
                    <p>Drag &#038; Drop images here</p>
                    <p>or</p>
                    <button class="btn" id="browseBtn">Browse Files</button>
                    <input type="file" id="fileInput" class="file-input" multiple accept="image/*">
                </div>
                
                <div class="image-list" id="imageList">
                    <p style="text-align: center; color: #777;">No images uploaded</p>
                </div>
            </div>
            
            <div class="preview-section">
                <h2 class="section-title">PDF Preview</h2>
                <div class="pdf-preview" id="pdfPreview">
                    <div class="no-preview">
                        <p>Upload images to see preview</p>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="settings-section">
            <h2 class="section-title">PDF Settings</h2>
            <div class="settings-grid">
                <div class="setting-group">
                    <label class="setting-label">Page Size</label>
                    <select class="setting-select" id="pageSize">
                        <option value="a4">A4</option>
                        <option value="letter">Letter</option>
                        <option value="legal">Legal</option>
                        <option value="a3">A3</option>
                    </select>
                </div>
                
                <div class="setting-group">
                    <label class="setting-label">Page Orientation</label>
                    <select class="setting-select" id="pageOrientation">
                        <option value="portrait">Portrait</option>
                        <option value="landscape">Landscape</option>
                    </select>
                </div>
                
                <div class="setting-group">
                    <label class="setting-label">Image Layout</label>
                    <select class="setting-select" id="imageLayout">
                        <option value="fit">Fit to Page</option>
                        <option value="stretch">Stretch to Page</option>
                        <option value="center">Center on Page</option>
                    </select>
                </div>
                
                <div class="setting-group">
                    <label class="setting-label">Margin (mm)</label>
                    <input type="number" class="setting-input" id="marginSize" min="0" max="50" value="10">
                </div>
                
                <div class="setting-group">
                    <label class="setting-label">Border</label>
                    <select class="setting-select" id="borderStyle">
                        <option value="none">None</option>
                        <option value="solid">Solid</option>
                        <option value="dashed">Dashed</option>
                    </select>
                </div>
                
                <div class="setting-group">
                    <label class="setting-label">Border Color</label>
                    <input type="color" class="setting-input" id="borderColor" value="#000000">
                </div>
                
                <div class="setting-group">
                    <label class="setting-label">Image Quality</label>
                    <select class="setting-select" id="imageQuality">
                        <option value="high">High</option>
                        <option value="medium">Medium</option>
                        <option value="low">Low</option>
                    </select>
                </div>
                
                <div class="setting-group">
                    <label class="setting-label">PDF Name</label>
                    <input type="text" class="setting-input" id="pdfName" value="converted-images">
                </div>
            </div>
        </div>
        
        <div class="loading" id="loadingIndicator">
            <div class="spinner"></div>
            <p>Generating PDF, please wait&#8230;</p>
        </div>
        
        <div class="status-message" id="statusMessage"></div>
        
        <div class="action-buttons">
            <button class="btn btn-success" id="generateBtn">Generate PDF</button>
            <button class="btn btn-danger" id="resetBtn">Reset</button>
        </div>
    </div>

    <script>
        // DOM Elements
        const dropArea = document.getElementById('dropArea');
        const fileInput = document.getElementById('fileInput');
        const browseBtn = document.getElementById('browseBtn');
        const imageList = document.getElementById('imageList');
        const pdfPreview = document.getElementById('pdfPreview');
        const generateBtn = document.getElementById('generateBtn');
        const resetBtn = document.getElementById('resetBtn');
        const loadingIndicator = document.getElementById('loadingIndicator');
        const statusMessage = document.getElementById('statusMessage');
        
        // Settings elements
        const pageSize = document.getElementById('pageSize');
        const pageOrientation = document.getElementById('pageOrientation');
        const imageLayout = document.getElementById('imageLayout');
        const marginSize = document.getElementById('marginSize');
        const borderStyle = document.getElementById('borderStyle');
        const borderColor = document.getElementById('borderColor');
        const imageQuality = document.getElementById('imageQuality');
        const pdfName = document.getElementById('pdfName');
        
        // Store uploaded images
        let uploadedImages = [];
        
        // Event Listeners
        browseBtn.addEventListener('click', () => fileInput.click());
        fileInput.addEventListener('change', handleFileSelect);
        dropArea.addEventListener('dragover', handleDragOver);
        dropArea.addEventListener('dragleave', handleDragLeave);
        dropArea.addEventListener('drop', handleDrop);
        generateBtn.addEventListener('click', generatePDF);
        resetBtn.addEventListener('click', resetConverter);
        
        // Add event listeners to settings for real-time preview updates
        const settingsElements = [pageSize, pageOrientation, imageLayout, marginSize, borderStyle, borderColor];
        settingsElements.forEach(element => {
            element.addEventListener('change', updatePreview);
        });
        
        // Functions
        function handleDragOver(e) {
            e.preventDefault();
            dropArea.classList.add('active');
        }
        
        function handleDragLeave(e) {
            e.preventDefault();
            dropArea.classList.remove('active');
        }
        
        function handleDrop(e) {
            e.preventDefault();
            dropArea.classList.remove('active');
            
            const files = e.dataTransfer.files;
            processFiles(files);
        }
        
        function handleFileSelect(e) {
            const files = e.target.files;
            processFiles(files);
        }
        
        function processFiles(files) {
            for (let i = 0; i < files.length; i++) {
                const file = files[i];
                
                // Check if file is an image
                if (!file.type.match('image.*')) {
                    showStatus('Please upload only image files.', 'error');
                    continue;
                }
                
                // Check file size (limit to 5MB)
                if (file.size > 5 * 1024 * 1024) {
                    showStatus(`File ${file.name} is too large. Maximum size is 5MB.`, 'error');
                    continue;
                }
                
                const reader = new FileReader();
                
                reader.onload = (function(file) {
                    return function(e) {
                        const imageData = {
                            name: file.name,
                            size: formatFileSize(file.size),
                            dataUrl: e.target.result,
                            file: file
                        };
                        
                        uploadedImages.push(imageData);
                        updateImageList();
                        updatePreview();
                    };
                })(file);
                
                reader.readAsDataURL(file);
            }
        }
        
        function updateImageList() {
            imageList.innerHTML = '';
            
            if (uploadedImages.length === 0) {
                imageList.innerHTML = '<p style="text-align: center; color: #777;">No images uploaded</p>';
                return;
            }
            
            uploadedImages.forEach((image, index) => {
                const imageItem = document.createElement('div');
                imageItem.className = 'image-item';
                
                imageItem.innerHTML = `
                    <img decoding="async" src="${image.dataUrl}" alt="${image.name}" class="image-thumb">
                    <div class="image-info">
                        <div class="image-name">${image.name}</div>
                        <div class="image-size">${image.size}</div>
                    </div>
                    <div class="image-actions">
                        <button class="action-btn move-up" data-index="${index}">⬆️</button>
                        <button class="action-btn move-down" data-index="${index}">⬇️</button>
                        <button class="action-btn delete" data-index="${index}">❌</button>
                    </div>
                `;
                
                imageList.appendChild(imageItem);
            });
            
            // Add event listeners to action buttons
            document.querySelectorAll('.move-up').forEach(btn => {
                btn.addEventListener('click', moveImageUp);
            });
            
            document.querySelectorAll('.move-down').forEach(btn => {
                btn.addEventListener('click', moveImageDown);
            });
            
            document.querySelectorAll('.delete').forEach(btn => {
                btn.addEventListener('click', deleteImage);
            });
        }
        
        function moveImageUp(e) {
            const index = parseInt(e.target.getAttribute('data-index'));
            if (index > 0) {
                // Swap with previous element
                [uploadedImages[index], uploadedImages[index - 1]] = [uploadedImages[index - 1], uploadedImages[index]];
                updateImageList();
                updatePreview();
            }
        }
        
        function moveImageDown(e) {
            const index = parseInt(e.target.getAttribute('data-index'));
            if (index < uploadedImages.length - 1) {
                // Swap with next element
                [uploadedImages[index], uploadedImages[index + 1]] = [uploadedImages[index + 1], uploadedImages[index]];
                updateImageList();
                updatePreview();
            }
        }
        
        function deleteImage(e) {
            const index = parseInt(e.target.getAttribute('data-index'));
            uploadedImages.splice(index, 1);
            updateImageList();
            updatePreview();
        }
        
        function updatePreview() {
            pdfPreview.innerHTML = '';
            
            if (uploadedImages.length === 0) {
                pdfPreview.innerHTML = '<div class="no-preview"><p>Upload images to see preview</p></div>';
                return;
            }
            
            // Create preview for each image
            uploadedImages.forEach((image, index) => {
                const pageDiv = document.createElement('div');
                pageDiv.className = 'pdf-page';
                
                const img = document.createElement('img');
                img.src = image.dataUrl;
                img.alt = `Page ${index + 1}`;
                
                const pageNumber = document.createElement('div');
                pageNumber.className = 'pdf-page-number';
                pageNumber.textContent = `Page ${index + 1}`;
                
                pageDiv.appendChild(img);
                pageDiv.appendChild(pageNumber);
                pdfPreview.appendChild(pageDiv);
            });
        }
        
        function generatePDF() {
            if (uploadedImages.length === 0) {
                showStatus('Please upload at least one image to generate PDF.', 'error');
                return;
            }
            
            // Show loading indicator
            loadingIndicator.style.display = 'block';
            generateBtn.disabled = true;
            
            // Use jsPDF library for PDF generation
            const script = document.createElement('script');
            script.src = 'https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js';
            script.onload = () => {
                // Use the jsPDF library to create actual PDF with images
                createPDFWithImages();
            };
            document.head.appendChild(script);
        }
        
        function createPDFWithImages() {
            const { jsPDF } = window.jspdf;
            
            // Get PDF settings
            const pdfPageSize = pageSize.value;
            const pdfOrientation = pageOrientation.value;
            const margin = parseInt(marginSize.value);
            
            // Create new PDF document
            const doc = new jsPDF({
                orientation: pdfOrientation,
                unit: 'mm',
                format: pdfPageSize
            });
            
            let currentPage = 0;
            
            // Function to add image to PDF
            function addImageToPDF(imageIndex) {
                if (imageIndex >= uploadedImages.length) {
                    // All images processed, save the PDF
                    const pdfBlob = doc.output('blob');
                    const pdfUrl = URL.createObjectURL(pdfBlob);
                    
                    const downloadLink = document.createElement('a');
                    downloadLink.href = pdfUrl;
                    downloadLink.download = `${pdfName.value || 'converted-images'}.pdf`;
                    document.body.appendChild(downloadLink);
                    downloadLink.click();
                    document.body.removeChild(downloadLink);
                    
                    // Hide loading indicator
                    loadingIndicator.style.display = 'none';
                    generateBtn.disabled = false;
                    
                    // Show success message
                    showStatus(`PDF "${pdfName.value || 'converted-images'}.pdf" has been generated successfully!`, 'success');
                    return;
                }
                
                const imageData = uploadedImages[imageIndex];
                const img = new Image();
                img.src = imageData.dataUrl;
                
                img.onload = function() {
                    // Calculate dimensions based on settings
                    const pageWidth = doc.internal.pageSize.getWidth();
                    const pageHeight = doc.internal.pageSize.getHeight();
                    
                    let imgWidth = img.width;
                    let imgHeight = img.height;
                    
                    // Calculate aspect ratio
                    const aspectRatio = imgWidth / imgHeight;
                    
                    // Calculate available space (with margins)
                    const availableWidth = pageWidth - (2 * margin);
                    const availableHeight = pageHeight - (2 * margin);
                    
                    // Adjust image dimensions based on layout setting
                    if (imageLayout.value === 'fit') {
                        // Fit image to page while maintaining aspect ratio
                        if (imgWidth > availableWidth || imgHeight > availableHeight) {
                            if (availableWidth / aspectRatio <= availableHeight) {
                                imgWidth = availableWidth;
                                imgHeight = availableWidth / aspectRatio;
                            } else {
                                imgHeight = availableHeight;
                                imgWidth = availableHeight * aspectRatio;
                            }
                        }
                    } else if (imageLayout.value === 'stretch') {
                        // Stretch image to fill page
                        imgWidth = availableWidth;
                        imgHeight = availableHeight;
                    } else { // center
                        // Keep original size, center on page
                        if (imgWidth > availableWidth) {
                            imgWidth = availableWidth;
                            imgHeight = availableWidth / aspectRatio;
                        }
                        if (imgHeight > availableHeight) {
                            imgHeight = availableHeight;
                            imgWidth = availableHeight * aspectRatio;
                        }
                    }
                    
                    // Calculate position to center image
                    const x = margin + (availableWidth - imgWidth) / 2;
                    const y = margin + (availableHeight - imgHeight) / 2;
                    
                    // Add new page if not the first image
                    if (imageIndex > 0) {
                        doc.addPage();
                    }
                    
                    // Add border if enabled
                    if (borderStyle.value !== 'none') {
                        const borderX = x - 2;
                        const borderY = y - 2;
                        const borderWidth = imgWidth + 4;
                        const borderHeight = imgHeight + 4;
                        
                        doc.setDrawColor(borderColor.value);
                        doc.setLineWidth(1);
                        
                        if (borderStyle.value === 'dashed') {
                            // Simple dashed border (jsPDF doesn't support native dashed lines)
                            doc.setLineDashPattern([3, 3], 0);
                        } else {
                            doc.setLineDashPattern([], 0);
                        }
                        
                        doc.rect(borderX, borderY, borderWidth, borderHeight);
                    }
                    
                    // Add image to PDF
                    doc.addImage(img, 'JPEG', x, y, imgWidth, imgHeight);
                    
                    // Process next image
                    addImageToPDF(imageIndex + 1);
                };
                
                img.onerror = function() {
                    showStatus(`Error loading image: ${imageData.name}`, 'error');
                    loadingIndicator.style.display = 'none';
                    generateBtn.disabled = false;
                };
            }
            
            // Start processing images
            addImageToPDF(0);
        }
        
        function resetConverter() {
            uploadedImages = [];
            updateImageList();
            updatePreview();
            
            // Reset settings to default
            pageSize.value = 'a4';
            pageOrientation.value = 'portrait';
            imageLayout.value = 'fit';
            marginSize.value = '10';
            borderStyle.value = 'none';
            borderColor.value = '#000000';
            imageQuality.value = 'high';
            pdfName.value = 'converted-images';
            
            // Clear status message
            statusMessage.style.display = 'none';
        }
        
        function formatFileSize(bytes) {
            if (bytes === 0) return '0 Bytes';
            
            const k = 1024;
            const sizes = ['Bytes', 'KB', 'MB', 'GB'];
            const i = Math.floor(Math.log(bytes) / Math.log(k));
            
            return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
        }
        
        function showStatus(message, type) {
            statusMessage.textContent = message;
            statusMessage.className = 'status-message';
            
            if (type === 'success') {
                statusMessage.classList.add('status-success');
            } else if (type === 'error') {
                statusMessage.classList.add('status-error');
            }
            
            statusMessage.style.display = 'block';
            
            // Auto-hide after 5 seconds
            setTimeout(() => {
                statusMessage.style.display = 'none';
            }, 5000);
        }
    </script>
</body>
</html>
<div class="pvc_clear"></div><p id="pvc_stats_747" class="pvc_stats all  " data-element-id="747" style=""><i class="pvc-stats-icon large" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img decoding="async" width="16" height="16" alt="Loading" src="https://pk-360.com/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p><div class="pvc_clear"></div>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
