Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7524457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:05:48+00:00 2026-05-30T03:05:48+00:00

I have created a report with the Eclipse BIRT plugin for Eclipse and want

  • 0

I have created a report with the Eclipse BIRT plugin for Eclipse and want to create a PDF from a console application (I use Netbeans to create this)

I have looked around the documentation but I can’t really get anything to work. How can I call BIRT to generate the PDF from the .rptdesign?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T03:05:48+00:00Added an answer on May 30, 2026 at 3:05 am

    I got most of this code from the eclipse site but I can’t seem to find it now. I commented out my implementation specific code below but the rest should be usable/editable for you. All of the imports came in the normal birt runtime. The printReport method below generates a PDF from a report url:

    import java.io.ByteArrayOutputStream;
    import java.util.Collection;
    import java.util.Iterator;
    import org.eclipse.birt.core.framework.Platform;
    import org.eclipse.birt.report.engine.api.EngineConfig;
    import org.eclipse.birt.report.engine.api.EngineException;
    import org.eclipse.birt.report.engine.api.HTMLRenderOption;
    import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTask;
    import org.eclipse.birt.report.engine.api.IParameterDefnBase;
    import org.eclipse.birt.report.engine.api.IParameterGroupDefn;
    import org.eclipse.birt.report.engine.api.IParameterSelectionChoice;
    import org.eclipse.birt.report.engine.api.IReportEngine;
    import org.eclipse.birt.report.engine.api.IReportEngineFactory;
    import org.eclipse.birt.report.engine.api.IReportRunnable;
    import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
    import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
    import org.eclipse.birt.report.engine.api.PDFRenderOption;
    
    public class BirtEngine {
    
        IReportEngine engine = null;
        EngineConfig config = null;
    
        public BirtEngine()
        {
            try {
                config = new EngineConfig( );
                config.setBIRTHome("C:\\birtruntime\\ReportEngine");
                Platform.startup( config );
                IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
                engine = factory.createReportEngine( config );
            }catch(Exception e){
                e.printStackTrace();
            }
        }
    
        public void openReport(String report)
        {
            try {
          IReportRunnable design = null;
                design = engine.openReportDesign(report);
            }catch(Exception ex){
                ex.printStackTrace();
            }
        }
    
        public void renderReport(String report)
        {
            try {
          IReportRunnable design = null;
                design = engine.openReportDesign(report);
                IRunAndRenderTask task = engine.createRunAndRenderTask(design);
                HTMLRenderOption options = new HTMLRenderOption();
                ByteArrayOutputStream bos = new ByteArrayOutputStream();
                options.setOutputStream(bos);
                options.setOutputFormat("html");
                options.setEmbeddable(true);
                task.setRenderOption(options);
                task.run();
                task.close();
                //TreeBirtFrameView.jEditorPane1.setContentType("text/html");
                //TreeBirtFrameView.jEditorPane1.setText(bos.toString());
            }catch(Exception ex){
                ex.printStackTrace();
            }
        }
    
        public void printReport(String report)
        {
            try {
          IReportRunnable design = null;
                design = engine.openReportDesign(report);
                IRunAndRenderTask task = engine.createRunAndRenderTask(design);
                PDFRenderOption options = new PDFRenderOption();
                ByteArrayOutputStream bos = new ByteArrayOutputStream();
                options.setOutputStream(bos);
                options.setOutputFormat("pdf");
                task.setRenderOption(options);
                task.run();
                task.close();
          //Runtime.getRuntime().exec("\\\\myServer\\pgms$\\Adobe\\Reader 9.0\\Reader\\acrord32.exe report.pdf");
            }catch(Exception ex){
                ex.printStackTrace();
            }
        }
    
        public void stopPlatform()
        {
            engine.destroy();
            Platform.shutdown();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created this report using BIRT and phpjavabridge <?php header(Content-type: application/pdf); header(Content-Disposition: inline;
I have a situation in BIRT reporting. A report I created is insisting on
I have created table using this command successfully create table Person( first_name varchar(25) not
SUMMARY: I have created a SSRS Report. I want to be able to supply
I am using eclipse 3.6. I created one sample plugin application. It is neither
I have created a google-app-engine java project in Eclipse using Google's Eclipse plugin. My
I have created a stored procedure for my report.. create Procedure [dbo].[sp_Score_Grade] @Month int,
I have created ASP.net Web application which uses Crystal Report to show reports. Now
I have created a report in MS Access report and write some VBA code
I have created a report in SSRS that contains 2 matrices (not tables/lists), each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.