Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram printing (Read 2188 times)
Joel D.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Location: Seattle
Joined: Feb 6th, 2017
Diagram printing
May 17th, 2018 at 12:40am
Print Post  
When using the Diagram.Print() function, the user can choose a new paper type using the printer's properties, but they can't preview before printing. When using the Diagram.PrintPreview() function, the user doesn't have access to the printer properties to make any changes to the defaults, so the paper always displays as Portrait.

Is there a way to set the paper orientation to Landscape when using the PrintPreview() function?  Or even other paper sizes?

Thanks,
Joel.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Diagram printing
Reply #1 - May 17th, 2018 at 12:26pm
Print Post  
Check if this will work for you -
https://mindfusion.eu/Forum/YaBB.pl?num=1261177195/4#4

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Joel D.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Location: Seattle
Joined: Feb 6th, 2017
Re: Diagram printing
Reply #2 - May 17th, 2018 at 5:08pm
Print Post  
It works perfectly if the diagram is only one page.
If the diagram is two pages the document prints correctly, but if I scroll the Preview window to the second page, it crashes with the exception: "Invalid URI: The format of the URI could not be determined." I guess this is completely on the .NET side of things. Do you know if there's something that can be done about that?

Thanks!
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Diagram printing
Reply #3 - May 21st, 2018 at 6:24pm
Print Post  
It works for me with multiple pages, but getting an exception if I try showing the viewer again with same pack id. Try changing it for each instance -
Code
Select All
string pack = string.Format("pack://temp{0}.xps", xpsCounter++); 



Regards,
Slavcho
  
Back to top
 
IP Logged
 
Joel D.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Location: Seattle
Joined: Feb 6th, 2017
Re: Diagram printing
Reply #4 - May 21st, 2018 at 7:22pm
Print Post  
Looks like the problem was that I was calling PackageStore.RemovePackage(uri); right after window.Show().  I was calling that because printing twice caused an error due to using the same URI.  But now with your idea of incrementing a counter, it works fine.
Thanks!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint