Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Export to PDF problem (Read 10417 times)
luolishuang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Joined: Feb 22nd, 2013
Export to PDF problem
Feb 28th, 2013 at 7:57am
Print Post  
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)
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Export to PDF problem
Reply #1 - Feb 28th, 2013 at 12:03pm
Print Post  
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
Select All
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
  
Back to top
 
IP Logged
 
luolishuang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Joined: Feb 22nd, 2013
Re: Export to PDF problem
Reply #2 - Mar 1st, 2013 at 1:04am
Print Post  
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
Select All
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
  
Back to top
 
IP Logged
 
luolishuang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Joined: Feb 22nd, 2013
Re: Export to PDF problem
Reply #3 - Mar 1st, 2013 at 1:29am
Print Post  
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)
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Export to PDF problem
Reply #4 - Mar 1st, 2013 at 6:57am
Print Post  
Can you post the XAML of your report and attach the resulting PDF file?
  
Back to top
 
IP Logged
 
luolishuang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Joined: Feb 22nd, 2013
Re: Export to PDF problem
Reply #5 - Mar 1st, 2013 at 7:21am
Print Post  
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
Select All
<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)
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

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

Regards,
Meppy
  
Back to top
 
IP Logged
 
luolishuang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Joined: Feb 22nd, 2013
Re: Export to PDF problem
Reply #7 - Mar 1st, 2013 at 9:10am
Print Post  
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
Select All
   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)
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Export to PDF problem
Reply #8 - Mar 1st, 2013 at 1:48pm
Print Post  
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
  
Back to top
 
IP Logged
 
luolishuang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Joined: Feb 22nd, 2013
Re: Export to PDF problem
Reply #9 - Mar 2nd, 2013 at 1:47pm
Print Post  
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
Select All
exporter.AutoDetectEncoding = false;
exporter.DefaultEncoding = Encoding.Default;
 

  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Export to PDF problem
Reply #10 - Mar 4th, 2013 at 6:47am
Print Post  
What is the Language Format in your Region and Language settings in Windows?
  
Back to top
 
IP Logged
 
luolishuang
YaBB Newbies
*
Offline


I Love MindFusion!

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


Chinese(China)
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Export to PDF problem
Reply #12 - Mar 4th, 2013 at 10:37am
Print Post  
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
  
Back to top
 
IP Logged
 
luolishuang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Joined: Feb 22nd, 2013
Re: Export to PDF problem
Reply #13 - Mar 5th, 2013 at 2:08am
Print Post  
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.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Export to PDF problem
Reply #14 - Mar 5th, 2013 at 11:32am
Print Post  
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
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint