Questions tagged [spire]

Spire is a numeric library for Scala

Using features such as specialization, macros, type classes, and implicits, Spire provides support for rational, complex, real numbers and intervals, along with algebraic type classes such as monoid, ring or vector space. While optimized for high performance, numeric, fractional and integral algebra also have conversions to the standard Scala implementations.

47 questions
0
votes
0 answers

finding implicits in scala libraries

I have a list as below val S = Interval.open(1.0, 4.5) val A = Interval.open(1.0, 3.0) val B = Interval.open(2.0, 4.0) val C = Interval.openUpper(3.0, 4.5) val list = (S \ A).union(S \ B) println(list) List([3.0, 4.5), (1.0,…
Curious
  • 921
  • 1
  • 9
  • 25
0
votes
2 answers

SpirePDF :- High Resoultion the images gets pixelated or cut?

We have used SpirePdf in Wpf application. In low resolution the images in the table works fine but when the same image is opened in High resolutions images it gets torn or disturbed. High resolution images torn 144 DPI Low resolution image 92 DPI I…
user5761780
0
votes
1 answer

Scala Reduce() operation on a RDD[Array[Int]]

I have a RDD of a 1 dimensional matrix. I am trying to do a very basic reduce operation to sum up the values of the same position of the matrix from various partitions. I am using: var z=x.reduce((a,b)=>a+b) or var z=x.reduce(_ + _) But I am…
SGh
  • 3
  • 3
0
votes
1 answer

Convert Excel file to PDF throws a Reflection Exception instantiating workbook Spire.Xls workbook

I just want to use Spire to get an Excel file and save as PDF: Workbook workbook = new Workbook(); workbook.LoadFromFile(@"D:\excels\Report.xlsx", ExcelVersion.Version2016); workbook.SaveToFile(@"D:\excels\" + name + ".pdf",…
Rarm
  • 101
  • 1
  • 2
  • 9
0
votes
1 answer

How do I get the implicit instance of the VectorSpace I need?

I'm trying to use spire to make a linear interpolation function I wrote more general def interpolate(pointA: (Double,Double), pointB: (Double,Double), point: Double): Double = { ((pointB._1 - pointA._1) / (pointB._2 - pointA._2) * (point -…
Ryan Stull
  • 1,056
  • 14
  • 35
0
votes
1 answer

Override html style while word document generation using spire

I am using Spire to generate Word document using C# backend. I have several HTML fields stored as a string in a database, which I need to generate in a Word document as paragraphs. The following is the code that I am using to generate the particular…
roshan
  • 323
  • 8
  • 22
0
votes
3 answers

Spire - set my own font in PDF field

I am using spire to generate a pdf document. All works well but now I want to change the font of one of the text fields to my own font. Any ideas how to do this? My code to generate pdf as as below using (PdfDocument doc = new PdfDocument()) { …
user2837961
  • 1,505
  • 3
  • 27
  • 67
0
votes
2 answers

Implicits Confusion

The following polymorphic methods compile: import spire.math._ import spire.implicits._ scala> def foo[A:Numeric](d : A) = 2 * d foo: [A](d: A)(implicit evidence$1: spire.math.Numeric[A])A scala> def foo[A:Numeric](d : A) = 2 + d foo: [A](d:…
user3248346
0
votes
1 answer

File doesn't exist exception - Spire PDF for .NET

I am using the following code to attempt to print a PDF file using Spire PDF. Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument(); doc.LoadFromFile(monroneyFilename); doc.PrinterName = monroneyPrinter; lock (printLock) { …
Michael Earls
  • 1,467
  • 1
  • 15
  • 25
0
votes
1 answer

Decode Non-English text with barcode reader C#.NET

hello I have this simple example of generating a bar code and decoding it again using Spire.Barcode library BarcodeSettings bcsettings = new BarcodeSettings(); bcsettings.Data = "مرحباً"; bcsettings.Type =…
Aboud Zakaria
  • 567
  • 9
  • 25
0
votes
0 answers

Scala Spire: could not find implicit value for evidence parameter of type spire.algebra.EuclideanRing[T] x % 12 ^

I am not really sure what's going on here. I wanted to implement a few algorithms that I would like to operate on Ints and Floats. This led me to try out Spire. Here is the simplest example of the compile error I am facing. import spire.algebra._ …
meta-meta
  • 926
  • 5
  • 11
0
votes
2 answers

Using Spire.doc, Spire.xls and Spire.Presentation in same project

Is it possible to use the 3 products in the same project? Just downloaded the free versions of each and the Spire.PDF.dll version are different and causes error "System.IO.FileLoadException: Could not load file or assembly 'Spire.Pdf,…
Eduardo Molteni
  • 38,786
  • 23
  • 141
  • 206
0
votes
1 answer

Insert columns form one excel book to another in C#

I need to take values form one sheet in one Excel workbook and insert them into another existing workbook. The values I need to take are the first 6 columns of the first file: And I want to insert them at the beginning of another book like so I've…
ConnorU
  • 1,379
  • 2
  • 15
  • 27
-1
votes
1 answer

Spire.PDF.PdfDocument.print() throws System.NotImplementedException on Ubuntu LTS 20.04

Edit:I contacted the developer team. They created issue for that. I will update this post if there is any improvement. Issue Link The project have coded using by .netCore3.1. Also I used FreeSpire.PDF v5.4. I convert the incoming pdf data to pdf…
-1
votes
1 answer

Outlook and Windows Live Mail show the html table differently (Outlook shows the undesired one, WLM shows the desired)

I'm new to this field. I have a table in an Excel file (xlsx). Using C#, I save it as html: `worksheet.SaveToHtml("the html file path destination");` Then I read the html file: `String htmlCode = File.ReadAllText("the html file path",…
Albert
  • 119
  • 7