- Welcome, Guest. Please Login or Register
MindFusion  
  We have released initial version of MindFusion.JavaScript pack. It includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are more details and live demo for anyone interested.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Pages: 1 2  Send Topic Print  
Export to PDF problem
Read 8603 times

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Export to PDF problem
Feb 28th, 2013 at 7:57am
 
the first attachment image file below is runtime effect,but when to export to pdf file, the effect like second attachment image below.

May I know what happen?


ps:Exporting takes too long.
 
 

2013-2-28_15-48-16.png (Attachment deleted)
2013-2-28_15-48-48.png (Attachment deleted)
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: Export to PDF problem
Reply #1 - Feb 28th, 2013 at 12:03pm
 
An updated version of the control can be downloaded from this link:

http://mindfusion.eu/_temp/MindFusion.Reporting.Wpf.1.3.trial2.net35.zip

This version should fix the clipping issues you have experienced earlier. In addition, the PdfExporter class now exposes two new properties - AutoDetectEncoding and DefaultEncoding. You can use these properties to turn off automatic encoding detection and thus increase the export speed significantly. If you turn off automatic detection, make sure to specify default encoding or an exception will be thrown:

Code:
exporter.AutoDetectEncoding = false;
exporter.DefaultEncoding = Encoding.Default; 


This should also fix the issue with the Gain text being stretched out disproportionately and with a wrong font.

Let me know if this helps.

Regards,
Meppy
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: Export to PDF problem
Reply #2 - Mar 1st, 2013 at 1:04am
 
Meppy wrote on Feb 28th, 2013 at 12:03pm:
An updated version of the control can be downloaded from this link:

http://mindfusion.eu/_temp/MindFusion.Reporting.Wpf.1.3.trial2.net35.zip

This version should fix the clipping issues you have experienced earlier. In addition, the PdfExporter class now exposes two new properties - AutoDetectEncoding and DefaultEncoding. You can use these properties to turn off automatic encoding detection and thus increase the export speed significantly. If you turn off automatic detection, make sure to specify default encoding or an exception will be thrown:

Code:
exporter.AutoDetectEncoding = false;
exporter.DefaultEncoding = Encoding.Default; 


This should also fix the issue with the Gain text being stretched out disproportionately and with a wrong font.

Let me know if this helps.

Regards,
Meppy


Meppy,

Pdf file now seemed very well,but the exporting speed also too slowly
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: Export to PDF problem
Reply #3 - Mar 1st, 2013 at 1:29am
 
There are still a problem:

like attachment image file 2 the word "e?" is moved to the front,May I know what happened?

 
 

2013-3-1_9-23-00.png (Attachment deleted)
2013-3-1_9-23-13.png (Attachment deleted)
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: Export to PDF problem
Reply #4 - Mar 1st, 2013 at 6:57am
 
Can you post the XAML of your report and attach the resulting PDF file?
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: Export to PDF problem
Reply #5 - Mar 1st, 2013 at 7:21am
 
Meppy wrote on Mar 1st, 2013 at 6:57am:
Can you post the XAML of your report and attach the resulting PDF file?


This is xaml code below,
Code:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:r="http://mindfusion.eu/reporting/wpf">

    <r:Report  x:Key="StudentResult" FontFamily="Arial" FontSize="12">
        <r:Page >

            <!-- Page Content-->
            <r:DataRange DataSource="{Binding StudentSessionInfo}" Location="0%,0" Size="100%,60">
                <r:DataRange.ItemTemplate >
                    <DataTemplate >
                        <r:ItemContainer >
                            <r:Label Location="0%,0" Size="83%,20" Background="#F8F488" Text="[ID] [SName]" BorderBrush="#ACE6EF" BorderThickness="1,0,0,0" FontSize="14"/>
                            <r:Label Location="83%,0" Size="100*,20" Background="#F8F488" Text="Total Point: [TotalPoint@&quot;0.00&quot;]" BorderBrush="#ACE6EF" BorderThickness="0,0,1,0" FontSize="14"/>
                            <r:DataRange  Name="QuesionInfo" Location="0%,20" Size="100%,40">
                                <r:DataRange.ItemTemplate>
                                    <DataTemplate>
                                        <r:ItemContainer>
                                            <r:Label Location="0%,0" Size="100*,0" AutoSize="True" Background="#B8DAE3" Text="[QNo].[QTitle]" BorderBrush="#ACE6EF" BorderThickness="1,0" FontSize="14" />
                                            <r:DataRange Location="0%,0" Name="OptionInfo" Background="#E9F3F5" Size="100%,20"  BorderBrush="#ACE6EF" BorderThickness="1,0" >
                                                <r:DataRange.ItemTemplate>
                                                    <DataTemplate>
                                                        <r:ItemContainer>
                                                            <r:Label Location="3%,0" Size="97%,20" Text="{Binding }"/>
                                                        </r:ItemContainer>
                                                    </DataTemplate>
                                                </r:DataRange.ItemTemplate>
                                            </r:DataRange>
                                            <r:Label Location="0%,20" Background="#E9F3F5" Size="83%,20"  BorderBrush="#ACE6EF"  BorderThickness="1,0,0,1" Text="Your Answer: [SReply]" />
                                            <r:Label Location="83%,20" Background="#E9F3F5" Size="100*,20" BorderBrush="#ACE6EF"  BorderThickness="0,0,1,1" Foreground="#00806F" Text="[TFFlag] (Gain:[Point@&quot;0.00&quot;])" />
                                        </r:ItemContainer>
                                    </DataTemplate>
                                </r:DataRange.ItemTemplate>
                            </r:DataRange>
                        </r:ItemContainer>
                    </DataTemplate>
                </r:DataRange.ItemTemplate>
            </r:DataRange>

            <!-- Page Footer -->
            <r:Page.FooterTemplate>
                <DataTemplate>
                    <r:ItemContainer Size="100%,30">
                        <r:Label Size="100%,30" Text="[PageCurrent()] of [PageCount()]" HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </r:ItemContainer>
                </DataTemplate>
            </r:Page.FooterTemplate>
        </r:Page>
    </r:Report>
</ResourceDictionary> 



PDF file size exceed the attachment maximum size,so the attachment image is a piece of a paper
 
 

a_page.png (Attachment deleted)
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: Export to PDF problem
Reply #6 - Mar 1st, 2013 at 7:57am
 
Is it possible to send me your project to meppy@mindfusion.eu or post here your data structure and code behind?

Regards,
Meppy
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: Export to PDF problem
Reply #7 - Mar 1st, 2013 at 9:10am
 
Meppy wrote on Mar 1st, 2013 at 7:57am:
Is it possible to send me your project to meppy@mindfusion.eu or post here your data structure and code behind?

Regards,
Meppy


code behind:
Code:
   myReport.QueryDetails += (s, e) =>
                    {
                        DataRange sender = s as DataRange;
                        if (sender != null)
                        {
                            if (sender.Name == "QuesionInfo")
                            {
                                ReportDataSet.StudentSessionInfoRow sessionInfoRow = e.MasterRow as ReportDataSet.StudentSessionInfoRow;

                                e.Details = reportDs.SAnswerInfo.Where(sa => sa.SID == sessionInfoRow.ID);
                            }
                            else if (sender.Name == "OptionInfo")
                            {
                                ReportDataSet.SAnswerInfoRow sai = e.MasterRow as ReportDataSet.SAnswerInfoRow;
                                e.Details = GetOptionsByQNo(sai.QNo);
                            }
                        }
                    }; 



data structure below
 
 

__25429___33719__001.PNG (Attachment deleted)
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: Export to PDF problem
Reply #8 - Mar 1st, 2013 at 1:48pm
 
Can you also provide me with the code you are using to export the report to PDF? More specifically, I am interested in what encoding you supply to the PDF exporter.

Regards,
Meppy
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: Export to PDF problem
Reply #9 - Mar 2nd, 2013 at 1:47pm
 
Meppy wrote on Mar 1st, 2013 at 1:48pm:
Can you also provide me with the code you are using to export the report to PDF? More specifically, I am interested in what encoding you supply to the PDF exporter.

Regards,
Meppy


like your example:
Code:
exporter.AutoDetectEncoding = false;
exporter.DefaultEncoding = Encoding.Default;
 

 
 
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: Export to PDF problem
Reply #10 - Mar 4th, 2013 at 6:47am
 
What is the Language Format in your Region and Language settings in Windows?
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: Export to PDF problem
Reply #11 - Mar 4th, 2013 at 6:51am
 
Meppy wrote on Mar 4th, 2013 at 6:47am:
What is the Language Format in your Region and Language settings in Windows?


Chinese(China)
 
 
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: Export to PDF problem
Reply #12 - Mar 4th, 2013 at 10:37am
 
We are having difficulties reproducing this bug here. Can you attach (or sent to meppy@mindfusion.eu) the PDF file containing the overlapping texts?

Regards,
Meppy
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: Export to PDF problem
Reply #13 - Mar 5th, 2013 at 2:08am
 
Meppy wrote on Mar 4th, 2013 at 10:37am:
We are having difficulties reproducing this bug here. Can you attach (or sent to meppy@mindfusion.eu) the PDF file containing the overlapping texts?

Regards,
Meppy


Meppy,

the pdf file has been sent to your email,please check it.
 
 
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: Export to PDF problem
Reply #14 - Mar 5th, 2013 at 11:32am
 
Hi,

Thanks to your feedback, we were able to pinpoint the problem and are now working on a fix. I will get back to you as soon as possible.

Regards,
Meppy
 
 
 
IP Logged    
 
     
Pages: 1 2  Send Topic Print