- Welcome, Guest. Please Login or Register
MindFusion  
  We have released initial version of MindFusion.Scheduling library for HTML5 & JavaScript.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Diagram printing
Read 208 times

Joel D.   Offline
YaBB Newbies
*
Posts: 20
Gender: male
Seattle
I Love MindFusion!


   
     
 
Diagram printing
May 17th, 2018 at 1:40am
 
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.
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1474
Gender: male
tech.support


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

Regards,
Slavcho
 
 
 
IP Logged    
 
     

Joel D.   Offline
YaBB Newbies
*
Posts: 20
Gender: male
Seattle
I Love MindFusion!


   
     
 
Re: Diagram printing
Reply #2 - May 17th, 2018 at 6:08pm
 
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!
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1474
Gender: male
tech.support


   
     
 
Re: Diagram printing
Reply #3 - May 21st, 2018 at 7:24pm
 
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:
string pack = string.Format("pack://temp{0}.xps", xpsCounter++); 



Regards,
Slavcho
 
 
 
IP Logged    
 
     

Joel D.   Offline
YaBB Newbies
*
Posts: 20
Gender: male
Seattle
I Love MindFusion!


   
     
 
Re: Diagram printing
Reply #4 - May 21st, 2018 at 8:22pm
 
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!
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print