Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Exporting diagram in pdf (Read 5274 times)
Silvia88
Full Member
***
Offline


I Love MindFusion!

Posts: 121
Joined: Aug 31st, 2015
Exporting diagram in pdf
Mar 16th, 2016 at 9:30am
Print Post  
Hi, how can I export a created diagram in pdf format?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Exporting diagram in pdf
Reply #1 - Mar 16th, 2016 at 10:01am
Print Post  
Hi,

There's no built-in PDF export in the Android library. At this time you could send diagram's XML file to a web server and export it on the server using Mindfusion's Java or .NET libraries.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Silvia88
Full Member
***
Offline


I Love MindFusion!

Posts: 121
Joined: Aug 31st, 2015
Re: Exporting diagram in pdf
Reply #2 - Mar 16th, 2016 at 10:17am
Print Post  
But in the documenttation there is this sentence:

A DiagramDocument can be exported to PDF using the new overloads available in the PdfExporter. Other export classes do not support multi-page export at this time, but still can be used to export individual pages via their Export(Diagram) method

what does it mean? Here is the link: http://www.mindfusion.eu/onlinehelp/droiddiagram/index.htm
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Exporting diagram in pdf
Reply #3 - Mar 16th, 2016 at 10:32am
Print Post  
I guess someone copied the doc.comment of DiagramDocument class from Java version of the library without checking what it says. There's no PdfExporter available in Android diagram at this time. The sentence is still true though Wink If you export on server side, it's still only PdfExporter that supports multi-page export.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Silvia88
Full Member
***
Offline


I Love MindFusion!

Posts: 121
Joined: Aug 31st, 2015
Re: Exporting diagram in pdf
Reply #4 - Mar 16th, 2016 at 10:39am
Print Post  
Ok, thank you very much, is there another way to export it? for example I read SVG format
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Exporting diagram in pdf
Reply #5 - Mar 16th, 2016 at 11:07am
Print Post  
It seems Google added native PdfDocument class for PDF generation in API level 19 -

http://developer.android.com/reference/android/graphics/pdf/PdfDocument.html

Try following the example above, replacing the content.draw line with diagram.draw(page.getCanvas());

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