コード例 #1
0
 /// <summary>
 /// Rasterises a PDF into selected format
 /// </summary>
 /// <param name="inputPath">PDF file to convert</param>
 /// <param name="outputPath">Destination file</param>
 /// <param name="settings">Conversion settings</param>
 public static void GenerateOutput(string inputPath, string outputPath, GhostscriptSettings settings)
 {
     if (IntPtr.Size == 4)
     {
         GhostScript32.CallApi(GetArgs(inputPath, outputPath, settings));
     }
     else
     {
         GhostScript64.CallApi(GetArgs(inputPath, outputPath, settings));
     }
 }
コード例 #2
0
 /// <summary>
 /// Generates a collection of thumbnail jpgs for the pdf at the input path
 /// starting with firstPage and ending with lastPage.
 /// Put "%d" somewhere in the output path to have each of the pages numbered
 /// </summary>
 public static void GeneratePageThumbs(string inputPath, string outputPath, int firstPage, int lastPage, int dpix, int dpiy, int width = 0, int height = 0)
 {
     if (IntPtr.Size == 4)
     {
         GhostScript32.CallApi(GetArgs(inputPath, outputPath, firstPage, lastPage, dpix, dpiy, width, height));
     }
     else
     {
         GhostScript64.CallApi(GetArgs(inputPath, outputPath, firstPage, lastPage, dpix, dpiy, width, height));
     }
 }