Home » Archived » BIRT » IHTMLImageHandler not used when rendering images embedded using <IMAGE> tag
IHTMLImageHandler not used when rendering images embedded using <IMAGE> tag [message #670841] |
Sun, 15 May 2011 16:16  |
Eclipse User |
|
|
|
Originally posted by:
Hi,
I'm using HTMLServerImageHandler to create urls for images in the
report. While this works fine for charts and Image items using embedded
images, it doesn't work when I use <IMAGE name="my_image"/> tag while
defining Text item. To be more precise, it works in web viewer but not
when I use my own code.
Here is my code (I use BIRT 2.6):
IRunAndRenderTask task = engine.createRunAndRenderTask(reportDesign);
HTMLServerImageHandler imageHandler = new HTMLServerImageHandler();
HTMLRenderOption option = new HTMLRenderOption();
option.setOutputFileName(outputFile.getAbsolutePath());
option.setBaseImageURL(baseImageUrl);
option.setImageDirectory(imageDir);
option.setImageHandler(imageHandler);
task.setRenderOption(option);
task.run();
This part of report renders correctly:
<image id="8">
<property name="source">embed</property>
<property name="imageName">my_image</property>
</image>
This does not:
<text id="9">
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<IMAGE
name="my_image"/>]]></text-property>
</text>
The HTML produced looks like this:
<img src="file:/tmp/img6647447909864980190.jpg"></img>
Why BIRT doesn't use provided image handler in this case?
What's in the web viewer's code that's not in mine? (I browsed it but
couldn't find any important difference)
Michal
|
|
| | | | |
Re: IHTMLImageHandler not used when rendering images embedded using <IMAGE> tag [message #671089 is a reply to message #671085] |
Mon, 16 May 2011 14:13   |
Eclipse User |
|
|
|
This is the code I used and it worked for me:
package REAPI;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.logging.Level;
import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.report.engine.api.EngineConfig;
import org.eclipse.birt.report.engine.api.EngineConstants;
import org.eclipse.birt.report.engine.api.EngineException;
import org.eclipse.birt.report.engine.api.HTMLActionHandler;
import org.eclipse.birt.report.engine.api.HTMLRenderOption;
import org.eclipse.birt.report.engine.api.IPDFRenderOption;
import org.eclipse.birt.report.engine.api.PDFRenderOption;
import org.eclipse.birt.report.engine.api.HTMLServerImageHandler;
import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
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.RenderOption;
import org.eclipse.birt.report.engine.api.IParameterDefnBase;
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.ReportDesignHandle;
import org.eclipse.birt.report.model.api.SlotHandle;
public class RunAndRenderTask {
public void runReport() throws EngineException
{
IRunAndRenderTask task=null;
IReportEngine engine=null;
EngineConfig config = null;
try{
//System.setProperty("java.io.tmpdir", "c:/temp/test/testsampledb");
config = new EngineConfig( );
config.setBIRTHome(" C:\\birt\\birt-runtime-2_6_2\\birt-runtime-2_6_2\\ReportEngi ne ");
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
IReportRunnable design = null;
//Open the report design
design = engine.openReportDesign("Reports/myimage.rptdesign");
//design = engine.openReportDesign("Reports/remotelib.rptdesign");
//design = engine.openReportDesign("Reports/JsInclude.rptdesign");
ReportDesignHandle rdh = (ReportDesignHandle)design.getDesignHandle();
//Create task to run and render the report,
task = engine.createRunAndRenderTask(design);
//task.setProgressMonitor(new MyProgressMonitor());
task.setLocale(new Locale("en", "US"));
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFileName("output/resample/myimage.html");
options.setOutputFormat("HTML");
options.setImageDirectory("C:\\apps\\apache-tomcat-5.5.20\\webapps\\image\\images ");
//ImageHandlerTest
// options.setImageHandler(new MyImageHandler());
options.setImageHandler(new HTMLServerImageHandler());
//options.setImageHandler(new HTMLCompleteImageHandler());
options.setBaseImageURL("http://localhost:8080/image/images/");
task.setRenderOption(options);
task.run();
task.close();
engine.destroy();
}catch( Exception ex){
ex.printStackTrace();
}
finally
{
if ( !task.getErrors( ).isEmpty( ) )
{
for ( Object e : task.getErrors( ) )
{
( (Exception) e ).printStackTrace( );
}
}
Platform.shutdown( );
System.out.println("Finished");
}
}
/**
* @param args
*/
public static void main(String[] args) {
try
{
RunAndRenderTask ex = new RunAndRenderTask( );
ex.runReport();
}
catch ( Exception e )
{
e.printStackTrace();
}
}
private class CancelReport extends Thread
{
private IRunAndRenderTask rTask;
public CancelReport( String threadName, IRunAndRenderTask task){
super(threadName);
rTask = task;
}
public void run()
{
try{
Thread.currentThread().sleep( 100 );
rTask.cancel();
System.out.println("######Report Cancelled#######");
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
}
You could look at implementing your own image handler and debugging it.
Here is an example of an imagehandler
package REAPI;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.eclipse.birt.report.engine.api.HTMLImageHandler;
import org.eclipse.birt.report.engine.api.IImage;
import org.eclipse.birt.report.engine.api.HTMLRenderOption;
import org.eclipse.birt.report.engine.api.RenderOption;
import org.eclipse.birt.report.engine.api.IRenderOption;
import org.eclipse.birt.report.engine.api.HTMLRenderContext;
import org.eclipse.birt.report.engine.api.EngineException;
import org.eclipse.birt.report.engine.api.script.IReportContext;
import org.eclipse.birt.report.engine.i18n.MessageConstants;
/**
* Default implementation for writing images in a form that is used in a
* web-application.
*/
public class MyImageHandler extends HTMLImageHandler
{
private String handlerId;
private int count = 0;
private static HashMap map = new HashMap( );
/**
* dummy constructor
*/
public MyImageHandler( )
{
String codePart = Integer.toHexString( this.hashCode( ) );
String timePart = Long.toHexString( System.currentTimeMillis( ) );
handlerId = codePart + timePart;
}
public String onDesignImage( IImage image, Object context )
{
return handleImage( image, context, "design", true ); //$NON-NLS-1$
}
public String onDocImage( IImage image, Object context )
{
// TODO Auto-generated method stub
return null;
}
public String onURLImage( IImage image, Object context )
{
assert ( image != null );
String uri = image.getID( );
if (uri.startsWith( "http:" ) || uri.startsWith( "https:" ))
{
return uri;
}
return handleImage( image, context, "uri", true ); //$NON-NLS-1$
}
public String onCustomImage( IImage image, Object context )
{
return handleImage( image, context, "custom", false ); //$NON-NLS-1$
}
/**
* returns a unique file name based on a directory and name prefix
*
* @param imageDir
* directory to store the image
* @param prefix
* prefix for the file name
* @return a file name
*/
protected String createUniqueFileName( String imageDir, String prefix )
{
return createUniqueFileName( imageDir, prefix, null );
}
/**
* creates a unique tempoary file to store an image
*
* @param imageDir
* directory to put image into
* @param prefix
* file name prefix
* @param postfix
* file name postfix
* @return a Java File Object
*/
protected String createUniqueFileName( String imageDir, String prefix,
String postfix )
{
File file = null;
postfix = ( postfix == null ? "" : postfix );
String uniCount = null;
do
{
uniCount = genUniqueCount( );
file = new File( imageDir + "/" + prefix + uniCount + postfix );
//$NON-NLS-1$
} while ( file.exists( ) );
return prefix + uniCount + postfix;
}
/**
* Generating unique string which contains following parts
* <li> the hashcode of the image handler
* <li> creation time of the image handler
* <li> image count created by the image handler
* @return return the unique count for filename
*/
synchronized private String genUniqueCount( )
{
count++;
return handlerId + count;
}
public String onFileImage( IImage image, Object context )
{
return handleImage( image, context, "file", true ); //$NON-NLS-1$
}
/**
* handles an image report item and returns an image URL
*
* @param image
* represents the image design information
* @param context
* context information
* @param prefix
* image prefix in URL
* @param needMap
* whether image map is needed
* @return URL for the image
*/
protected String handleImage( IImage image, Object context, String prefix,
boolean needMap )
{
String mapID = null;
if ( needMap )
{
mapID = getImageMapID( image );
if ( map.containsKey( mapID ) )
{
return (String) map.get( mapID );
}
}
String ret = null;
//if ( context != null && ( context instanceof HTMLRenderOption ) )
if ( context != null )
{
HTMLRenderContext myContext = (HTMLRenderContext) context;
//IRenderOption rotest = image.getRenderOption();
//HTMLRenderOption ro = (HTMLRenderOption)image.getRenderOption();
String imageURL = myContext.getBaseImageURL( );
String imageDir = myContext.getImageDirectory( );
if ( imageURL == null || imageURL.length( ) == 0
|| imageDir == null || imageDir.length( ) == 0 )
{
System.out.println("Error in image settings");
return null;
}
String fileName;
File file;
String extension = image.getExtension( );
if ( extension != null && extension.length( ) > 0 )
{
fileName = createUniqueFileName( imageDir, prefix, extension );
//$NON-NLS-1$
}
else
{
fileName = createUniqueFileName( imageDir, prefix );
}
file = new File( imageDir, fileName ); //$NON-NLS-1$
try
{
image.writeImage( file );
}
catch ( IOException e )
{
e.printStackTrace();
}
// servlet mode
if ( imageURL.indexOf( "?" ) > 0 ) //$NON-NLS-1$
{
ret = imageURL + fileName + "&specialid=test";
}
else if ( imageURL.endsWith( "/" ) ) //$NON-NLS-1$
{
ret = imageURL + fileName;
}
else
{
ret = imageURL + "/" + fileName; //$NON-NLS-1$
}
if ( needMap )
{
map.put( mapID, ret );
}
}
else
{
ret = handleTempImage( image, prefix, needMap );
}
return ret;
}
protected String handleTempImage( IImage image, String prefix,
boolean needMap )
{
try
{
File imageFile = File.createTempFile( prefix, ".img" );
image.writeImage( imageFile );
String fileName = imageFile.getAbsolutePath( );
if ( needMap )
{
String mapID = getImageMapID( image );
map.put( mapID, fileName );
}
return fileName;
}
catch ( IOException e )
{
e.printStackTrace();
}
return "unknow.img";
}
/**
* returns the unique identifier for the image
*
* @param image
* the image object
* @return the image id
*/
protected String getImageMapID( IImage image )
{
if ( image.getReportRunnable( ) != null )
{
return image.getReportRunnable( ).hashCode( ) + image.getID( );
}
return image.getID( );
}
}
Jason
On 5/16/2011 1:56 PM, Michał Tkacz wrote:
> On 05/16/2011 07:30 PM, Jason Weathersby wrote:
>> Can you try the attached report?
>>
>> Jason
>
> I can see your point. Unfortunately it didn't help, even when I changed
> png to jpg and image/png to image/jpeg (the image was jpeg).
>
> The second url still points to a file on disk whereas it should be
> generated by HTMLServerImageHandler (which unfortunately is only called
> for the first image).
>
> Somehow however it works when run from Eclipse. I'd say it's my code
> that lacks something, not the report.
>
> Michal
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.22"
>> id="1">
>> <property name="createdBy">Eclipse BIRT Designer Version
>> 2.6.2.r262_v20110209 Build <2.6.2.v20110214-1523></property>
>> <property name="units">in</property>
>> <property name="iconFile">/templates/blank_report.gif</property>
>> <property name="bidiLayoutOrientation">ltr</property>
>> <property name="imageDPI">81</property>
>> <styles>
>> <style name="report" id="4">
>> <property name="fontFamily">sans-serif</property>
>> <property name="fontSize">10pt</property>
>> </style>
>> <style name="crosstab-cell" id="5">
>> <property name="borderBottomColor">#CCCCCC</property>
>> <property name="borderBottomStyle">solid</property>
>> <property name="borderBottomWidth">1pt</property>
>> <property name="borderLeftColor">#CCCCCC</property>
>> <property name="borderLeftStyle">solid</property>
>> <property name="borderLeftWidth">1pt</property>
>> <property name="borderRightColor">#CCCCCC</property>
>> <property name="borderRightStyle">solid</property>
>> <property name="borderRightWidth">1pt</property>
>> <property name="borderTopColor">#CCCCCC</property>
>> <property name="borderTopStyle">solid</property>
>> <property name="borderTopWidth">1pt</property>
>> </style>
>> <style name="crosstab" id="6">
>> <property name="borderBottomColor">#CCCCCC</property>
>> <property name="borderBottomStyle">solid</property>
>> <property name="borderBottomWidth">1pt</property>
>> <property name="borderLeftColor">#CCCCCC</property>
>> <property name="borderLeftStyle">solid</property>
>> <property name="borderLeftWidth">1pt</property>
>> <property name="borderRightColor">#CCCCCC</property>
>> <property name="borderRightStyle">solid</property>
>> <property name="borderRightWidth">1pt</property>
>> <property name="borderTopColor">#CCCCCC</property>
>> <property name="borderTopStyle">solid</property>
>> <property name="borderTopWidth">1pt</property>
>> </style>
>> </styles>
>> <page-setup>
>> <simple-master-page name="Simple MasterPage" id="2">
>> <page-footer>
>> <text id="3">
>> <property name="contentType">html</property>
>> <text-property name="content"><![CDATA[<value-of>new
>> Date()</value-of>]]></text-property>
>> </text>
>> </page-footer>
>> </simple-master-page>
>> </page-setup>
>> <body>
>> <label id="7">
>> <text-property name="text">This works:</text-property>
>> </label>
>> <image id="8">
>> <property name="source">embed</property>
>> <property name="imageName">my_image.png</property>
>> </image>
>> <label id="10">
>> <text-property name="text">This does not:</text-property>
>> </label>
>> <text id="9">
>> <property name="contentType">html</property>
>> <text-property name="content"><![CDATA[<IMAGE
>> name="my_image.png"/>]]></text-property>
>> </text>
>> </body>
>> <list-property name="images">
>> <structure>
>> <property name="name">my_image.png</property>
>> <property name="type">image/png</property>
>> <property name="data">
>>
>> /9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAZAAA/+4ADkFk b2JlAGTAAAAAAf/bAIQA
>>
>>
>>
>> AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQIC AgICAgICAgICAwMDAwMD
>>
>>
>>
>> AwMDAwEBAQEBAQECAQECAgIBAgIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMD AwMDAwMDAwMDAwMDAwMD
>>
>>
>>
>> AwMDAwMDAwMD/8AAEQgASABIAwERAAIRAQMRAf/EAJgAAQAABgMBAQAAAAAA AAAAAAACBAYHCAkBBQoD
>>
>>
>>
>> CwEBAAIDAQEAAAAAAAAAAAAAAAEEAgUGAwcQAAAGAgIBAwIEBwEAAAAAAAEC AwQFBgAHEQgSIRMUMUFR
>>
>>
>>
>> cdEJkbHBIjIWChgRAAICAQMCBAQEAwkAAAAAAAECABEDIRIEMQVBUWET8IEi FHGRMgahwdGx4fFCYnIj
>>
>>
>>
>> MxX/2gAMAwEAAhEDEQA/APfxiIxEYiMRGIjERiIxEYiMRGIjERiIxEYiMRGI jERiIxEfT1H0xEllHaCX
>>
>>
>>
>> +RwAfzzIKTE+JZJqYeAUL/EP6ZPtvV1IuThFCKByUwDmJBEmR5ERiIxEYiSj x80j0fkv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9Mp5MzPManfgAFDgA4DPCTOcRGIjERiI xEYiMRGIjERiIxEYiMRG
>>
>>
>> IjERiIxEYiMRGIn/2Q==
>> </property>
>> </structure>
>> </list-property>
>> </report>
>>
>>
>>
>>
>> On 5/16/2011 1:02 PM, Michał Tkacz wrote:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.22"
>>> id="1">
>>> <property name="createdBy">Eclipse BIRT Designer Version
>>> 2.6.2.r262_v20110209 Build <2.6.2.v20110214-1523></property>
>>> <property name="units">in</property>
>>> <property name="iconFile">/templates/blank_report.gif</property>
>>> <property name="bidiLayoutOrientation">ltr</property>
>>> <property name="imageDPI">81</property>
>>> <styles>
>>> <style name="report" id="4">
>>> <property name="fontFamily">sans-serif</property>
>>> <property name="fontSize">10pt</property>
>>> </style>
>>> <style name="crosstab-cell" id="5">
>>> <property name="borderBottomColor">#CCCCCC</property>
>>> <property name="borderBottomStyle">solid</property>
>>> <property name="borderBottomWidth">1pt</property>
>>> <property name="borderLeftColor">#CCCCCC</property>
>>> <property name="borderLeftStyle">solid</property>
>>> <property name="borderLeftWidth">1pt</property>
>>> <property name="borderRightColor">#CCCCCC</property>
>>> <property name="borderRightStyle">solid</property>
>>> <property name="borderRightWidth">1pt</property>
>>> <property name="borderTopColor">#CCCCCC</property>
>>> <property name="borderTopStyle">solid</property>
>>> <property name="borderTopWidth">1pt</property>
>>> </style>
>>> <style name="crosstab" id="6">
>>> <property name="borderBottomColor">#CCCCCC</property>
>>> <property name="borderBottomStyle">solid</property>
>>> <property name="borderBottomWidth">1pt</property>
>>> <property name="borderLeftColor">#CCCCCC</property>
>>> <property name="borderLeftStyle">solid</property>
>>> <property name="borderLeftWidth">1pt</property>
>>> <property name="borderRightColor">#CCCCCC</property>
>>> <property name="borderRightStyle">solid</property>
>>> <property name="borderRightWidth">1pt</property>
>>> <property name="borderTopColor">#CCCCCC</property>
>>> <property name="borderTopStyle">solid</property>
>>> <property name="borderTopWidth">1pt</property>
>>> </style>
>>> </styles>
>>> <page-setup>
>>> <simple-master-page name="Simple MasterPage" id="2">
>>> <page-footer>
>>> <text id="3">
>>> <property name="contentType">html</property>
>>> <text-property name="content"><![CDATA[<value-of>new
>>> Date()</value-of>]]></text-property>
>>> </text>
>>> </page-footer>
>>> </simple-master-page>
>>> </page-setup>
>>> <body>
>>> <label id="7">
>>> <text-property name="text">This works:</text-property>
>>> </label>
>>> <image id="8">
>>> <property name="source">embed</property>
>>> <property name="imageName">my_image</property>
>>> </image>
>>> <label id="10">
>>> <text-property name="text">This does not:</text-property>
>>> </label>
>>> <text id="9">
>>> <property name="contentType">html</property>
>>> <text-property name="content"><![CDATA[<IMAGE
>>> name="my_image"/>]]></text-property>
>>> </text>
>>> </body>
>>> <list-property name="images">
>>> <structure>
>>> <property name="name">my_image</property>
>>> <property name="data">
>>>
>>> /9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAZAAA/+4ADkFk b2JlAGTAAAAAAf/bAIQA
>>>
>>>
>>>
>>>
>>> AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQIC AgICAgICAgICAwMDAwMD
>>>
>>>
>>>
>>>
>>> AwMDAwEBAQEBAQECAQECAgIBAgIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMD AwMDAwMDAwMDAwMDAwMD
>>>
>>>
>>>
>>>
>>> AwMDAwMDAwMD/8AAEQgASABIAwERAAIRAQMRAf/EAJgAAQAABgMBAQAAAAAA AAAAAAACBAYHCAkBBQoD
>>>
>>>
>>>
>>>
>>> CwEBAAIDAQEAAAAAAAAAAAAAAAEEAgUGAwcQAAAGAgIBAwIEBwEAAAAAAAEC AwQFBgAHEQgSIRMUMUFR
>>>
>>>
>>>
>>>
>>> cdEJkbHBIjIWChgRAAICAQMCBAQEAwkAAAAAAAECABEDIRIEMQVBUWET8IEi FHGRMgahwdGx4fFCYnIj
>>>
>>>
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CYQjUUnKMs/
>>>
>>>
>>>
>>>
>>> Kcr+URKQCooyL4FB95YpAUVH1MIj65UfuHMyIcbZGKEVXp4SNqjw1l2yJkTD ghQAMpkk9ZlI8iJCcTFI
>>>
>>>
>>>
>>>
>>> YSE8zAA+JOQL5G+wCYfQoCP1H7ZI669IlLjV2qwv30gUsjKyCQJLOFCgBEWi QidCKYlEB+PHpHETCX6q
>>>
>>>
>>>
>>>
>>> qmFQ4iIgAWPuGAVE+nGv8T4k+v8AYNBJRmRtwOsocNXMGQlOyUcN1hE51l2q yjdVZZZUy7hUxkTJiPuL
>>>
>>>
>>>
>>>
>>> qGMHr6BwH2yz9+7fqA2+XkPKW/vs5H1UT+EmyUn3Tpi5UcOvaH+z5ThdyJfy Fwoqbj1/HnJPM0oUPkJU
>>>
>>>
>>>
>>>
>>> di5s/wBJW8ZBt2JSgBCh48enAfbj9Mp5MzPManfgAFDgA4DPCTOcRGIjERiI xEYiMRGIjERiIxEYiMRG
>>>
>>>
>>>
>>> IjERiIxEYiMRGIn/2Q==
>>> </property>
>>> </structure>
>>> </list-property>
>>> </report>
>>
>
|
|
|
Re: IHTMLImageHandler not used when rendering images embedded using <IMAGE> tag [message #671090 is a reply to message #671085] |
Mon, 16 May 2011 14:13   |
Eclipse User |
|
|
|
This is the code I used and it worked for me:
package REAPI;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.logging.Level;
import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.report.engine.api.EngineConfig;
import org.eclipse.birt.report.engine.api.EngineConstants;
import org.eclipse.birt.report.engine.api.EngineException;
import org.eclipse.birt.report.engine.api.HTMLActionHandler;
import org.eclipse.birt.report.engine.api.HTMLRenderOption;
import org.eclipse.birt.report.engine.api.IPDFRenderOption;
import org.eclipse.birt.report.engine.api.PDFRenderOption;
import org.eclipse.birt.report.engine.api.HTMLServerImageHandler;
import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
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.RenderOption;
import org.eclipse.birt.report.engine.api.IParameterDefnBase;
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.ReportDesignHandle;
import org.eclipse.birt.report.model.api.SlotHandle;
public class RunAndRenderTask {
public void runReport() throws EngineException
{
IRunAndRenderTask task=null;
IReportEngine engine=null;
EngineConfig config = null;
try{
//System.setProperty("java.io.tmpdir", "c:/temp/test/testsampledb");
config = new EngineConfig( );
config.setBIRTHome(" C:\\birt\\birt-runtime-2_6_2\\birt-runtime-2_6_2\\ReportEngi ne ");
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
IReportRunnable design = null;
//Open the report design
design = engine.openReportDesign("Reports/myimage.rptdesign");
//design = engine.openReportDesign("Reports/remotelib.rptdesign");
//design = engine.openReportDesign("Reports/JsInclude.rptdesign");
ReportDesignHandle rdh = (ReportDesignHandle)design.getDesignHandle();
//Create task to run and render the report,
task = engine.createRunAndRenderTask(design);
//task.setProgressMonitor(new MyProgressMonitor());
task.setLocale(new Locale("en", "US"));
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFileName("output/resample/myimage.html");
options.setOutputFormat("HTML");
options.setImageDirectory("C:\\apps\\apache-tomcat-5.5.20\\webapps\\image\\images ");
//ImageHandlerTest
// options.setImageHandler(new MyImageHandler());
options.setImageHandler(new HTMLServerImageHandler());
//options.setImageHandler(new HTMLCompleteImageHandler());
options.setBaseImageURL("http://localhost:8080/image/images/");
task.setRenderOption(options);
task.run();
task.close();
engine.destroy();
}catch( Exception ex){
ex.printStackTrace();
}
finally
{
if ( !task.getErrors( ).isEmpty( ) )
{
for ( Object e : task.getErrors( ) )
{
( (Exception) e ).printStackTrace( );
}
}
Platform.shutdown( );
System.out.println("Finished");
}
}
/**
* @param args
*/
public static void main(String[] args) {
try
{
RunAndRenderTask ex = new RunAndRenderTask( );
ex.runReport();
}
catch ( Exception e )
{
e.printStackTrace();
}
}
private class CancelReport extends Thread
{
private IRunAndRenderTask rTask;
public CancelReport( String threadName, IRunAndRenderTask task){
super(threadName);
rTask = task;
}
public void run()
{
try{
Thread.currentThread().sleep( 100 );
rTask.cancel();
System.out.println("######Report Cancelled#######");
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
}
You could look at implementing your own image handler and debugging it.
Here is an example of an imagehandler
package REAPI;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.eclipse.birt.report.engine.api.HTMLImageHandler;
import org.eclipse.birt.report.engine.api.IImage;
import org.eclipse.birt.report.engine.api.HTMLRenderOption;
import org.eclipse.birt.report.engine.api.RenderOption;
import org.eclipse.birt.report.engine.api.IRenderOption;
import org.eclipse.birt.report.engine.api.HTMLRenderContext;
import org.eclipse.birt.report.engine.api.EngineException;
import org.eclipse.birt.report.engine.api.script.IReportContext;
import org.eclipse.birt.report.engine.i18n.MessageConstants;
/**
* Default implementation for writing images in a form that is used in a
* web-application.
*/
public class MyImageHandler extends HTMLImageHandler
{
private String handlerId;
private int count = 0;
private static HashMap map = new HashMap( );
/**
* dummy constructor
*/
public MyImageHandler( )
{
String codePart = Integer.toHexString( this.hashCode( ) );
String timePart = Long.toHexString( System.currentTimeMillis( ) );
handlerId = codePart + timePart;
}
public String onDesignImage( IImage image, Object context )
{
return handleImage( image, context, "design", true ); //$NON-NLS-1$
}
public String onDocImage( IImage image, Object context )
{
// TODO Auto-generated method stub
return null;
}
public String onURLImage( IImage image, Object context )
{
assert ( image != null );
String uri = image.getID( );
if (uri.startsWith( "http:" ) || uri.startsWith( "https:" ))
{
return uri;
}
return handleImage( image, context, "uri", true ); //$NON-NLS-1$
}
public String onCustomImage( IImage image, Object context )
{
return handleImage( image, context, "custom", false ); //$NON-NLS-1$
}
/**
* returns a unique file name based on a directory and name prefix
*
* @param imageDir
* directory to store the image
* @param prefix
* prefix for the file name
* @return a file name
*/
protected String createUniqueFileName( String imageDir, String prefix )
{
return createUniqueFileName( imageDir, prefix, null );
}
/**
* creates a unique tempoary file to store an image
*
* @param imageDir
* directory to put image into
* @param prefix
* file name prefix
* @param postfix
* file name postfix
* @return a Java File Object
*/
protected String createUniqueFileName( String imageDir, String prefix,
String postfix )
{
File file = null;
postfix = ( postfix == null ? "" : postfix );
String uniCount = null;
do
{
uniCount = genUniqueCount( );
file = new File( imageDir + "/" + prefix + uniCount + postfix );
//$NON-NLS-1$
} while ( file.exists( ) );
return prefix + uniCount + postfix;
}
/**
* Generating unique string which contains following parts
* <li> the hashcode of the image handler
* <li> creation time of the image handler
* <li> image count created by the image handler
* @return return the unique count for filename
*/
synchronized private String genUniqueCount( )
{
count++;
return handlerId + count;
}
public String onFileImage( IImage image, Object context )
{
return handleImage( image, context, "file", true ); //$NON-NLS-1$
}
/**
* handles an image report item and returns an image URL
*
* @param image
* represents the image design information
* @param context
* context information
* @param prefix
* image prefix in URL
* @param needMap
* whether image map is needed
* @return URL for the image
*/
protected String handleImage( IImage image, Object context, String prefix,
boolean needMap )
{
String mapID = null;
if ( needMap )
{
mapID = getImageMapID( image );
if ( map.containsKey( mapID ) )
{
return (String) map.get( mapID );
}
}
String ret = null;
//if ( context != null && ( context instanceof HTMLRenderOption ) )
if ( context != null )
{
HTMLRenderContext myContext = (HTMLRenderContext) context;
//IRenderOption rotest = image.getRenderOption();
//HTMLRenderOption ro = (HTMLRenderOption)image.getRenderOption();
String imageURL = myContext.getBaseImageURL( );
String imageDir = myContext.getImageDirectory( );
if ( imageURL == null || imageURL.length( ) == 0
|| imageDir == null || imageDir.length( ) == 0 )
{
System.out.println("Error in image settings");
return null;
}
String fileName;
File file;
String extension = image.getExtension( );
if ( extension != null && extension.length( ) > 0 )
{
fileName = createUniqueFileName( imageDir, prefix, extension );
//$NON-NLS-1$
}
else
{
fileName = createUniqueFileName( imageDir, prefix );
}
file = new File( imageDir, fileName ); //$NON-NLS-1$
try
{
image.writeImage( file );
}
catch ( IOException e )
{
e.printStackTrace();
}
// servlet mode
if ( imageURL.indexOf( "?" ) > 0 ) //$NON-NLS-1$
{
ret = imageURL + fileName + "&specialid=test";
}
else if ( imageURL.endsWith( "/" ) ) //$NON-NLS-1$
{
ret = imageURL + fileName;
}
else
{
ret = imageURL + "/" + fileName; //$NON-NLS-1$
}
if ( needMap )
{
map.put( mapID, ret );
}
}
else
{
ret = handleTempImage( image, prefix, needMap );
}
return ret;
}
protected String handleTempImage( IImage image, String prefix,
boolean needMap )
{
try
{
File imageFile = File.createTempFile( prefix, ".img" );
image.writeImage( imageFile );
String fileName = imageFile.getAbsolutePath( );
if ( needMap )
{
String mapID = getImageMapID( image );
map.put( mapID, fileName );
}
return fileName;
}
catch ( IOException e )
{
e.printStackTrace();
}
return "unknow.img";
}
/**
* returns the unique identifier for the image
*
* @param image
* the image object
* @return the image id
*/
protected String getImageMapID( IImage image )
{
if ( image.getReportRunnable( ) != null )
{
return image.getReportRunnable( ).hashCode( ) + image.getID( );
}
return image.getID( );
}
}
Jason
On 5/16/2011 1:56 PM, Michał Tkacz wrote:
> On 05/16/2011 07:30 PM, Jason Weathersby wrote:
>> Can you try the attached report?
>>
>> Jason
>
> I can see your point. Unfortunately it didn't help, even when I changed
> png to jpg and image/png to image/jpeg (the image was jpeg).
>
> The second url still points to a file on disk whereas it should be
> generated by HTMLServerImageHandler (which unfortunately is only called
> for the first image).
>
> Somehow however it works when run from Eclipse. I'd say it's my code
> that lacks something, not the report.
>
> Michal
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.22"
>> id="1">
>> <property name="createdBy">Eclipse BIRT Designer Version
>> 2.6.2.r262_v20110209 Build <2.6.2.v20110214-1523></property>
>> <property name="units">in</property>
>> <property name="iconFile">/templates/blank_report.gif</property>
>> <property name="bidiLayoutOrientation">ltr</property>
>> <property name="imageDPI">81</property>
>> <styles>
>> <style name="report" id="4">
>> <property name="fontFamily">sans-serif</property>
>> <property name="fontSize">10pt</property>
>> </style>
>> <style name="crosstab-cell" id="5">
>> <property name="borderBottomColor">#CCCCCC</property>
>> <property name="borderBottomStyle">solid</property>
>> <property name="borderBottomWidth">1pt</property>
>> <property name="borderLeftColor">#CCCCCC</property>
>> <property name="borderLeftStyle">solid</property>
>> <property name="borderLeftWidth">1pt</property>
>> <property name="borderRightColor">#CCCCCC</property>
>> <property name="borderRightStyle">solid</property>
>> <property name="borderRightWidth">1pt</property>
>> <property name="borderTopColor">#CCCCCC</property>
>> <property name="borderTopStyle">solid</property>
>> <property name="borderTopWidth">1pt</property>
>> </style>
>> <style name="crosstab" id="6">
>> <property name="borderBottomColor">#CCCCCC</property>
>> <property name="borderBottomStyle">solid</property>
>> <property name="borderBottomWidth">1pt</property>
>> <property name="borderLeftColor">#CCCCCC</property>
>> <property name="borderLeftStyle">solid</property>
>> <property name="borderLeftWidth">1pt</property>
>> <property name="borderRightColor">#CCCCCC</property>
>> <property name="borderRightStyle">solid</property>
>> <property name="borderRightWidth">1pt</property>
>> <property name="borderTopColor">#CCCCCC</property>
>> <property name="borderTopStyle">solid</property>
>> <property name="borderTopWidth">1pt</property>
>> </style>
>> </styles>
>> <page-setup>
>> <simple-master-page name="Simple MasterPage" id="2">
>> <page-footer>
>> <text id="3">
>> <property name="contentType">html</property>
>> <text-property name="content"><![CDATA[<value-of>new
>> Date()</value-of>]]></text-property>
>> </text>
>> </page-footer>
>> </simple-master-page>
>> </page-setup>
>> <body>
>> <label id="7">
>> <text-property name="text">This works:</text-property>
>> </label>
>> <image id="8">
>> <property name="source">embed</property>
>> <property name="imageName">my_image.png</property>
>> </image>
>> <label id="10">
>> <text-property name="text">This does not:</text-property>
>> </label>
>> <text id="9">
>> <property name="contentType">html</property>
>> <text-property name="content"><![CDATA[<IMAGE
>> name="my_image.png"/>]]></text-property>
>> </text>
>> </body>
>> <list-property name="images">
>> <structure>
>> <property name="name">my_image.png</property>
>> <property name="type">image/png</property>
>> <property name="data">
>>
>> /9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAZAAA/+4ADkFk b2JlAGTAAAAAAf/bAIQA
>>
>>
>>
>> AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQIC AgICAgICAgICAwMDAwMD
>>
>>
>>
>> AwMDAwEBAQEBAQECAQECAgIBAgIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMD AwMDAwMDAwMDAwMDAwMD
>>
>>
>>
>> AwMDAwMDAwMD/8AAEQgASABIAwERAAIRAQMRAf/EAJgAAQAABgMBAQAAAAAA AAAAAAACBAYHCAkBBQoD
>>
>>
>>
>> CwEBAAIDAQEAAAAAAAAAAAAAAAEEAgUGAwcQAAAGAgIBAwIEBwEAAAAAAAEC AwQFBgAHEQgSIRMUMUFR
>>
>>
>>
>> cdEJkbHBIjIWChgRAAICAQMCBAQEAwkAAAAAAAECABEDIRIEMQVBUWET8IEi FHGRMgahwdGx4fFCYnIj
>>
>>
>>
>> MxX/2gAMAwEAAhEDEQA/APfxiIxEYiMRGIjERiIxEYiMRGIjERiIxEYiMRGI jERiIxEfT1H0xEllHaCX
>>
>>
>>
>> +RwAfzzIKTE+JZJqYeAUL/EP6ZPtvV1IuThFCKByUwDmJBEmR5ERiIxEYiSj x80j0fkvV02rcDFIdwsI
>>
>>
>>
>> kQSE3PiZdYQ9tBMRDjzOJS+QgHPIgA5Ij5G2oLbyHX5Dx+USnH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q==
>> </property>
>> </structure>
>> </list-property>
>> </report>
>>
>>
>>
>>
>> On 5/16/2011 1:02 PM, Michał Tkacz wrote:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.22"
>>> id="1">
>>> <property name="createdBy">Eclipse BIRT Designer Version
>>> 2.6.2.r262_v20110209 Build <2.6.2.v20110214-1523></property>
>>> <property name="units">in</property>
>>> <property name="iconFile">/templates/blank_report.gif</property>
>>> <property name="bidiLayoutOrientation">ltr</property>
>>> <property name="imageDPI">81</property>
>>> <styles>
>>> <style name="report" id="4">
>>> <property name="fontFamily">sans-serif</property>
>>> <property name="fontSize">10pt</property>
>>> </style>
>>> <style name="crosstab-cell" id="5">
>>> <property name="borderBottomColor">#CCCCCC</property>
>>> <property name="borderBottomStyle">solid</property>
>>> <property name="borderBottomWidth">1pt</property>
>>> <property name="borderLeftColor">#CCCCCC</property>
>>> <property name="borderLeftStyle">solid</property>
>>> <property name="borderLeftWidth">1pt</property>
>>> <property name="borderRightColor">#CCCCCC</property>
>>> <property name="borderRightStyle">solid</property>
>>> <property name="borderRightWidth">1pt</property>
>>> <property name="borderTopColor">#CCCCCC</property>
>>> <property name="borderTopStyle">solid</property>
>>> <property name="borderTopWidth">1pt</property>
>>> </style>
>>> <style name="crosstab" id="6">
>>> <property name="borderBottomColor">#CCCCCC</property>
>>> <property name="borderBottomStyle">solid</property>
>>> <property name="borderBottomWidth">1pt</property>
>>> <property name="borderLeftColor">#CCCCCC</property>
>>> <property name="borderLeftStyle">solid</property>
>>> <property name="borderLeftWidth">1pt</property>
>>> <property name="borderRightColor">#CCCCCC</property>
>>> <property name="borderRightStyle">solid</property>
>>> <property name="borderRightWidth">1pt</property>
>>> <property name="borderTopColor">#CCCCCC</property>
>>> <property name="borderTopStyle">solid</property>
>>> <property name="borderTopWidth">1pt</property>
>>> </style>
>>> </styles>
>>> <page-setup>
>>> <simple-master-page name="Simple MasterPage" id="2">
>>> <page-footer>
>>> <text id="3">
>>> <property name="contentType">html</property>
>>> <text-property name="content"><![CDATA[<value-of>new
>>> Date()</value-of>]]></text-property>
>>> </text>
>>> </page-footer>
>>> </simple-master-page>
>>> </page-setup>
>>> <body>
>>> <label id="7">
>>> <text-property name="text">This works:</text-property>
>>> </label>
>>> <image id="8">
>>> <property name="source">embed</property>
>>> <property name="imageName">my_image</property>
>>> </image>
>>> <label id="10">
>>> <text-property name="text">This does not:</text-property>
>>> </label>
>>> <text id="9">
>>> <property name="contentType">html</property>
>>> <text-property name="content"><![CDATA[<IMAGE
>>> name="my_image"/>]]></text-property>
>>> </text>
>>> </body>
>>> <list-property name="images">
>>> <structure>
>>> <property name="name">my_image</property>
>>> <property name="data">
>>>
>>> /9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAZAAA/+4ADkFk b2JlAGTAAAAAAf/bAIQA
>>>
>>>
>>>
>>>
>>> AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQIC AgICAgICAgICAwMDAwMD
>>>
>>>
>>>
>>>
>>> AwMDAwEBAQEBAQECAQECAgIBAgIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMD AwMDAwMDAwMDAwMDAwMD
>>>
>>>
>>>
>>>
>>> AwMDAwMDAwMD/8AAEQgASABIAwERAAIRAQMRAf/EAJgAAQAABgMBAQAAAAAA AAAAAAACBAYHCAkBBQoD
>>>
>>>
>>>
>>>
>>> CwEBAAIDAQEAAAAAAAAAAAAAAAEEAgUGAwcQAAAGAgIBAwIEBwEAAAAAAAEC AwQFBgAHEQgSIRMUMUFR
>>>
>>>
>>>
>>>
>>> cdEJkbHBIjIWChgRAAICAQMCBAQEAwkAAAAAAAECABEDIRIEMQVBUWET8IEi FHGRMgahwdGx4fFCYnIj
>>>
>>>
>>>
>>>
>>> MxX/2gAMAwEAAhEDEQA/APfxiIxEYiMRGIjERiIxEYiMRGIjERiIxEYiMRGI jERiIxEf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SNqjw1l2yJkTD ghQAMpkk9ZlI8iJCcTFI
>>>
>>>
>>>
>>>
>>> YSE8zAA+JOQL5G+wCYfQoCP1H7ZI669IlLjV2qwv30gUsjKyCQJLOFCgBEWi QidCKYlEB+PHpHETCX6q
>>>
>>>
>>>
>>>
>>> qmFQ4iIgAWPuGAVE+nGv8T4k+v8AYNBJRmRtwOsocNXMGQlOyUcN1hE51l2q yjdVZZZUy7hUxkTJiPuL
>>>
>>>
>>>
>>>
>>> qGMHr6BwH2yz9+7fqA2+XkPKW/vs5H1UT+EmyUn3Tpi5UcOvaH+z5ThdyJfy Fwoqbj1/HnJPM0oUPkJU
>>>
>>>
>>>
>>>
>>> di5s/wBJW8ZBt2JSgBCh48enAfbj9Mp5MzPManfgAFDgA4DPCTOcRGIjERiI xEYiMRGIjERiIxEYiMRG
>>>
>>>
>>>
>>> IjERiIxEYiMRGIn/2Q==
>>> </property>
>>> </structure>
>>> </list-property>
>>> </report>
>>
>
|
|
|
Re: IHTMLImageHandler not used when rendering images embedded using <IMAGE> tag [message #671138 is a reply to message #671089] |
Mon, 16 May 2011 17:04  |
Eclipse User |
|
|
|
Originally posted by:
Debugging your code I discovered that the IResourceLocator
implementation I use (that I thought was not worth mentioning) was
incomplete. Everything works now.
Thanks for help!
Michal
On 05/16/2011 08:13 PM, Jason Weathersby wrote:
> This is the code I used and it worked for me:
>
>
> package REAPI;
>
>
>
> import java.io.ByteArrayOutputStream;
> import java.io.InputStream;
> import java.util.Collection;
> import java.util.HashMap;
> import java.util.Iterator;
> import java.util.List;
> import java.util.Locale;
> import java.util.Map;
> import java.util.logging.Level;
>
> import org.eclipse.birt.core.framework.Platform;
> import org.eclipse.birt.report.engine.api.EngineConfig;
> import org.eclipse.birt.report.engine.api.EngineConstants;
> import org.eclipse.birt.report.engine.api.EngineException;
> import org.eclipse.birt.report.engine.api.HTMLActionHandler;
> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
> import org.eclipse.birt.report.engine.api.IPDFRenderOption;
> import org.eclipse.birt.report.engine.api.PDFRenderOption;
>
> import org.eclipse.birt.report.engine.api.HTMLServerImageHandler;
> import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
> import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
> 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.RenderOption;
>
> import org.eclipse.birt.report.engine.api.IParameterDefnBase;
> import org.eclipse.birt.report.model.api.DesignElementHandle;
> import org.eclipse.birt.report.model.api.ReportDesignHandle;
> import org.eclipse.birt.report.model.api.SlotHandle;
>
>
> public class RunAndRenderTask {
>
> public void runReport() throws EngineException
> {
>
> IRunAndRenderTask task=null;
> IReportEngine engine=null;
> EngineConfig config = null;
>
> try{
> //System.setProperty("java.io.tmpdir", "c:/temp/test/testsampledb");
> config = new EngineConfig( );
> config.setBIRTHome(" C:\\birt\\birt-runtime-2_6_2\\birt-runtime-2_6_2\\ReportEngi ne ");
>
> Platform.startup( config );
>
> IReportEngineFactory factory = (IReportEngineFactory) Platform
> .createFactoryObject(
> IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
> engine = factory.createReportEngine( config );
> IReportRunnable design = null;
> //Open the report design
> design = engine.openReportDesign("Reports/myimage.rptdesign");
>
> //design = engine.openReportDesign("Reports/remotelib.rptdesign");
> //design = engine.openReportDesign("Reports/JsInclude.rptdesign");
> ReportDesignHandle rdh = (ReportDesignHandle)design.getDesignHandle();
>
> //Create task to run and render the report,
> task = engine.createRunAndRenderTask(design);
> //task.setProgressMonitor(new MyProgressMonitor());
> task.setLocale(new Locale("en", "US"));
>
>
> HTMLRenderOption options = new HTMLRenderOption();
> options.setOutputFileName("output/resample/myimage.html");
> options.setOutputFormat("HTML");
>
> options.setImageDirectory("C:\\apps\\apache-tomcat-5.5.20\\webapps\\image\\images ");
>
>
> //ImageHandlerTest
> // options.setImageHandler(new MyImageHandler());
> options.setImageHandler(new HTMLServerImageHandler());
> //options.setImageHandler(new HTMLCompleteImageHandler());
> options.setBaseImageURL("http://localhost:8080/image/images/");
> task.setRenderOption(options);
> task.run();
>
> task.close();
> engine.destroy();
> }catch( Exception ex){
> ex.printStackTrace();
> }
> finally
> {
> if ( !task.getErrors( ).isEmpty( ) )
>
> {
>
> for ( Object e : task.getErrors( ) )
>
> {
>
> ( (Exception) e ).printStackTrace( );
>
> }
>
> }
> Platform.shutdown( );
> System.out.println("Finished");
> }
>
> }
>
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> try
> {
>
> RunAndRenderTask ex = new RunAndRenderTask( );
> ex.runReport();
>
> }
> catch ( Exception e )
> {
> e.printStackTrace();
> }
> }
> private class CancelReport extends Thread
> {
> private IRunAndRenderTask rTask;
> public CancelReport( String threadName, IRunAndRenderTask task){
> super(threadName);
> rTask = task;
>
> }
> public void run()
> {
> try{
> Thread.currentThread().sleep( 100 );
> rTask.cancel();
> System.out.println("######Report Cancelled#######");
>
> }
> catch(Exception e)
> {
> e.printStackTrace();
> }
> }
> }
>
>
> }
>
>
> You could look at implementing your own image handler and debugging it.
> Here is an example of an imagehandler
>
> package REAPI;
>
>
> import java.io.File;
> import java.io.FileInputStream;
> import java.io.IOException;
> import java.io.InputStream;
> import java.io.OutputStream;
> import java.util.HashMap;
> import java.util.logging.Level;
> import java.util.logging.Logger;
> import org.eclipse.birt.report.engine.api.HTMLImageHandler;
> import org.eclipse.birt.report.engine.api.IImage;
> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
> import org.eclipse.birt.report.engine.api.RenderOption;
>
> import org.eclipse.birt.report.engine.api.IRenderOption;
> import org.eclipse.birt.report.engine.api.HTMLRenderContext;
>
> import org.eclipse.birt.report.engine.api.EngineException;
>
>
> import org.eclipse.birt.report.engine.api.script.IReportContext;
>
>
> import org.eclipse.birt.report.engine.i18n.MessageConstants;
>
> /**
> * Default implementation for writing images in a form that is used in a
> * web-application.
> */
> public class MyImageHandler extends HTMLImageHandler
> {
>
> private String handlerId;
> private int count = 0;
>
> private static HashMap map = new HashMap( );
>
> /**
> * dummy constructor
> */
> public MyImageHandler( )
> {
> String codePart = Integer.toHexString( this.hashCode( ) );
> String timePart = Long.toHexString( System.currentTimeMillis( ) );
> handlerId = codePart + timePart;
> }
>
> public String onDesignImage( IImage image, Object context )
> {
> return handleImage( image, context, "design", true ); //$NON-NLS-1$
> }
>
>
> public String onDocImage( IImage image, Object context )
> {
> // TODO Auto-generated method stub
> return null;
> }
>
> public String onURLImage( IImage image, Object context )
> {
> assert ( image != null );
> String uri = image.getID( );
> if (uri.startsWith( "http:" ) || uri.startsWith( "https:" ))
> {
> return uri;
> }
> return handleImage( image, context, "uri", true ); //$NON-NLS-1$
> }
>
>
> public String onCustomImage( IImage image, Object context )
> {
> return handleImage( image, context, "custom", false ); //$NON-NLS-1$
> }
>
> /**
> * returns a unique file name based on a directory and name prefix
> *
> * @param imageDir
> * directory to store the image
> * @param prefix
> * prefix for the file name
> * @return a file name
> */
> protected String createUniqueFileName( String imageDir, String prefix )
> {
> return createUniqueFileName( imageDir, prefix, null );
> }
>
> /**
> * creates a unique tempoary file to store an image
> *
> * @param imageDir
> * directory to put image into
> * @param prefix
> * file name prefix
> * @param postfix
> * file name postfix
> * @return a Java File Object
> */
> protected String createUniqueFileName( String imageDir, String prefix,
> String postfix )
> {
> File file = null;
> postfix = ( postfix == null ? "" : postfix );
> String uniCount = null;
> do
> {
> uniCount = genUniqueCount( );
> file = new File( imageDir + "/" + prefix + uniCount + postfix );
> //$NON-NLS-1$
> } while ( file.exists( ) );
>
> return prefix + uniCount + postfix;
> }
>
> /**
> * Generating unique string which contains following parts
> * <li> the hashcode of the image handler
> * <li> creation time of the image handler
> * <li> image count created by the image handler
> * @return return the unique count for filename
> */
> synchronized private String genUniqueCount( )
> {
> count++;
> return handlerId + count;
> }
>
>
> public String onFileImage( IImage image, Object context )
> {
> return handleImage( image, context, "file", true ); //$NON-NLS-1$
> }
>
> /**
> * handles an image report item and returns an image URL
> *
> * @param image
> * represents the image design information
> * @param context
> * context information
> * @param prefix
> * image prefix in URL
> * @param needMap
> * whether image map is needed
> * @return URL for the image
> */
> protected String handleImage( IImage image, Object context, String prefix,
> boolean needMap )
> {
> String mapID = null;
> if ( needMap )
> {
> mapID = getImageMapID( image );
> if ( map.containsKey( mapID ) )
> {
> return (String) map.get( mapID );
> }
> }
> String ret = null;
> //if ( context != null && ( context instanceof HTMLRenderOption ) )
> if ( context != null )
> {
> HTMLRenderContext myContext = (HTMLRenderContext) context;
>
> //IRenderOption rotest = image.getRenderOption();
>
> //HTMLRenderOption ro = (HTMLRenderOption)image.getRenderOption();
> String imageURL = myContext.getBaseImageURL( );
> String imageDir = myContext.getImageDirectory( );
> if ( imageURL == null || imageURL.length( ) == 0
> || imageDir == null || imageDir.length( ) == 0 )
> {
> System.out.println("Error in image settings");
> return null;
> }
>
> String fileName;
> File file;
> String extension = image.getExtension( );
> if ( extension != null && extension.length( ) > 0 )
> {
> fileName = createUniqueFileName( imageDir, prefix, extension );
> //$NON-NLS-1$
> }
> else
> {
> fileName = createUniqueFileName( imageDir, prefix );
> }
> file = new File( imageDir, fileName ); //$NON-NLS-1$
> try
> {
> image.writeImage( file );
> }
> catch ( IOException e )
> {
> e.printStackTrace();
> }
> // servlet mode
> if ( imageURL.indexOf( "?" ) > 0 ) //$NON-NLS-1$
> {
> ret = imageURL + fileName + "&specialid=test";
> }
> else if ( imageURL.endsWith( "/" ) ) //$NON-NLS-1$
> {
> ret = imageURL + fileName;
> }
> else
> {
> ret = imageURL + "/" + fileName; //$NON-NLS-1$
> }
>
> if ( needMap )
> {
> map.put( mapID, ret );
> }
>
> }
> else
> {
> ret = handleTempImage( image, prefix, needMap );
> }
>
> return ret;
> }
>
> protected String handleTempImage( IImage image, String prefix,
> boolean needMap )
> {
> try
> {
>
> File imageFile = File.createTempFile( prefix, ".img" );
> image.writeImage( imageFile );
> String fileName = imageFile.getAbsolutePath( );
> if ( needMap )
> {
> String mapID = getImageMapID( image );
> map.put( mapID, fileName );
> }
> return fileName;
> }
> catch ( IOException e )
> {
> e.printStackTrace();
> }
> return "unknow.img";
> }
>
> /**
> * returns the unique identifier for the image
> *
> * @param image
> * the image object
> * @return the image id
> */
> protected String getImageMapID( IImage image )
> {
> if ( image.getReportRunnable( ) != null )
> {
> return image.getReportRunnable( ).hashCode( ) + image.getID( );
> }
> return image.getID( );
> }
>
>
> }
>
> Jason
>
> On 5/16/2011 1:56 PM, Michał Tkacz wrote:
>> On 05/16/2011 07:30 PM, Jason Weathersby wrote:
>>> Can you try the attached report?
>>>
>>> Jason
>>
>> I can see your point. Unfortunately it didn't help, even when I changed
>> png to jpg and image/png to image/jpeg (the image was jpeg).
>>
>> The second url still points to a file on disk whereas it should be
>> generated by HTMLServerImageHandler (which unfortunately is only called
>> for the first image).
>>
>> Somehow however it works when run from Eclipse. I'd say it's my code
>> that lacks something, not the report.
>>
>> Michal
>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.22"
>>> id="1">
>>> <property name="createdBy">Eclipse BIRT Designer Version
>>> 2.6.2.r262_v20110209 Build <2.6.2.v20110214-1523></property>
>>> <property name="units">in</property>
>>> <property name="iconFile">/templates/blank_report.gif</property>
>>> <property name="bidiLayoutOrientation">ltr</property>
>>> <property name="imageDPI">81</property>
>>> <styles>
>>> <style name="report" id="4">
>>> <property name="fontFamily">sans-serif</property>
>>> <property name="fontSize">10pt</property>
>>> </style>
>>> <style name="crosstab-cell" id="5">
>>> <property name="borderBottomColor">#CCCCCC</property>
>>> <property name="borderBottomStyle">solid</property>
>>> <property name="borderBottomWidth">1pt</property>
>>> <property name="borderLeftColor">#CCCCCC</property>
>>> <property name="borderLeftStyle">solid</property>
>>> <property name="borderLeftWidth">1pt</property>
>>> <property name="borderRightColor">#CCCCCC</property>
>>> <property name="borderRightStyle">solid</property>
>>> <property name="borderRightWidth">1pt</property>
>>> <property name="borderTopColor">#CCCCCC</property>
>>> <property name="borderTopStyle">solid</property>
>>> <property name="borderTopWidth">1pt</property>
>>> </style>
>>> <style name="crosstab" id="6">
>>> <property name="borderBottomColor">#CCCCCC</property>
>>> <property name="borderBottomStyle">solid</property>
>>> <property name="borderBottomWidth">1pt</property>
>>> <property name="borderLeftColor">#CCCCCC</property>
>>> <property name="borderLeftStyle">solid</property>
>>> <property name="borderLeftWidth">1pt</property>
>>> <property name="borderRightColor">#CCCCCC</property>
>>> <property name="borderRightStyle">solid</property>
>>> <property name="borderRightWidth">1pt</property>
>>> <property name="borderTopColor">#CCCCCC</property>
>>> <property name="borderTopStyle">solid</property>
>>> <property name="borderTopWidth">1pt</property>
>>> </style>
>>> </styles>
>>> <page-setup>
>>> <simple-master-page name="Simple MasterPage" id="2">
>>> <page-footer>
>>> <text id="3">
>>> <property name="contentType">html</property>
>>> <text-property name="content"><![CDATA[<value-of>new
>>> Date()</value-of>]]></text-property>
>>> </text>
>>> </page-footer>
>>> </simple-master-page>
>>> </page-setup>
>>> <body>
>>> <label id="7">
>>> <text-property name="text">This works:</text-property>
>>> </label>
>>> <image id="8">
>>> <property name="source">embed</property>
>>> <property name="imageName">my_image.png</property>
>>> </image>
>>> <label id="10">
>>> <text-property name="text">This does not:</text-property>
>>> </label>
>>> <text id="9">
>>> <property name="contentType">html</property>
>>> <text-property name="content"><![CDATA[<IMAGE
>>> name="my_image.png"/>]]></text-property>
>>> </text>
>>> </body>
>>> <list-property name="images">
>>> <structure>
>>> <property name="name">my_image.png</property>
>>> <property name="type">image/png</property>
>>> <property name="data">
>>>
>>> /9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAZAAA/+4ADkFk b2JlAGTAAAAAAf/bAIQA
>>>
>>>
>>>
>>>
>>> AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ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>>
>>> On 5/16/2011 1:02 PM, Michał Tkacz wrote:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <report xmlns="http://www.eclipse.org/birt/2005/design"
>>>> version="3.2.22"
>>>> id="1">
>>>> <property name="createdBy">Eclipse BIRT Designer Version
>>>> 2.6.2.r262_v20110209 Build <2.6.2.v20110214-1523></property>
>>>> <property name="units">in</property>
>>>> <property name="iconFile">/templates/blank_report.gif</property>
>>>> <property name="bidiLayoutOrientation">ltr</property>
>>>> <property name="imageDPI">81</property>
>>>> <styles>
>>>> <style name="report" id="4">
>>>> <property name="fontFamily">sans-serif</property>
>>>> <property name="fontSize">10pt</property>
>>>> </style>
>>>> <style name="crosstab-cell" id="5">
>>>> <property name="borderBottomColor">#CCCCCC</property>
>>>> <property name="borderBottomStyle">solid</property>
>>>> <property name="borderBottomWidth">1pt</property>
>>>> <property name="borderLeftColor">#CCCCCC</property>
>>>> <property name="borderLeftStyle">solid</property>
>>>> <property name="borderLeftWidth">1pt</property>
>>>> <property name="borderRightColor">#CCCCCC</property>
>>>> <property name="borderRightStyle">solid</property>
>>>> <property name="borderRightWidth">1pt</property>
>>>> <property name="borderTopColor">#CCCCCC</property>
>>>> <property name="borderTopStyle">solid</property>
>>>> <property name="borderTopWidth">1pt</property>
>>>> </style>
>>>> <style name="crosstab" id="6">
>>>> <property name="borderBottomColor">#CCCCCC</property>
>>>> <property name="borderBottomStyle">solid</property>
>>>> <property name="borderBottomWidth">1pt</property>
>>>> <property name="borderLeftColor">#CCCCCC</property>
>>>> <property name="borderLeftStyle">solid</property>
>>>> <property name="borderLeftWidth">1pt</property>
>>>> <property name="borderRightColor">#CCCCCC</property>
>>>> <property name="borderRightStyle">solid</property>
>>>> <property name="borderRightWidth">1pt</property>
>>>> <property name="borderTopColor">#CCCCCC</property>
>>>> <property name="borderTopStyle">solid</property>
>>>> <property name="borderTopWidth">1pt</property>
>>>> </style>
>>>> </styles>
>>>> <page-setup>
>>>> <simple-master-page name="Simple MasterPage" id="2">
>>>> <page-footer>
>>>> <text id="3">
>>>> <property name="contentType">html</property>
>>>> <text-property name="content"><![CDATA[<value-of>new
>>>> Date()</value-of>]]></text-property>
>>>> </text>
>>>> </page-footer>
>>>> </simple-master-page>
>>>> </page-setup>
>>>> <body>
>>>> <label id="7">
>>>> <text-property name="text">This works:</text-property>
>>>> </label>
>>>> <image id="8">
>>>> <property name="source">embed</property>
>>>> <property name="imageName">my_image</property>
>>>> </image>
>>>> <label id="10">
>>>> <text-property name="text">This does not:</text-property>
>>>> </label>
>>>> <text id="9">
>>>> <property name="contentType">html</property>
>>>> <text-property name="content"><![CDATA[<IMAGE
>>>> name="my_image"/>]]></text-property>
>>>> </text>
>>>> </body>
>>>> <list-property name="images">
>>>> <structure>
>>>> <property name="name">my_image</property>
>>>> <property name="data">
>>>>
>>>> /9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAZAAA/+4ADkFk b2JlAGTAAAAAAf/bAIQA
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQIC AgICAgICAgICAwMDAwMD
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> AwMDAwEBAQEBAQECAQECAgIBAgIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMD AwMDAwMDAwMDAwMDAwMD
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> AwMDAwMDAwMD/8AAEQgASABIAwERAAIRAQMRAf/EAJgAAQAABgMBAQAAAAAA AAAAAAACBAYHCAkBBQoD
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> CwEBAAIDAQEAAAAAAAAAAAAAAAEEAgUGAwcQAAAGAgIBAwIEBwEAAAAAAAEC AwQFBgAHEQgSIRMUMUFR
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> cdEJkbHBIjIWChgRAAICAQMCBAQEAwkAAAAAAAECABEDIRIEMQVBUWET8IEi FHGRMgahwd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6CwPyFzU4eK6 0cgYLWn5dP7h868P0C+v
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 3RnXuvqnqiqSjJC9NdNat1TqihvbJCRRFouI1VVnNaj5dNoxbIsgnJYZF24X cGIdUpnAkKcCAUM4PP3Z
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> sCNi45KKzMxonUt169BoNBpLwUHUjy/h8f46zN6D63aqa2dteRo8Aa2tV1nb OdVYpqPWDt0oks5dsPPl
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Fi7dKoEOoqkQiihigJhEc0ebu3KfGcO9vaPhfhPQBR0HWVkw0PqOOsqFxa0G soWdtIOpdCYQjUUnKMs/
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Kcr+URKQCooyL4FB95YpAUVH1MIj65UfuHMyIcbZGKEVXp4SNqjw1l2yJkTD ghQAMpkk9ZlI8iJCcTFI
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> YSE8zAA+JOQL5G+wCYfQoCP1H7ZI669IlLjV2qwv30gUsjKyCQJLOFCgBEWi QidCKYlEB+PHpHETCX6q
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> qmFQ4iIgAWPuGAVE+nGv8T4k+v8AYNBJRmRtwOsocNXMGQlOyUcN1hE51l2q yjdVZZZUy7hUxkTJiPuL
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> qGMHr6BwH2yz9+7fqA2+XkPKW/vs5H1UT+EmyUn3Tpi5UcOvaH+z5ThdyJfy Fwoqbj1/HnJPM0oUPkJU
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> di5s/wBJW8ZBt2JSgBCh48enAfbj9Mp5MzPManfgAFDgA4DPCTOcRGIjERiI xEYiMRGIjERiIxEYiMRG
>>>>
>>>>
>>>>
>>>>
>>>> IjERiIxEYiMRGIn/2Q==
>>>> </property>
>>>> </structure>
>>>> </list-property>
>>>> </report>
>>>
>>
>
|
|
|
Goto Forum:
Current Time: Fri Jul 04 05:05:43 EDT 2025
Powered by FUDForum. Page generated in 0.05399 seconds
|