Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Throuble seeing images in pdf. (Read 1898 times)
Andy (CyT)
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Aug 30th, 2012
Throuble seeing images in pdf.
Mar 15th, 2013 at 1:53pm
Print Post  
Dear moderator,


We came out with this situation:


We use ShapeListBox with DiagramView.
We configure the elements.xml as follow:

(Sample node)

<shape id="NODO_ID" fill-mode="Winding" display-name="Comparar Variables">
 
  <outline>
      <line dash-style="Custom" width="-1">
        <point x="0" y="0" />
        <point x="0" y="100" />
      </line>
      <line dash-style="Custom" width="-1">
        <point x="0" y="100" />
        <point x="100" y="100" />
      </line>
      <line dash-style="Custom" width="-1">
        <point x="100" y="100" />
        <point x="100" y="0" />
      </line>
      <line dash-style="Custom" width="-1">
        <point x="100" y="0" />
        <point x="0" y="0" />
      </line>
    </outline>   
    <image width="100" heigth="100" src="iconos/10.png"></image>
    <shape-decorations />
    <enable-outline>True</enable-outline>

</shape>


This makes an square outline with an image inside.

On the server side, we configured:

DiagramView1.Diagram.BackgroundImageAlign = MindFusion.Drawing.ImageAlign.Center;

then we check on the client side and the line below return 0, that is the correct
enum for ImageAlign.Center = 0

document.getElementById('DiagramView1').getDiagram().getBackgroundImageAlign()


So far works very well. But once we export to pdf, we experiment the follow:


if we don't set each ShapeNode.ImageAlign

1) we are unable to see the image at all in the .pdf
it is simply not shown

if we set each ShapeNode.ImageAlign = MindFusion.Drawing.ImageAlign.Center

two things happend.

1) The image saw in the pdf is at the very top of the square outline
   we can hardly see part of the image.

2) The image at the screen (not pdf) reduces it size, but remains centered.


this is the way we export to pdf


MindFusion.Diagramming.Export.PdfExporter pdf = new MindFusion.Diagramming.Export.PdfExporter();
pdf.AutoDetectEncoding = true;
pdf.Export(DiagramView1.Diagram, path);


we are using

Diagram component for .net Version 4.2


Warm regards,











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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Throuble seeing images in pdf.
Reply #1 - Mar 15th, 2013 at 2:56pm
Print Post  
I can't see any problems with ImageAlign. Please attach your icon image here.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint