Example #1
0
        public static int pixConvertToPdfDataSegmented(this Pix pixs, int res, PdfFormattedEncodingTypes type, int thresh, Boxaa boxa, int quality, float scalefactor, string title, out IntPtr pdata, IntPtr pnbytes)
        {
            if (null == pixs)
            {
                throw new ArgumentNullException("pixs cannot be null.");
            }

            return(Native.DllImports.pixConvertToPdfDataSegmented((HandleRef)pixs, res, (int)type, thresh, (HandleRef)boxa, quality, scalefactor, title, out pdata, pnbytes));
        }
Example #2
0
        public static int pixConvertToPdf(this Pix pix, PdfFormattedEncodingTypes type, int quality, string fileout, int x, int y, int res, string title, out IntPtr plpd, PdfMultiImageFlags position)
        {
            if (null == pix)
            {
                throw new ArgumentNullException("pix cannot be null.");
            }

            return(Native.DllImports.pixConvertToPdf((HandleRef)pix, (int)type, quality, fileout, x, y, res, title, out plpd, (int)position));
        }
Example #3
0
        public static int convertImageDataToPdf(IntPtr imdata, IntPtr size, PdfFormattedEncodingTypes type, int quality, string fileout, int x, int y, int res, string title, out IntPtr plpd, PdfMultiImageFlags position)
        {
            if (IntPtr.Zero == imdata ||
                IntPtr.Zero == size)
            {
                throw new ArgumentNullException("imdata, size cannot be null.");
            }

            return(Native.DllImports.convertImageDataToPdf(imdata, size, (int)type, quality, fileout, x, y, res, title, out plpd, (int)position));
        }
Example #4
0
        public static int convertToPdfDataSegmented(string filein, int res, PdfFormattedEncodingTypes type, int thresh, Boxaa boxa, int quality, float scalefactor, string title, out IntPtr pdata, IntPtr pnbytes)
        {
            if (string.IsNullOrWhiteSpace(filein))
            {
                throw new ArgumentNullException("filein cannot be null.");
            }

            if (!System.IO.File.Exists(filein))
            {
                throw new System.IO.FileNotFoundException("filein does not exist.");
            }

            return(Native.DllImports.convertToPdfDataSegmented(filein, res, (int)type, thresh, (HandleRef)boxa, quality, scalefactor, title, out pdata, pnbytes));
        }
Example #5
0
        // 4. Single page, multi-image converters
        public static int convertToPdf(string filein, PdfFormattedEncodingTypes type, int quality, string fileout, int x, int y, int res, string title, out IntPtr plpd, PdfMultiImageFlags position)
        {
            if (string.IsNullOrWhiteSpace(filein))
            {
                throw new ArgumentNullException("filein cannot be null.");
            }

            if (!System.IO.File.Exists(filein))
            {
                throw new System.IO.FileNotFoundException("filein does not exist.");
            }

            return(Native.DllImports.convertToPdf(filein, (int)type, quality, fileout, x, y, res, title, out plpd, (int)position));
        }
Example #6
0
 // Conversion to pdf
 public static int pixacompConvertToPdf(this PixaComp pixac, int res, float scalefactor, PdfFormattedEncodingTypes type, int quality, string title, string fileout)
 {
     return(Native.DllImports.pixacompConvertToPdf((HandleRef)pixac, res, scalefactor, (int)type, quality, title, fileout));
 }
Example #7
0
        // 1. Convert specified image files to pdf(one image file per page)
        public static int convertFilesToPdf(string dirname, string substr, int res, float scalefactor, PdfFormattedEncodingTypes type, int quality, string title, string fileout)
        {
            if (string.IsNullOrWhiteSpace(dirname))
            {
                throw new ArgumentNullException("dirname cannot be null.");
            }

            if (!System.IO.Directory.Exists(dirname))
            {
                throw new System.IO.DirectoryNotFoundException("dirname does not exist.");
            }

            return(Native.DllImports.convertFilesToPdf(dirname, substr, res, scalefactor, (int)type, quality, title, fileout));
        }
Example #8
0
        public static int saConvertFilesToPdfData(this Sarray sa, int res, float scalefactor, PdfFormattedEncodingTypes type, int quality, string title, out IntPtr pdata, IntPtr pnbytes)
        {
            if (null == sa ||
                IntPtr.Zero == pnbytes)
            {
                throw new ArgumentNullException("sa, pnbytes cannot be null.");
            }

            return(Native.DllImports.saConvertFilesToPdfData((HandleRef)sa, res, scalefactor, (int)type, quality, title, out pdata, pnbytes));
        }
Example #9
0
        public static int saConvertFilesToPdf(this Sarray sa, int res, float scalefactor, PdfFormattedEncodingTypes type, int quality, string title, string fileout)
        {
            if (null == sa)
            {
                throw new ArgumentNullException("sa cannot be null.");
            }

            return(Native.DllImports.saConvertFilesToPdf((HandleRef)sa, res, scalefactor, (int)type, quality, title, fileout));
        }