Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Request time out when using export diagram to PDF (Read 4904 times)
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Request time out when using export diagram to PDF
May 3rd, 2011 at 12:14pm
Print Post  
Dear Sir/Madam,

I got ‘Request time out’ error when using export diagram to PDF.

My scenario is to use custom defined shapes for shapboxlist object, so user can drag and drop custom defined shape to diagramview and then have a button in web page to implement export PDF function.

In terms of shape, they are basic geometric shapes and you can see them in the attached file.

I am using PdfExporter to generate PDF file in NetDiagram. It runs perfectly. However when using more than 30 shapes on diagramview, it takes time to generate a pdf file and the pdf file size is slightly big please see this in http://s133.photobucket.com/albums/q77/jessary_chang/project/?action=view&curren....

In this case there are 76 shapes on diagram and the size of pdf is 9.34Mb, it takes around 7min 30secs to generate to pdf file.

So is there any option or setting that I can configure? Can you give me some suggestions?
Many thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Request time out when using export diagram to
Reply #1 - May 3rd, 2011 at 12:31pm
Print Post  
Are you showing any bitmaps in the nodes, or using texture brushes? Emboss and shadow effects are implemented through bitmaps too. If I create a node for each predefined shape (there are about 100) and set its Text, the diagram is exported for a couple of seconds and the PDF is smaller than 300K if using only solid colors.
  
Back to top
 
IP Logged
 
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: Request time out when using export diagram to
Reply #2 - May 4th, 2011 at 2:17pm
Print Post  
Hello,

Thanks for your message; I didn’t use complicated texture for custom shape. I was drawing an outline first and fill color in the shape and then define text area, I didn’t use bitmap and more detail of object is below.

This is setting of DiagramView object

<ndiag:DiagramView ID="VSDiagramView" runat="server" Height="610px" Width="800px" NodeCreatedScript="onNodeCreated"
NodeDoubleClickedScript="onNodeDoubleClicked" ShapeLibraryLocation="../../LeanIcons.shl" BackColor="Transparent"
BorderColor="Transparent" LinkCreatedScript="onLinkCreated" JarLocation="../../JDiagram.jar">
<Diagram LinkHeadShape="PointerArrow" LinkBrush="s:#FFA9A9A9" LinkCrossings="Arcs" LinkHeadShapeSize="3"
LinkStyle="Bezier" BackBrush="s:#FFFFFFFF" />
</ndiag:DiagramView>




And export pdf’s code behind is below


Protected Sub ExportButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ExportButton.Click
…………………

Dim pdf As MindFusion.Diagramming.Export.PdfExporter = _
New MindFusion.Diagramming.Export.PdfExporter()

Dim path As String = Server.MapPath("~/" & TempPDFDataRelatedPath) + Session.SessionID + ".pdf"
pdf.Export(VSDiagramView.Diagram, path)
pdfLink.NavigateUrl = "~/" + TempPDFDataRelatedPath + Session.SessionID + ".pdf"
pdfLink.Visible = True

……………………….
End Sub

Can I do some setting when calling PdfExporter?
Many thanks
  
Back to top
 
IP Logged
 
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: Request time out when using export diagram to
Reply #3 - May 4th, 2011 at 2:18pm
Print Post  
And this is partial info of shl file

this is partial info of shl file
<?xml version="1.0" encoding="utf-8"?>
<shapes version="2">
<shape id="Transport" fill-mode="Winding">
<outline>
<line dash-style="Custom" width="-1">
<point x="0" y="30" />
<point x="60" y="30" />
</line>
<line dash-style="Custom" width="-1">
<point x="60" y="30" />
<point x="60" y="0" />
</line>
<line dash-style="Custom" width="-1">
<point x="60" y="0" />
<point x="100" y="50" />
</line>
<line dash-style="Custom" width="-1">
<point x="100" y="50" />
<point x="60" y="100" />
</line>
<line dash-style="Custom" width="-1">
<point x="60" y="100" />
<point x="60" y="70" />
</line>
<line dash-style="Custom" width="-1">
<point x="60" y="70" />
<point x="0" y="70" />
</line>
<line dash-style="Custom" width="-1">
<point x="0" y="70" />
<point x="0" y="30" />
</line>
</outline>
<decorations />
<textarea>
<line dash-style="Custom" width="-1">
<point x="115" y="40" />
<point x="-15" y="40" />
</line>
<line dash-style="Custom" width="-1">
<point x="-15" y="40" />
<point x="-15" y="65" />
</line>
<line dash-style="Custom" width="-1">
<point x="-15" y="65" />
<point x="115" y="65" />
</line>
<line dash-style="Custom" width="-1">
<point x="115" y="65" />
<point x="115" y="40" />
</line>
</textarea>
<shape-decorations>
<shape-decoration>
<decorations>
<line dash-style="Custom" width="-1">
<point x="0" y="30" />
<point x="60" y="30" />
</line>
<line dash-style="Custom" width="-1">
<point x="60" y="30" />
<point x="60" y="0" />
</line>
<line dash-style="Custom" width="-1">
<point x="60" y="0" />
<point x="100" y="50" />
</line>
<line dash-style="Custom" width="-1">
<point x="100" y="50" />
<point x="60" y="100" />
</line>
<line dash-style="Custom" width="-1">
<point x="60" y="100" />
<point x="60" y="70" />
</line>
<line dash-style="Custom" width="-1">
<point x="60" y="70" />
<point x="0" y="70" />
</line>
<line dash-style="Custom" width="-1">
<point x="0" y="70" />
<point x="0" y="30" />
</line>
</decorations>
<brush Type="Solid">
<Color>#FFFF0000</Color>
</brush>
<fill-mode>1</fill-mode>
</shape-decoration>
</shape-decorations>
<enable-outline>True</enable-outline>
</shape>

……………

</shapes>
  
Back to top
 
IP Logged
 
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: Request time out when using export diagram to
Reply #4 - May 4th, 2011 at 2:19pm
Print Post  
this is partial info of shl file

<shape id="Decide" fill-mode="Winding">
<outline>
<line dash-style="Custom" width="-1">
<point x="50" y="0" />
<point x="100" y="50" />
</line>
<line dash-style="Custom" width="-1">
<point x="100" y="50" />
<point x="50" y="100" />
</line>
<line dash-style="Custom" width="-1">
<point x="50" y="100" />
<point x="0" y="50" />
</line>
<line dash-style="Custom" width="-1">
<point x="0" y="50" />
<point x="50" y="0" />
</line>
</outline>
<decorations />
<textarea>
<line dash-style="Custom" width="-1">
<point x="115" y="30" />
<point x="115" y="70" />
</line>
<line dash-style="Custom" width="-1">
<point x="115" y="70" />
<point x="-10" y="70" />
</line>
<line dash-style="Custom" width="-1">
<point x="-10" y="70" />
<point x="-10" y="30" />
</line>
<line dash-style="Custom" width="-1">
<point x="-10" y="30" />
<point x="115" y="30" />
</line>
</textarea>
<shape-decorations>
<shape-decoration>
<decorations>
<line dash-style="Custom" width="-1">
<point x="0" y="50" />
<point x="50" y="100" />
</line>
<line dash-style="Custom" width="-1">
<point x="50" y="100" />
<point x="100" y="50" />
</line>
<line dash-style="Custom" width="-1">
<point x="100" y="50" />
<point x="50" y="0" />
</line>
<line dash-style="Custom" width="-1">
<point x="50" y="0" />
<point x="0" y="50" />
</line>
</decorations>
<brush Type="Solid">
<Color>#FF800040</Color>
</brush>
<fill-mode>1</fill-mode>
</shape-decoration>
</shape-decorations>
<enable-outline>True</enable-outline>
</shape>
<shape id="DelayQueue" fill-mode="Winding" display-name="Delay/ Queue">
<outline>
<line dash-style="Custom" width="-1">
<point x="0" y="0" />
<point x="50" y="0" />
</line>
<bezier dash-style="Custom" width="-1">
<point x="50" y="0" />
<point x="80" y="0" />
<point x="100" y="30" />
<point x="100" y="50" />
</bezier>
<bezier dash-style="Custom" width="-1">
<point x="100" y="50" />
<point x="100" y="70" />
<point x="80" y="100" />
<point x="50" y="100" />
</bezier>
<line dash-style="Custom" width="-1">
<point x="50" y="100" />
<point x="0" y="100" />
</line>
<line dash-style="Custom" width="-1">
<point x="0" y="100" />
<point x="0" y="0" />
</line>
</outline>
<decorations />
<textarea>
<line dash-style="Custom" width="-1">
<point x="115" y="15" />
<point x="115" y="90" />
</line>
<line dash-style="Custom" width="-1">
<point x="115" y="90" />
<point x="-10" y="90" />
</line>
<line dash-style="Custom" width="-1">
<point x="-10" y="90" />
<point x="-10" y="15" />
</line>
<line dash-style="Custom" width="-1">
<point x="-10" y="15" />
<point x="115" y="15" />
</line>
</textarea>
<shape-decorations>
<shape-decoration>
<decorations>
<line dash-style="Custom" width="-1">
<point x="0" y="0" />
<point x="50" y="0" />
</line>
<line dash-style="Custom" width="-1">
<point x="50" y="0" />
<point x="52.30215" y="0.0899373" />
</line>
<arc dash-style="Custom" width="-1" x="10" y="0" arc-width="90" arc-height="100" start="-93.09406" sweep="187.1797" />
<line dash-style="Custom" width="-1">
<point x="51.43975" y="99.84327" />
<point x="0" y="100" />
</line>
<line dash-style="Custom" width="-1">
<point x="0" y="100" />
<point x="0" y="0" />
</line>
</decorations>
<brush Type="Solid">
<Color>#FFFF8000</Color>
</brush>
<fill-mode>1</fill-mode>
</shape-decoration>
</shape-decorations>
<enable-outline>True</enable-outline>
</shape>
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Request time out when using export diagram to
Reply #5 - May 4th, 2011 at 4:08pm
Print Post  
I am getting a 600KB file with these shapes when exporting 100 nodes and 100 links, it takes about 3 seconds:
http://mindfusion.eu/_samples/custom_shapes.pdf

Are you using the latest version of the control? If you are, please send your diagram saved as xml to support@mindfusion.eu along with the shape library file. If you are with an older version, try how export will work for you with NetDiagram v4.
  
Back to top
 
IP Logged
 
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: Request time out when using export diagram to
Reply #6 - May 5th, 2011 at 10:53am
Print Post  
Hi,

I am using NetDiagram version 3.1.1 in asp page, so I try to update it to V4, then let you know the result.

Many thanks
  
Back to top
 
IP Logged
 
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: Request time out when using export diagram to
Reply #7 - May 5th, 2011 at 12:43pm
Print Post  
Hi,

I had updated Netdiagram to V4 and used the same shl file and all original setting; however the size of pdf is big as usual.

So I tried to do configurations on diagram’s object. When I set show grid to false shown below, then the size of pdf is small.

VSDiagramView.Diagram.ShowGrid = "false"


And one more thing is shape’s outline. As you can see in delay node,
Curve is not smooth when viewing pdf in 100%, is there any configuration that I can use to control node’s quality which means make curve more smoothly rather than line?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Request time out when using export diagram to
Reply #8 - May 5th, 2011 at 3:18pm
Print Post  
You can't control it at this time. We'll try to add support for arcs or use better approximation for the next release.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint