cancel
Showing results for 
Search instead for 
Did you mean: 

pdf file to print directly using crystal report

Former Member
0 Kudos

I have a list of pdf files in the server at a specified path,

Now the crystal reports read the pdf file from the path and send it directly to printer.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

A quick Google search found this:

How to print to PDF in Windows:

  1. Open a file in a Windows application.
  2. Choose File > Print.
  3. Choose Adobe PDF as the printer in the Print dialog box.
  4. Click Print.
  5. Click OK, name the PDF file, and save it in a desired location.

And:

https://stackoverflow.com/questions/17448465/send-pdf-file-to-a-printer-print-pdf

private void SendToPrinter()
    {
        ProcessStartInfo info = new ProcessStartInfo();
        info.Verb = "print";
        info.FileName = @"c:\output.pdf";
        info.CreateNoWindow = true;
        info.WindowStyle = ProcessWindowStyle.Hidden;

        Process p = new Process();
        p.StartInfo = info;
        p.Start();

        p.WaitForInputIdle();
        System.Threading.Thread.Sleep(3000);
        if (false == p.CloseMainWindow())
            p.Kill();
    }

You likely need Adobe Reader installed to get the Adobe Printer

Don

Former Member
0 Kudos

Hi Don,

Thanks for your reply.
This application is run at server machine so we haven't install any pdf reader on server, this logic alredy rejected by client.

Thanks,
Biswa

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

Crystal doesn't "read" PDF files, but it can generate them. If you want to generate the file to PDF and print it, you'll have to run the report twice - once to save the PDF file and once to print it.

-Dell

Former Member
0 Kudos

Yes, i have used in this project Export() and PrintToPrinter() Method.

But now the last requirement is to print pdf directly using crystal report.

DellSC
Active Contributor
0 Kudos

The Crystal SDK doesn't have the functionality to do that.

-Dell

Former Member
0 Kudos

Any third party Free active x control also fine for print pdf directly.

DellSC
Active Contributor
0 Kudos

Not that I'm aware of. However, you can look here to find a good list of what's available, free and (mostly) paid.

-Dell

Former Member
0 Kudos

Any free PDF Rasterizer which can be used for print directly from PDF file. Please find below link.

https://www.tallcomponents.com/pdfrasterizer

DellSC
Active Contributor
0 Kudos

But that isn't part of the BI Platform SDK, so you'll have to figure out how to use it in conjunction with the SDK to get the functionality you're looking for.

-Dell