Example #1
0
        public static int convertImageDataToPdfData(IntPtr imdata, IntPtr size, PdfFormattedEncodingTypes type, int quality, out IntPtr pdata, IntPtr pnbytes, int x, int y, int res, string title, out IntPtr plpd, PdfMultiImageFlags position)
        {
            if (IntPtr.Zero == imdata ||
                IntPtr.Zero == size ||
                IntPtr.Zero == pnbytes)
            {
                throw new ArgumentNullException("imdata, size, pnbytes cannot be null.");
            }

            return(Native.DllImports.convertImageDataToPdfData(imdata, size, (int)type, quality, out pdata, pnbytes, x, y, res, title, out plpd, (int)position));
        }
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 convertToPdfData(string filein, PdfFormattedEncodingTypes type, int quality, out IntPtr pdata, IntPtr pnbytes, int x, int y, int res, string title, out IntPtr plpd, PdfMultiImageFlags position)
        {
            if (string.IsNullOrWhiteSpace(filein) ||
                IntPtr.Zero == pnbytes)
            {
                throw new ArgumentNullException("filein, pnbytes cannot be null.");
            }

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

            return(Native.DllImports.convertToPdfData(filein, (int)type, quality, out pdata, pnbytes, x, y, res, title, out plpd, (int)position));
        }