Do You Support Translate Images to PDF from SQL Database?

back to home  >  Tech FAQ  >  Load Images from Database and Pass them to PDF File in C#


Hi, there are some images saving in my data base. I want to know how to convert these images to PDF using your image to PDF converter? One more question, is there a limitation of the image count to convert?

---- Tony


Hi, Tony.

If the images are in the data base, you need export the images out as streams. Then pass image streams to PDF through our .NET Image to PDF Converter. And there is no limitation to the count of the converting image. You can add 100 or more image files, if you want to, then convert them to PDF document.

Now, look at the C# code below:

using System;
using System.Drawing;
using PQScan.ImageToPDF;
using System.IO;

namespace ImageToPDFQuestion
    class Program
        static void Main(string[] args)
            //first load images as stream from data base. 
            Stream[] imageStreams = GetImageFromDB();

            //then new a pdf converter 
            PDFConverter converter = new PDFConverter();
            //set pdf file name
            string pdfName = "FileFromDataBase.pdf";
            //convert image streams to pdf document
            converter.CreatePDF(imageStreams, pdfName);

Hope the C# code can be helpful.

---- pqScan Support Team

Online Demo Download Trial How to Encode QR Code with Chinese Words in C# ? How to Insert Barcode Control to MS Excel WorkSheetin C# ? How to Add Barcode Image to MS Excel in C# ? How can I Create Barcode to Crystal Report in Visual Studio ? Can I Read Barcode in PDF document using C#? Can I Get a Compression Jpeg Image from PDF ? Merge A Group of Multi-page Tiff to PDF documentusing C#? Translate JPG Image to PDF document in C#? Convert specific pages from PDF to images in C# Is it available for reading all of the barcode in a picture by one time? Question about Image Size.