PrintDocument - migrate from .NET Framework to .NET

Posted by: office on 23 April 2024, 5:51 am EST

  • Posted 23 April 2024, 5:51 am EST

    Sadly, I couldn’t find the current state of the art regarding the C1.Xaml.WPF.PrintDocument library, and how to migrate to the C1.WPF.* namespaces/libraries with .NET 6/.NET 8 support.

    The classes I am currently using are

    C1.C1Preview.AlignHorzEnum

    C1.C1Preview.AlignVertEnum

    C1.C1Preview.C1PrintDocument

    C1.C1Preview.GraphicsUtils

    C1.C1Preview.LineDef

    C1.C1Preview.Offsets

    C1.C1Preview.PrinterUtil

    C1.C1Preview.RenderArea

    C1.C1Preview.RenderObject

    C1.C1Preview.RenderTable

    C1.C1Preview.RenderText

    C1.C1Preview.SplitBehaviorEnum

    C1.C1Preview.StackingRulesEnum

    C1.C1Preview.Style

    C1.C1Preview.TableHeaderEnum

    C1.C1Preview.Unit

    C1.C1Preview.UnitTypeEnum

    Which library should I use to replace the named classes/enum and their functionaility, to have a 100% clean .net 6/.net 8 code, so not to reference a .net framework library into my .net 6/.net 8 code base.

    I found

    https://www.nuget.org/packages/C1.WPF.Document

    https://www.nuget.org/packages/C1.Win.Printing

    are those the correct packages to use? why isn’t there a C1.WPF.Printing?

  • Posted 24 April 2024, 8:17 am EST

    Hi,

    For .Net6/.Net8, you need to use https://www.nuget.org/packages/C1.WPF.Document package alternative for C1.Xaml.WPF.PrintDocument.

    C1PrintOptions is available under C1.Wpf.Document for printing. If you are unable to achieve your Printing functionality with C1.Wpf.Document then please let us know you requirement. So, that we can provide a resolution for your requirement.

    Please refer and explore the sample for Document: DocumentExplorer.zip

    Best Regards,

    Nitin

  • Posted 25 April 2024, 3:27 am EST

    Thanks for your answer, though honestly I don’t understand the answer.

    If you are unable to achieve your Printing functionality with C1.Wpf.Document then please let us know you requirement.

    I gave you a list of all the classes, I am currently using, those are my requirements eg. I can find a replacement for C1.C1Preview.Unit it seems to be C1.WPF.Document.Unit, but what about eg. C1.C1Preview.RenderText there seems to be no obvious replacement.

    Also the provided sample doesn’t include any mention of this, also there seems to be no code indicating I can build a document with (RenderXXX) from scratch which should be printed.

    Am I missing something?

  • Posted 29 April 2024, 3:13 am EST

    Hi,

    We apologize for the inconvenience. We are discussing this with the development team.

    Will let you know once we have any update from them.[Internal Tracking Id - C1XAML-36122]

    Best Regards,

    Nitin

  • Posted 30 April 2024, 1:03 am EST

    Hi,

    As per the development team, we haven’t ported WPF PrintDocument library to .Net 8 yet. This is in our backlog.

    The best replacement you can use is this package: C1.Win.Printing 8.0.20233.643, refer here: https://www.nuget.org/packages/C1.Win.Printing.

    This package includes all C1Preview classes and uses C1 WinForms controls for previewing results. Please let us know whether it works for you in your Wpf project.

    Best Regards,

    Nitin

  • Posted 19 June 2024, 6:16 am EST

    Sorry, for the late reply.

    Sadly I can’t use C1.Win.Printing because we only have a WPF license, and not a WinForms license.

    Any time frame you can share for a WPF port?

  • Posted 19 June 2024, 6:35 am EST

    Hi,

    We have shared your concerns to the development team.

    Will get back to you once we have any updates from the development team.

    Regards,

    Nitin

  • Posted 18 July 2024, 12:41 am EST

    Hi,

    Development team is working on this request to Port 4.6.2 Wpf Printing to .Net 6/8 version.

    In the meantime, you can reference .Net framework C1Printing in the .Net core project. There would be no issues.

    If you face any issues, then you can get back to us.

    Regards,

    Nitin

  • Posted 19 July 2024, 8:24 am EST

    In the meantime, you can reference .Net framework C1Printing in the .Net core project. There would be no issues.

    Maybe I am blind, but I cant seem to find a different Printing NuGet Package, only the C1.Win.C1Printing.

    https://www.nuget.org/packages?q=Tags%3A"ComponentOne"+printing&includeComputedFrameworks=true&prerel=true&sortby=relevance

    Can you please share a link to the metioned bits and bytes for In the meantime, you can reference .Net framework C1Printing ?

  • Posted 22 July 2024, 1:34 am EST

    Hi,

    Apologize, that was a typo mistake.

    You can reference C1.Xaml.WPF.PrintDocument library in the .Net6/8 project until we make the specific build for .Net6/8. It will work without any issues. If you face any issues with it. Then you can get back to us.

    Refer here: https://www.nuget.org/packages/C1.Xaml.WPF.PrintDocument

    Please refer a sample demo: WPF printing sample - PrintDoc 4.6.2.zip

    Regards,

    Nitin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels