/// <summary> /// Insert the Image Object into the Document before placing it in a document page /// </summary> /// <param name="file"> /// the Color 72dpi Jpeg Image to insert into the document /// </param> /// <returns> /// ///</returns> //public PdfImage NewImage(string file) //{ // PdfImage pi; // try { pi = new PdfImage(this.GetNextId, file); } // catch { throw new Exception("Error opening the Image File"); } // this.AddPdfObject(pi); // return pi; //} /// <summary> /// Insert the Image Object into the Document before placing it in a document page /// </summary> /// <param name="file"> /// the Color 72dpi Jpeg Image to insert into the document /// </param> /// <returns> /// ///</returns> public PdfImage NewImage(byte[] file) { PdfImage pi; try { pi = new PdfImage(this.GetNextId, file); } catch { throw new Exception("Error abriendo imagen del flujo de bytes"); } this.AddPdfObject(pi); return(pi); }
/// <summary> /// Insert the Image Object into the Document before placing it in a document page /// </summary> /// <param name="file"> /// the Color 72dpi Jpeg Image to insert into the document /// </param> /// <returns> /// ///</returns> public PdfImage NewImage(string file) { PdfImage pi; try { pi = new PdfImage(this.GetNextId, file); } catch { throw new Exception("Error opening the Image File"); } this.AddPdfObject(pi); return(pi); }
/// <summary> /// adds a Pdf Element into this PdfPage. /// </summary> /// <param name="PdfImage"></param> /// <param name="posx">The target X positioning of the picture.</param> /// <param name="posy">The target Y positioning of the picture.</param> /// <param name="DPI">The target resolution of the picture.</param> public void Add(PdfImage PdfImage, double posx, double posy, double DPI) { if (DPI <= 0) { throw new Exception("DPI must be greater than zero."); } this.PagePdfObjects.Add(PdfImage); this.PagePdfObjects.Add(new PdfImageContent(PdfDocument.GetNextId, "I" + PdfImage.ID, PdfImage.ID, PdfImage.Width, PdfImage.Height, posx, this.PdfDocument.PH - posy, DPI)); }
/// <summary> /// Insert the Image Object into the Document before placing it in a document page /// </summary> /// <param name="file"> /// the Color 72dpi Jpeg Image to insert into the document /// </param> /// <returns> /// ///</returns> public PdfImage NewImage(string file) { PdfImage pi; try {pi=new PdfImage(this.GetNextId,file);} catch {throw new Exception("Error opening the Image File");} this.AddPdfObject(pi); return pi; }
/// <summary> /// adds a Pdf Element into this PdfPage. /// </summary> /// <param name="PdfImage"></param> /// <param name="posx"></param> /// <param name="posy"></param> public void Add(PdfImage PdfImage,double posx,double posy) { this.PagePdfObjects.Add(PdfImage); this.PagePdfObjects.Add(new PdfImageContent(PdfDocument.GetNextId,"I"+PdfImage.ID,PdfImage.ID,PdfImage.Width,PdfImage.Height,posx,this.PdfDocument.PH-posy,PdfImage.bmp.HorizontalResolution)); }
/// <summary> /// adds a Pdf Element into this PdfPage. /// </summary> /// <param name="PdfImage"></param> /// <param name="posx">The target X positioning of the picture.</param> /// <param name="posy">The target Y positioning of the picture.</param> /// <param name="DPI">The target resolution of the picture.</param> public void Add(PdfImage PdfImage,double posx,double posy,double DPI) { if (DPI<=0) throw new Exception("DPI must be greater than zero."); this.PagePdfObjects.Add(PdfImage); this.PagePdfObjects.Add(new PdfImageContent(PdfDocument.GetNextId,"I"+PdfImage.ID,PdfImage.ID,PdfImage.Width,PdfImage.Height,posx,this.PdfDocument.PH-posy,DPI)); }
/// <summary> /// adds a Pdf Element into this PdfPage. /// </summary> /// <param name="PdfImage"></param> /// <param name="posx"></param> /// <param name="posy"></param> public void Add(PdfImage PdfImage, double posx, double posy) { this.PagePdfObjects.Add(PdfImage); this.PagePdfObjects.Add(new PdfImageContent(PdfDocument.GetNextId, "I" + PdfImage.ID, PdfImage.ID, PdfImage.Width, PdfImage.Height, posx, this.PdfDocument.PH - posy, PdfImage.bmp.HorizontalResolution)); }