←Select platform

Csv Property

Summary

Gets the CSV load and save options.

Syntax
C#
C++/CLI
Python
public CodecsCsvOptions Csv { get; } 
public:  
   property CodecsCsvOptions^ Csv 
   { 
      CodecsCsvOptions^ get() 
   } 
Csv # get  (CodecsOptions) 

Property Value

The CSV load and save options.

Example
C#
Java
using Leadtools; 
using Leadtools.Codecs; 
 
using Leadtools.ImageProcessing.Core; 
using Leadtools.Pdf; 
 
public void CodecsCsvOptions_Example() 
{ 
   string csvFileName = Path.Combine(LEAD_VARS.ImagesDir, "sample.csv"); 
   string pngFileName = Path.Combine(LEAD_VARS.ImagesDir, "sample-csv.png"); 
 
   using (RasterCodecs codecs = new RasterCodecs()) 
   { 
      // Change some CSV options 
      CodecsCsvLoadOptions csvOptions = codecs.Options.Csv.Load; // CodecsCsvOptions reference 
      csvOptions.HeaderFontItalic = true; 
      csvOptions.BodyFontName = "Arial"; 
      csvOptions.TableBorderColor = RasterColor.FromKnownColor(RasterKnownColor.Red); 
 
      // Load the first page from a CSV file 
      using (RasterImage image = codecs.Load(csvFileName, 1)) 
      { 
         // Save it as PNG 
         codecs.Save(image, pngFileName, RasterImageFormat.Png, 0); 
      } 
   } 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
 
import java.io.File; 
import java.io.IOException; 
import java.net.URI; 
import java.net.URISyntaxException; 
import java.nio.file.Paths; 
 
import org.junit.*; 
import org.junit.runner.JUnitCore; 
import org.junit.runner.Result; 
import org.junit.runner.notification.Failure; 
import static org.junit.Assert.*; 
 
import leadtools.*; 
import leadtools.codecs.*; 
import leadtools.imageprocessing.core.MinMaxBitsCommand; 
 
 
public void codecsCsvOptionsExample() { 
   final String LEAD_VARS_IMAGES_DIR = "C:\\LEADTOOLS23\\Resources\\Images"; 
   String csvFileName = combine(LEAD_VARS_IMAGES_DIR, "sample.csv"); 
   String pngFileName = combine(LEAD_VARS_IMAGES_DIR, "sample-csv.png"); 
 
   RasterCodecs codecs = new RasterCodecs(); 
 
   // Change some CSV options 
   CodecsCsvLoadOptions csvOptions = codecs.getOptions().getCsv().getLoad(); // CodecsCsvOptions reference 
   csvOptions.setHeaderFontItalic(true); 
   csvOptions.setBodyFontName("Arial"); 
   csvOptions.setTableBorderColor(RasterColor.fromKnownColor(RasterKnownColor.RED)); 
 
   // Load the first page from a CSV file 
   RasterImage image = codecs.load(csvFileName, 1); 
 
   // Save it as PNG 
   codecs.save(image, pngFileName, RasterImageFormat.PNG, 0); 
 
   assertTrue("File unsuccessfully saved to " + pngFileName, (new File(pngFileName)).exists()); 
   System.out.printf("File successfully saved to %s%n", pngFileName); 
 
   image = null; 
   codecs = null; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.