اشتراک‌ها
SignalR 2.1.0 منتشر شد

رفع یک سری باگ و افزودن یک سری ویژگی از جمله:

Support longPolling transport raise reconnect in JS client and .Net client when network disconnect

Support reporting progress from hub method invocations

Add ability to provide an interface for client methods via Hub

و ...

SignalR 2.1.0 منتشر شد
اشتراک‌ها
Deno 2 منتشر شد
Announcing Deno 2 — A huge release for the “what if I reinvented Node again from scratch?” runtime. Backwards compatibility with Node is a headline feature, but there’s a lot more baked in.
Deno 2 منتشر شد
اشتراک‌ها
TypeScript 4.7 منتشر شد

Here’s a quick list of what’s new in TypeScript 4.7!

ECMAScript Module Support in Node.js
Control over Module Detection
Control-Flow Analysis for Bracketed Element Access
Improved Function Inference in Objects and Methods
Instantiation Expressions
extends Constraints on infer Type Variables
Optional Variance Annotations for Type Parameters
Resolution Customization with moduleSuffixes
resolution-mode
Go to Source Definition
Groups-Aware Organize Imports
Object Method Snippet Completions
Breaking Changes
 

TypeScript 4.7 منتشر شد
اشتراک‌ها
ILSpy 7.0 منتشر شد

New Language Features

  • C# 9.0: record classes
  • C# 9.0: with expressions
  • C# 9.0: primary constructors
  • Support for .NET 5 custom calling conventions
  • Improved support for Unsafe-intrinsics

UI Improvements

  • Dark mode (@tom-englert in #2347)
  • .NET bundles and Nuget packages are now directly embedded in the tree view
  • Search enabled in NuGet packages
  • Added setting highlight the current line in the code view (see #2224, by @DickvdBrink)
  • Simple UI language switching support 
ILSpy 7.0 منتشر شد
اشتراک‌ها
Reflector 10 منتشر شد

What's new in this release?

  • Full C#7.0 support
  • .NET Core support

For more information, please see the release notes.

Upgrading to .NET Reflector 10
.NET Reflector 10 is a major upgrade from .NET Reflector 9. If your current license includes a valid support and upgrades package for .NET Reflector 10, the same license serial number will automatically activate .NET Reflector 10.

If your v9.x license does not include support and upgrades, Reflector will upgrade to a 14-day trial of v10.0. 

Reflector 10 منتشر شد
اشتراک‌ها
ASP.NET Core 2.0 منتشر شد

The ASP.NET team is proud to announce general availability of ASP.NET Core 2.0.  This release features compatibility with .NET Core 2.0, tooling support in Visual Studio 2017 version 15.3, and the new Razor Pages user-interface design paradigm.  For a full list of updates, you can read the release notes.  The latest SDK and tools can be downloaded from https://dot.net/core. Read the .NET Core 2.0 release announcement for more information and watch the launch video on Channel 9.

 
ASP.NET Core 2.0 منتشر شد
اشتراک‌ها
Rider EAP 20 منتشر شد.

Rider EAP 20 fixes a number of bugs, improves .NET Core support, has better NuGet performance, supports Xamarin Android applications, comes with Node.js tooling from WebStorm (including SpyJS), can generate ResX files, executes T4 templates (needs Windows and Visual Studio SDK), adds support for scratch files, … Too much for one sentence, as you can see from the full list of fixes. We’ll highlight a few, read on! 

Rider EAP 20 منتشر شد.
نظرات مطالب
تبدیل html به pdf با کیفیت بالا
یک نکته‌ی تکمیلی:
پروژه‌ی wkhtmltopdf خاتمه یافته و دیگر نگهداری نمی‌شود. اگر به دنبال یک جایگزین با کیفیت برای آن هستید، مرورگر کروم، قابلیت تبدیل توکار HTML به PDF را دارد که بر این اساس کتابخانه‌ی ChromiumHtmlToPdf به‌وجود آمده و در پشت صحنه از همان موتور کروم برای تبدیل HTML به PDF با کیفیت بسیار بالا استفاده می‌کند. این کتابخانه همچنین قابلیت تهیه‌ی screenshot از صفحه‌ی وب را هم دارد.

یک نمونه مثال: تبدیل یک فایل HTML به PDF
using (var converter = new Converter())
{
   converter.ConvertToPdf(new ConvertUri(SourcePath),
                               "output.pdf",
                               new PageSettings(PaperFormat.A4)
                               {
                                   DisplayHeaderFooter = true,
                                   HeaderTemplate = header,
                                   FooterTemplate = footer,
                                   PrintBackground = true,
                               });
   converter.ConvertToImage(new ConvertUri(tempSourcePath),
                                 "output.png",
                                 new PageSettings(PaperFormat.A6));
}
در اینجا SourcePath به مسیر کامل فایل HTML اشاره می‌کند. مزیت این روش، خواندن خودکار فایل‌های css، js و تصاویر محلی ذکر شده‌ی در فایل HTML است. می‌شود بجای SourcePath، از خود محتوای رشته‌ای فایل HTML هم استفاده کرد. در این حالت باید css و js و غیره را Inline کنید و داخل فایل قرار دهید.
یک نمونه مثال از header و footer قابل استفاده‌ی در اینجا را هم مشاهده می‌کنید:
    var header = """
<div class="text center" style="color: lightgray;border-bottom: solid lightgray 0.1px; width: 100%; font-family: 'Samim'; font-size:7px;">
<span class="title"></span>
</div>
""";
    var footer = """
<div class="text center" style="color: lightgray; font-family: 'Samim'; font-size:7px;">
<span class="pageNumber"></span>/<span class="totalPages"></span>
</div>
""";
برای مثال ذکر 1/10 در پایین تمام صفحات (تعداد کل صفحات/شماره صفحه جاری) به صورت فوق است (در آدرس داده شده، برای مثال totalPages را جستجو کنید تا با روش تعریف این ثوابت ویژه آشنا شوید). متاسفانه مرورگر کروم در این دو قسمت header و footer، محدودیت‌های زیادی را اعمال می‌کند و فونت‌های سفارشی را فقط در صورت نصب در سیستم عامل می‌خواند و پردازش می‌کند و اگر می‌خواهید تصویری را در اینجا نمایش دهید، باید آن‌را base64 کرده و inline کنید.

روش استفاده‌ی از آن در برنامه‌های وب ASP.NET Core
می‌توانید ورودی HTML خود را به صورت زیر به آن داده و byte array نهایی را بدون نیاز به ذخیره سازی به صورت فایل، از یک اکشن متد، بازگشت دهید:
 var HTML = "<HTML code>";
 using (Converter converter = new Converter())
 using (MemoryStream stream = new MemoryStream())
 {
     // This is necessary when running on Docker
     converter.AddChromeArgument("--no-sandbox");

     // Create PDF out of HTML string
     converter.ConvertToPdf(html, stream, new ChromeHtmlToPdfLib.Settings.PageSettings());

     // Return file to user
     return File(stream.ToArray(), MediaTypeNames.Application.Pdf, "Report.pdf");
 }