PrintDocument - migrate from .NET Framework to .NET

Posted by: office on 22 April 2024, 8:51 pm EST

  • Posted 22 April 2024, 8:51 pm 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 23 April 2024, 11:17 pm 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 24 April 2024, 6:27 pm 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 28 April 2024, 6:13 pm 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 29 April 2024, 4:03 pm 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

Need extra support?

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

Learn More

Forum Channels