There are some problems when converting xaml to pdf.

Hi.
I bought a File Forms license because I needed the ability to convert xaml to pdf.
I'm trying to convert the customized element to pdf.

If I make a jpg image with Rendertargetbitmap, the result is good. But Pdf is not like that.

I previously printed out using renertargetbitmap jpg.
Now I'm trying to improve the quality through syncfusion.

Please help me out how to solve this problem.
Thank you.



Attachment: sample_71340795.zip

18 Replies

SL Sowmiya Loganathan Syncfusion Team May 7, 2020 01:53 PM UTC

Hi Sweetbook,   
 
Thank you for contacting Syncfusion support.  
 
We were able to reproduce the reported issue “Resultant PDF is not same as generated XPS document” and suspect that this to be an issue. Currently we are validating on this and will update the further details on 11th May, 2020.   
 
Regards,  
Sowmiya Loganathan  
 



SW sweetbook May 11, 2020 05:17 AM UTC

Hi.
I found another issue.
Imagebrush tilemode not working properly.



Here is the code I tested.
// ------------------------------------------------ --------------------------------
FixedPage fixed_page = new System.Windows.Documents.FixedPage ();

fixed_page.Width = 100 * 96 / 25.4;
fixed_page.Height = 100 * 96 / 25.4;

Canvas canvas = new Canvas ();
canvas.Width = fixed_page.Width;
canvas.Height = fixed_page.Height;

ImageBrush img_brush = new ImageBrush(new BitmapImage(new Uri(@"d:\11.jpg")));
img_brush.TileMode = TileMode.FlipXY;
img_brush.Viewport = new Rect(0.1, 0.1, 0.8, 0.8);
canvas.Background = img_brush;

fixed_page.Children.Add (canvas);
// ------------------------------------------------ --------------------------------



I want to generate pdf like attached jpg.
Can I use the syncfusion function to copy the page and flip it to create the same result without using tilemode?
I hope the tilemode will fix the problem if there are no other features.
I would like your confirmation.
Thank you.

Attachment: test_tilemode_1082792e.zip


RB Ravikumar Baladhandapani Syncfusion Team May 11, 2020 04:43 PM UTC

Hi Sweetbook,,     
  
Sorry for the inconvenience caused. Due to complexity still we are validating the issue. We will update the further details by 13th May, 2020.  
  
Regards,  
Ravikumar.  
  



RB Ravikumar Baladhandapani Syncfusion Team May 13, 2020 04:36 PM UTC

Hi Sweetbook, 
 
 
The border is fine. But the edge of the picture is not gone. 
 
Due to the complexity in the reported issue, we are still validating the issue and we will update the further details on May 15 2020. 
The coordinates of PhotoFrame were ignored and OpacityMask was not processed. 
 
We do not have support for rendering opacity mask in canvas while converting XPS to PDF. We have already added in feature request for this. But we do not have any immediate plans to implement this feature.  
 
You can tract the feature status using below link, 
 
The empty space in the viewbox is painted black and not transparent. 
The transparent area of the png image is painted black 
 
We have checked the reported issue and it is working properly in our end. The transparent is properly added in the converted PDF document.  
 
We have attached output PDF document for your reference.  
Please find the output document below, 
 
I want to generate pdf like attached jpg. 
Can I use the syncfusion function to copy the page and flip it to create the same result without using tilemode? 
I hope the tilemode will fix the problem if there are no other features. 
We can able to generate the PDF like attached jpg to skip the tile mode in ImageBrush. If you want flip the image in PDF document you must use the Tile mode. 
 
Please let us know if you want any further details on this. 
 
 
Regards, 
Ravikumar. 



SW sweetbook May 15, 2020 12:02 AM UTC

Thank you very much for your answer.
I want to check the viewbox part and apply it to my project.
I downloaded version 18.1.0.52 and replaced all references.

Syncfusion.Compression.base
Syncfusion.Linq.base
Syncfusion.Pdf.base

But it doesn't work. Should I apply it another way?

And TileMode.FlipXY doesn't work properly.
Please check the code and file I attached.
Am I misunderstanding?


Thank you.


RB Ravikumar Baladhandapani Syncfusion Team May 15, 2020 09:13 PM UTC

Hi Sweetbook,  
 
 
The border is fine. But the edge of the picture is not gone.  
We do not have support for rendering image with corner radius while converting XPS to PDF. We have already added in feature request for this. While implementing this feature we will add support to rendering image with corner radius. But we do not have any immediate plans to implement this feature.   
  
You can tract the feature status using below link,  
 
I want to check the viewbox part and apply it to my project. 
I downloaded version 18.1.0.52 and replaced all references. 
Syncfusion.Compression.base 
Syncfusion.Linq.base 
Syncfusion.Pdf.base 
But it doesn't work. Should I apply it another way? 
 
We can able to reproduce the issue with latest version 18.1.0.52. we have confirmed that the issue with is a defect. The fix for this issue is estimated to be available on  May 29th   2020.    
 
TileMode.FlipXY doesn't work properly. 
Please check the code and file I attached. 
 
We were able to reproduce the reported issue. Currently we are validating on this and will update the further details on May 19th 2020. 
 
Regards, 
Ravikumar. 



SL Sowmiya Loganathan Syncfusion Team May 19, 2020 02:03 PM UTC

Hi Sweetbook,   
 
TileMode.FlipXY doesn't work properly.  
Please check the code and file I attached.  

We were able to reproduce the reported issue. Currently we are validating on this and will update the further details on May 19th 2020 
On our further analysis, we do not have support for rendering image with different tile mode while converting XPS to PDF. We have created feature request for this. But we do not have any immediate plans to implement this feature.   
  
You can tract the feature status using below link,  

 
Regards, 
Sowmiya Loganathan 



RB Ravikumar Baladhandapani Syncfusion Team May 29, 2020 05:34 PM UTC

Hi Sweetbook,    
 
The reported issue “Resultant PDF is not generated correctly while converting XPS to PDF document" has been fixed and the patch for this fix can be downloaded from the following location.    
     
Recommended approach - exe will perform automatic configuration       
Please find the patch setup from below location:       
     
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment       
Please find the patch assemblies alone from below location:       
   
     
      
Assembly Version: 18.1.0.52    
      
Installation Directions :        
This patch should replace the files “Syncfusion.Pdf.Base.dll” under the following folder.       
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.6      
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\18.1.0.52\precompiledassemblies\18.1.0.52\4.6     
     
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.       
      
Disclaimer :        
Please note that we have created this patch for version 18.1.0.52 specifically to resolve the following issue(s) reported in this forum. 153996  
     
If you have received other patches for the same version for other products, please apply all patches in the order received.       
     
This fix will be included in our 2020 Volume 2 release which will be available by end of June 2020 tentatively.      
 
 
Regards, 
Ravikumar. 



SW sweetbook June 1, 2020 01:39 AM UTC

Hi.
Thank you for your update.
I tested it with the new assembly version.
But unfortunately the empty space in the viewbox remains black when I test it.
And png image are also not drawn transparently.

Is there anything I need to add or modify when using DrawingContext.DrawRectangle ()?
I am not sure what part I am missing.
Here is the code and file I tested.
Please help me check my source code.
Thank you.

Attachment: test_0601_146b5f60.zip


SL Sowmiya Loganathan Syncfusion Team June 1, 2020 12:42 PM UTC

Hi sweetbook,  
 
We have checked the fix with the provided patch and it works fine in our end. Please find the below code snippet for more details,  
 
        static void test_viewbox() 
        { 
            FixedPage fixed_page = new System.Windows.Documents.FixedPage(); 
 
            fixed_page.Width = 100 * 96 / 25.4; 
            fixed_page.Height = 100 * 96 / 25.4; 
 
            Canvas canvas = new Canvas(); 
            canvas.Background = Brushes.AliceBlue; 
            canvas.Width = fixed_page.Width; 
            canvas.Height = fixed_page.Height; 
 
            PhotoFrame pf = new PhotoFrame(); 
            pf.FileName = @"d:\11.jpg"; 
            pf.Width = 50 * 96 / 25.4; 
            pf.Height = 50 * 96 / 25.4; 
            pf.BorderBrush = System.Windows.Media.Brushes.Red; 
            pf.BorderThickness = 1; 
            pf.Viewbox = new Rect(0, 0, 2, 2); 
 
            Canvas.SetLeft(pf, 25 * 96 / 25.4); 
            Canvas.SetTop(pf, 25 * 96 / 25.4); 
 
            canvas.Children.Add(pf); 
            fixed_page.Children.Add(canvas); 
 
            MakePdf(@"test_viewbox_output.pdf", fixed_page); 
            MakeJpg(@"test_viewbox_output.jpg", fixed_page); 
             
        } 
 
    
    
Note: This fix is not included in any our latest version and any of our public NuGet. We will include in our upcoming weekly NuGet release and it is expected to available in June 9th, 2020.  
 
If you still facing the issue, kindly clear the NuGet cache as mentioned in the below KB and try with the patched assemblies,     
 
Please let us know if you need any further assistance with this.  
 
Regards, 
Sowmiya Loganathan 



SW sweetbook June 2, 2020 08:43 AM UTC

Hi.
Thank you for your confirmation.
I hope you include it properly so I can check it on June 9th.
Thank you.


RB Ravikumar Baladhandapani Syncfusion Team June 9, 2020 04:22 PM UTC

Hi sweetbook,  

We regret for the inconvenience caused.

Due to technical problem, we are not able to include the fix in our weekly NuGet release. Currently, we are working on this issue with high priority and we have planned to include this fix in our 2020 Volume 2 main release which is estimated to be available on end of June 2020. 

Regards,
Ravikumar. 



SW sweetbook June 30, 2020 12:13 AM UTC

Hello.

Please check if the bug is fixed in this main update.
Two months have passed since I purchased the license. But I haven't used it yet.

Thank you.


SL Sowmiya Loganathan Syncfusion Team June 30, 2020 11:54 AM UTC

Hi Sweetbook,  
 
We will update the details once the Volume 2 is rolled out.  
 
Regards, 
Sowmiya Loganathan 



SW sweetbook July 7, 2020 02:14 AM UTC

Hello.
Can I check when the Volume 2 update is coming up?
I knew it was the end of June, but time passed.

Regards,
Junghun, Lee


SL Sowmiya Loganathan Syncfusion Team July 7, 2020 12:13 PM UTC

  
Hi Sweetbook,  
 
Sorry for the inconvenience.  
 
Due to some stability reasons we are unable to include the fix in our Volume 2 main release. Please let us know if you need a patch with Volume 2 release version (v18.2.0.44), so that we are happy to update the same.  
 
Note: Our Essential Studio Volume 2, 2020 release (v18.2.0.44) is rolled out and is available for download under the following link. 
 
Regards, 
Sowmiya Loganathan 
 



SW sweetbook July 14, 2020 02:02 AM UTC

Hello.

I paid for the license in April and never used syncfusion for this bug. The license has already been used for almost 3 months.

I believe the problem will be solved, and the time spent waiting for updates and pre-developed programs with syncfusion is also a huge loss.

It's a big problem not to know when there will be a bug fix update.

I'm sorry, but I can't wait any longer for the ongoing delay.
Thank you for your efforts. But now I want a refund.

I have never used syncfusion properly, so please give me a full refund.
Thank you for your confirmation.

Regards,
Junghun, Lee


SL Sowmiya Loganathan Syncfusion Team July 14, 2020 10:39 AM UTC

Hi Sweetbook,  

We have created a new incident under your Direct trac account . We suggest you to follow up with the incident for further updates. Please log in using the below link. 
https://www.syncfusion.com/account/login
 
 
Regards, 
Sowmiya Loganathan 


Loader.
Up arrow icon