Yes, you can use Debenu Quick PDF Library to generate PDF files from Microsoft Access. Below you can find sample C# code which demonstrates how this can be done. The sample demonstrates how to generate a PDF using data obtained from a Microsoft Access database. The C# sample project for this code can be downloaded from the sample projects page on the Debenu website.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using DebenuPDFLibraryDLL1011; // Copy the "DebenuPDFLibraryDLL1011.cs" file from "C:\Program Files (x86)\Debenu\PDF Library\DLL\Import" to the same folder as Program.cs
 
namespace Generate_PDF_report_from_Microsoft_Access
{
    class Program
    {
        static void Main(string[] args)
        {
            // Copy full path of *.mdb file here or copy/paste the Books.mdb file into \bin\Debug or \bin\Release
            DBHandling db = new DBHandling(@"Books.mdb");
            //Output file name will be QLPBooks.pdf
            db.WriteBooksRecordsToPDF("DQPLBooks.pdf");
        }
 
        class DBHandling
        {	// If you want to use the ActiveX edition of the library, swap
            // the two lines of code below.
            // DebenuPDFLibraryAX1011.PDFLibrary pdf = new DebenuPDFLibraryAX1011.PDFLibrary();
 
            // Copy the "DebenuPDFLibraryDLL1011.dll" file from "C:\Program Files (x86)\Debenu\PDF Library\DLL\" file into \bin\Debug or \bin\Release folders
 
            PDFLibrary DPL = new PDFLibrary("DebenuPDFLibraryDLL1011.dll");
 
            OleDbConnection OldeDbcon;
            int YPos;
 
            public DBHandling(string FilePath)
            {
                string ConStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"" + FilePath + "\";Persist Security Info=True";
                OldeDbcon = new OleDbConnection(ConStr);
            }
 
            public void WriteBooksRecordsToPDF(string PdfFileName)
            {
                DPL.UnlockKey("..."); // Insert your license key here!
                int Id = DPL.NewDocument();
 
                string Query = "SELECT * FROM Books";
 
                OleDbCommand cmd = new OleDbCommand(Query, OldeDbcon);
 
                if (OldeDbcon.State != ConnectionState.Open) OldeDbcon.Open();
                OleDbDataReader rdr;
                try
                {
                    rdr = cmd.ExecuteReader();
                    while (rdr.Read())
                    {
                        YPos = 750;
                        WriteRecord(Convert.ToInt32(rdr["ID"]), Convert.ToString(rdr["Title"]), Convert.ToString(rdr["Author"]),
                        Convert.ToString(rdr["Publisher"]), Convert.ToDouble(rdr["Price"]), Convert.ToString(rdr["ISBN"]));
                        DPL.NewPage();
                    }
                    DPL.SaveToFile(PdfFileName);
 
                }
                catch (Exception Ex)
                {
                    Console.WriteLine(Ex.ToString());
                    Console.ReadLine();
                }
                OldeDbcon.Close();
            }
 
            public void WriteRecord(int Id, string Title, string Author, string Publisher, double Price, string ISBN)
            {
                WriteBookTitle(Title); YPos -= 20;
                WriteBookAuthor(Author); WriteBookPrice(Price); YPos -= 20;
                WriteBookPublisher(Publisher); YPos -= 20;
                WriteBookISBN(ISBN);
            }
 
            public void WriteBookTitle(string Title)
            {
                DPL.AddStandardFont(8);
                DPL.SelectFont(8);
                string FontName = DPL.FontName();
                DPL.SetTextSize(20);
                DPL.DrawText(225, YPos, "Book Title " + Title);
            }
 
            public void WriteBookAuthor(string Author)
            {
                DPL.AddStandardFont(0);
                DPL.SelectFont(0);
                string FontName = DPL.FontName();
                DPL.SetTextSize(16);
                DPL.DrawText(10, YPos, "Author Name: " + Author);
            }
 
            public void WriteBookPublisher(string Publisher)
            {
                DPL.AddStandardFont(3);
                DPL.SelectFont(3);
                string FontName = DPL.FontName();
                DPL.SetTextSize(16);
                DPL.DrawText(10, YPos, "Publisher  : " + Publisher);
            }
 
            public void WriteBookPrice(double Price)
            {
                DPL.AddStandardFont(3);
                DPL.SelectFont(3);
                string FontName = DPL.FontName();
                DPL.SetTextSize(16);
                DPL.DrawText(350, YPos, "Price: " + Price.ToString() + "$");
            }
 
            public void WriteBookISBN(string ISBN)
            {
                DPL.AddStandardFont(3);
                DPL.SelectFont(3);
                string FontName = DPL.FontName();
                DPL.SetTextSize(16);
                DPL.DrawText(10, YPos, "ISIN   : " + ISBN);
            }
        }
    }
}

namespace Generate_PDF_report_from_Microsoft_Access
{
class Program
{
static void Main(string[] args)
{
// Copy full path of *.mdb file here or copy/paste the Books.mdb file into \bin\Debug or \bin\Release
DBHandling db = new DBHandling(@"Books.mdb");
//Output file name will be QLPBooks.pdf
db.WriteBooksRecordsToPDF("DQPLBooks.pdf");
}

class DBHandling
{ // If you want to use the ActiveX edition of the library, swap
// the two lines of code below.
// DebenuPDFLibraryAX1011.PDFLibrary pdf = new DebenuPDFLibraryAX1011.PDFLibrary();

// Copy the "DebenuPDFLibraryDLL1011.dll" file from "C:\Program Files (x86)\Debenu\PDF Library\DLL\" file into \bin\Debug or \bin\Release folders

PDFLibrary DPL = new PDFLibrary("DebenuPDFLibraryDLL1011.dll");

OleDbConnection OldeDbcon;
int YPos;

public DBHandling(string FilePath)
{
string ConStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"" + FilePath + "\";Persist Security Info=True";
OldeDbcon = new OleDbConnection(ConStr);
}

public void WriteBooksRecordsToPDF(string PdfFileName)
{
DPL.UnlockKey("..."); // Insert your license key here!
int Id = DPL.NewDocument();

string Query = "SELECT * FROM Books";

OleDbCommand cmd = new OleDbCommand(Query, OldeDbcon);

if (OldeDbcon.State != ConnectionState.Open) OldeDbcon.Open();
OleDbDataReader rdr;
try
{
rdr = cmd.ExecuteReader();
while (rdr.Read())
{
YPos = 750;
WriteRecord(Convert.ToInt32(rdr["ID"]), Convert.ToString(rdr["Title"]), Convert.ToString(rdr["Author"]),
Convert.ToString(rdr["Publisher"]), Convert.ToDouble(rdr["Price"]), Convert.ToString(rdr["ISBN"]));
DPL.NewPage();
}
DPL.SaveToFile(PdfFileName);

}
catch (Exception Ex)
{
Console.WriteLine(Ex.ToString());
Console.ReadLine();
}
OldeDbcon.Close();
}

public void WriteRecord(int Id, string Title, string Author, string Publisher, double Price, string ISBN)
{
WriteBookTitle(Title); YPos -= 20;
WriteBookAuthor(Author); WriteBookPrice(Price); YPos -= 20;
WriteBookPublisher(Publisher); YPos -= 20;
WriteBookISBN(ISBN);
}

public void WriteBookTitle(string Title)
{
DPL.AddStandardFont(8);
DPL.SelectFont(8);
string FontName = DPL.FontName();
DPL.SetTextSize(20);
DPL.DrawText(225, YPos, "Book Title " + Title);
}

public void WriteBookAuthor(string Author)
{
DPL.AddStandardFont(0);
DPL.SelectFont(0);
string FontName = DPL.FontName();
DPL.SetTextSize(16);
DPL.DrawText(10, YPos, "Author Name: " + Author);
}

public void WriteBookPublisher(string Publisher)
{
DPL.AddStandardFont(3);
DPL.SelectFont(3);
string FontName = DPL.FontName();
DPL.SetTextSize(16);
DPL.DrawText(10, YPos, "Publisher : " + Publisher);
}

public void WriteBookPrice(double Price)
{
DPL.AddStandardFont(3);
DPL.SelectFont(3);
string FontName = DPL.FontName();
DPL.SetTextSize(16);
DPL.DrawText(350, YPos, "Price: " + Price.ToString() + "$");
}

public void WriteBookISBN(string ISBN)
{
DPL.AddStandardFont(3);
DPL.SelectFont(3);
string FontName = DPL.FontName();
DPL.SetTextSize(16);
DPL.DrawText(10, YPos, "ISIN : " + ISBN);
}
}
}
}