Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Printing png images with flowchart (Read 5896 times)
simonrunge
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Nov 1st, 2006
Printing png images with flowchart
Nov 1st, 2006 at 2:39am
Print Post  
Hi,

We are having some difficulties printing with embedded png images in our workflow. The png images when printed (or viewed in print preview) are displaying as coloured squares instead of the actual image. We have found we have been able to export to bitmap without a problem. Any help would be much appreciated.

Thanks,
Simon
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Printing png images with flowchart
Reply #1 - Nov 1st, 2006 at 5:44am
Print Post  
Hi,

Perhaps your printer driver does not support transparent images.

That might also depend on the driver configuration - the "Enable ICM / Image Color Management" option in the printer preferences dialog helps for some printers. On my system that option can be accessed by setting "Color Adjustment" to manual, and clicking the "Set" button. The dialog that appears contains an "Enable ICM" check box.

Stoyan
  
Back to top
 
IP Logged
 
simonrunge
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Nov 1st, 2006
Re: Printing png images with flowchart
Reply #2 - Nov 2nd, 2006 at 10:27pm
Print Post  
Hi Stoyan,

I had no luck finding the option you mentioned. The printer being used is a HP LaserJet 4100. I've attached a screenshot demonstrating the issue we're having.

Thanks,
Simon

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Printing png images with flowchart
Reply #3 - Nov 3rd, 2006 at 6:07am
Print Post  
Printing transparent PNGs works fine on our printers, but there might be something peculiar in your images - could you email them to me so we can test how they will be printed here.

Also try printing with GIF or ICO images - this might work better than PNGs.

Stoyan
  
Back to top
 
IP Logged
 
wyang
YaBB Newbies
*
Offline



Posts: 10
Joined: Jan 14th, 2007
Re: Printing png images with flowchart
Reply #4 - Jan 14th, 2007 at 11:04pm
Print Post  
Hi,

we have tried to print with other GIF and BMP images. Still no luck of getting it work.

Cheers,

Welly
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Printing png images with flowchart
Reply #5 - Jan 15th, 2007 at 5:57am
Print Post  
Hi,

Try printing using the FlowChart.Print(PrintDocument) method. Add a handler for the PrintDocument.PrintPage event, and from the handler call e.Graphics.DrawImage to draw one of your images somewhere on the page. Does that work?

Stoyan
  
Back to top
 
IP Logged
 
wyang
YaBB Newbies
*
Offline



Posts: 10
Joined: Jan 14th, 2007
Re: Printing png images with flowchart
Reply #6 - Jan 16th, 2007 at 2:02am
Print Post  
I had tried and the simple image works.
However, the images in the flowchart are still not printing properly.

It seems that the flowchart boxes are not rendering properly.


Here is the code:

public void Print()
{
     PrintDocument doc = new PrintDocument();
     doc.PrintPage += this.Doc_PrintPage;

     this.flowChart.Print(doc);
}

private void Doc_PrintPage(object sender, PrintPageEventArgs e)
{   
     e.Graphics.DrawImage(Image.FromFile("C:\\Projects\\Workflow\\Trunk\\ServerSide\\
CommonLibrary\\Resources\\FailureEvnet16.png"),100, 100);
}
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Printing png images with flowchart
Reply #7 - Jan 16th, 2007 at 3:09am
Print Post  
Have you enabled the FlowChart.PrintOptions.EnableImages property?
  
Back to top
 
IP Logged
 
wyang
YaBB Newbies
*
Offline



Posts: 10
Joined: Jan 14th, 2007
Re: Printing png images with flowchart
Reply #8 - Jan 16th, 2007 at 3:56am
Print Post  
well, by default, FlowChart.PrintOptions.EnableImages is set to true.

Nevertheless, I did try to set it to true as well but still no luck.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Printing png images with flowchart
Reply #9 - Jan 16th, 2007 at 4:40am
Print Post  
Could you try the following:

- do the FCDemo sample diagrams that have box images print ok?
- what happens if you set the Graphics.Clip before drawing the image in your PrintPage handler?

Thanks
  
Back to top
 
IP Logged
 
simonrunge
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Nov 1st, 2006
Re: Printing png images with flowchart
Reply #10 - Jan 24th, 2007 at 11:02pm
Print Post  
Hi Stoyan,

I think the issue may be caused by the way we're initializing the flowchart or flowchart objects. When the image to print is rendered in print preview all of the flowchart objects (except text) appear very small, and to get the image to size correctly we need to fit to page. Possibly the reason why the icons are appearing as pixels is because the holder for the icon is only displaying as one or two pixels.

Thanks for your help
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Printing png images with flowchart
Reply #11 - Jan 25th, 2007 at 8:58am
Print Post  
Hi,

Do you use MeasureUnit == Pixel? In that case the diagram would print using the printer device units and the images will appear very tiny on high-resolution printers. You could set MeasureUnit = Point just before printing to fix that, and restore it to Pixel after that.

Or otherwise try setting the ImageAlign property to Fit or Stretch and the image should resize to fit the box. If you need the image to appear at a specific position within the box, set the ShapeTemplate.ImageRectangle.

Stoyan
  
Back to top
 
IP Logged
 
simonrunge
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Nov 1st, 2006
Re: Printing png images with flowchart
Reply #12 - Jan 28th, 2007 at 9:23pm
Print Post  
Thanks Stoyan, will look into it.

Regards,
Simon
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint