[iText-questions] data:image/bmp;base64 to pdf question

2013-05-06 Thread Anil George
Hi everyone, quick question.
Does anyone know how to convert a data:image/bmp;base64 from a html page to a 
pdf via iText?

Anil George
Senior Web Developer
HEALTHWORKS a division of
PASSPORTHEALTH 
COMMUNICATIONS INC.
1265 Drummers La., Suite 202
Wayne, PA 19087

610-994-0302
610-354-0900 ext. 302 (Toll Free)
anil.geo...@passporthealth.com

http://www.passporthealth.com

CONFIDENTIALITY NOTICE: This e-mail communication and all attachments are for 
the sole use of the intended recipient(s) and may contain confidential and 
privileged information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, please 
contact the sender by replying to this e-mail message and delete all copies and 
attachments of the original message.


--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] data:image/bmp;base64 to pdf question

2013-05-06 Thread Mohammed AlSayani
I use  this in my website  but Im getting the tiff images  from DB as Byte
may it help you


  if (memoryStream != null)
{

var imageFile =
System.Drawing.Image.FromStream(memoryStream);
var frameDimensions = new
System.Drawing.Imaging.FrameDimension(imageFile.FrameDimensionsList[0]);
var numberOfFrames =
imageFile.GetFrameCount(frameDimensions);
var paths = new string[numberOfFrames];
for (int intFrame = 0; intFrame  numberOfFrames;
++intFrame)
{
imageFile.SelectActiveFrame(frameDimensions,
intFrame);
var bmp = new Bitmap(imageFile);
iTextSharp.text.Image img =
iTextSharp.text.Image.GetInstance(bmp,
System.Drawing.Imaging.ImageFormat.Bmp);
// scale the image to fit in the page
img.ScaleAbsolute(pdfDoc.PageSize.Width,
pdfDoc.PageSize.Height);
pdfDoc.Add(img);
pdfDoc.SetMargins(1, 1f, 1f, 1f);
pdfDoc.NewPage();

bmp.Dispose();

}


On 6 May 2013 16:26, Anil George anil.geo...@passporthealth.com wrote:

 Hi everyone, quick question.
 Does anyone know how to convert a data:image/bmp;base64 from a html page
 to a pdf via iText?

 Anil George
 Senior Web Developer
 HEALTHWORKS a division of
 PASSPORTHEALTH
 COMMUNICATIONS INC.
 1265 Drummers La., Suite 202
 Wayne, PA 19087

 610-994-0302
 610-354-0900 ext. 302 (Toll Free)
 anil.geo...@passporthealth.com

 http://www.passporthealth.com

 CONFIDENTIALITY NOTICE: This e-mail communication and all attachments are
 for the sole use of the intended recipient(s) and may contain confidential
 and privileged information. Any unauthorized review, use, disclosure or
 distribution is prohibited. If you are not the intended recipient, please
 contact the sender by replying to this e-mail message and delete all copies
 and attachments of the original message.



 --
 Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
 Get 100% visibility into your production application - at no cost.
 Code-level diagnostics for performance bottlenecks with 2% overhead
 Download for free and get started troubleshooting in minutes.
 http://p.sf.net/sfu/appdyn_d2d_ap1
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 iText(R) is a registered trademark of 1T3XT BVBA.
 Many questions posted to this list can (and will) be answered with a
 reference to the iText book: http://www.itextpdf.com/book/
 Please check the keywords list before you ask for examples:
 http://itextpdf.com/themes/keywords.php




-- 
Best Regards
---
*Mohammed Hashem*
Web Developer @ ArabSea.
www.arabsea.com
00966 - 538 766 152
--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] data:image/bmp;base64 to pdf question

2013-05-06 Thread Anil George
Awesome! Thank you so much. I have another question though, can you do the 
pdfdoc.add at a particular area in the document?

Anil George
Senior Web Developer
[cid:image001.png@01CE4A3E.0ED10450]HEALTHWORKS a division of
PASSPORTHEALTH
COMMUNICATIONS INC.
1265 Drummers La., Suite 202
Wayne, PA 19087

610-994-0302
610-354-0900 ext. 302 (Toll Free)
anil.geo...@passporthealth.commailto:anil.geo...@passporthealth.com

http://www.passporthealth.comhttp://www.passporthealth.com/

CONFIDENTIALITY NOTICE: This e-mail communication and all attachments are for 
the sole use of the intended recipient(s) and may contain confidential and 
privileged information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, please 
contact the sender by replying to this e-mail message and delete all copies and 
attachments of the original message.

From: Mohammed AlSayani [mailto:mohammed.alsay...@gmail.com]
Sent: Monday, May 06, 2013 9:33 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] data:image/bmp;base64 to pdf question

I use  this in my website  but Im getting the tiff images  from DB as Byte
may it help you


  if (memoryStream != null)
{

var imageFile = 
System.Drawing.Image.FromStream(memoryStream);
var frameDimensions = new 
System.Drawing.Imaging.FrameDimension(imageFile.FrameDimensionsList[0]);
var numberOfFrames = 
imageFile.GetFrameCount(frameDimensions);
var paths = new string[numberOfFrames];
for (int intFrame = 0; intFrame  numberOfFrames; 
++intFrame)
{
imageFile.SelectActiveFrame(frameDimensions, 
intFrame);
var bmp = new Bitmap(imageFile);
iTextSharp.text.Image img = 
iTextSharp.text.Image.GetInstance(bmp, System.Drawing.Imaging.ImageFormat.Bmp);
// scale the image to fit in the page
img.ScaleAbsolute(pdfDoc.PageSize.Width, 
pdfDoc.PageSize.Height);
pdfDoc.Add(img);
pdfDoc.SetMargins(1, 1f, 1f, 1f);
pdfDoc.NewPage();

bmp.Dispose();

}

On 6 May 2013 16:26, Anil George 
anil.geo...@passporthealth.commailto:anil.geo...@passporthealth.com wrote:
Hi everyone, quick question.
Does anyone know how to convert a data:image/bmp;base64 from a html page to a 
pdf via iText?

Anil George
Senior Web Developer
HEALTHWORKS a division of
PASSPORTHEALTH
COMMUNICATIONS INC.
1265 Drummers La., Suite 202
Wayne, PA 19087

610-994-0302
610-354-0900 ext. 302 (Toll Free)
anil.geo...@passporthealth.commailto:anil.geo...@passporthealth.com

http://www.passporthealth.com

CONFIDENTIALITY NOTICE: This e-mail communication and all attachments are for 
the sole use of the intended recipient(s) and may contain confidential and 
privileged information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, please 
contact the sender by replying to this e-mail message and delete all copies and 
attachments of the original message.


--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
___
iText-questions mailing list
iText-questions@lists.sourceforge.netmailto:iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php



--
Best Regards
---
Mohammed Hashem
Web Developer @ ArabSea.
www.arabsea.comhttp://www.arabsea.com
00966 - 538 766 152
inline: image001.png--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA

Re: [iText-questions] data:image/bmp;base64 to pdf question

2013-05-06 Thread Mohammed AlSayani
 anil.geo...@passporthealth.com wrote:

 Awesome! Thank you so much. I have another question though, can you do the
 pdfdoc.add at a particular area in the document?

 ** **

 Anil George

 *Senior Web Developer*

 *[image: healthworks-logo]*HEALTHWORKS a division of

 PASSPORTHEALTH 

 COMMUNICATIONS INC.

 1265 Drummers La., Suite 202

 Wayne, PA 19087

 ** **

 610-994-0302

 610-354-0900 ext. 302 (Toll Free)

 anil.geo...@passporthealth.com

 ** **

 http://www.passporthealth.com

 ** **

 CONFIDENTIALITY NOTICE: This e-mail communication and all attachments are
 for the sole use of the intended recipient(s) and may contain confidential
 and privileged information. Any unauthorized review, use, disclosure or
 distribution is prohibited. If you are not the intended recipient, please
 contact the sender by replying to this e-mail message and delete all copies
 and attachments of the original message.

 ** **

 *From:* Mohammed AlSayani [mailto:mohammed.alsay...@gmail.com]
 *Sent:* Monday, May 06, 2013 9:33 AM
 *To:* Post all your questions about iText here
 *Subject:* Re: [iText-questions] data:image/bmp;base64 to pdf question

 ** **

 I use  this in my website  but Im getting the tiff images  from DB as Byte
 

 may it help you 



   if (memoryStream != null)
 {

 var imageFile =
 System.Drawing.Image.FromStream(memoryStream);
 var frameDimensions = new
 System.Drawing.Imaging.FrameDimension(imageFile.FrameDimensionsList[0]);
 var numberOfFrames =
 imageFile.GetFrameCount(frameDimensions);
 var paths = new string[numberOfFrames];
 for (int intFrame = 0; intFrame  numberOfFrames;
 ++intFrame)
 {
 imageFile.SelectActiveFrame(frameDimensions,
 intFrame);
 var bmp = new Bitmap(imageFile);
 iTextSharp.text.Image img =
 iTextSharp.text.Image.GetInstance(bmp,
 System.Drawing.Imaging.ImageFormat.Bmp);
 // scale the image to fit in the page
 img.ScaleAbsolute(pdfDoc.PageSize.Width,
 pdfDoc.PageSize.Height);
 pdfDoc.Add(img);
 pdfDoc.SetMargins(1, 1f, 1f, 1f);
 pdfDoc.NewPage();

 bmp.Dispose();

 }

 ** **

 On 6 May 2013 16:26, Anil George anil.geo...@passporthealth.com wrote:**
 **

 Hi everyone, quick question.
 Does anyone know how to convert a data:image/bmp;base64 from a html page
 to a pdf via iText?

 Anil George
 Senior Web Developer
 HEALTHWORKS a division of
 PASSPORTHEALTH
 COMMUNICATIONS INC.
 1265 Drummers La., Suite 202
 Wayne, PA 19087

 610-994-0302
 610-354-0900 ext. 302 (Toll Free)
 anil.geo...@passporthealth.com

 http://www.passporthealth.com

 CONFIDENTIALITY NOTICE: This e-mail communication and all attachments are
 for the sole use of the intended recipient(s) and may contain confidential
 and privileged information. Any unauthorized review, use, disclosure or
 distribution is prohibited. If you are not the intended recipient, please
 contact the sender by replying to this e-mail message and delete all copies
 and attachments of the original message.



 --
 Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
 Get 100% visibility into your production application - at no cost.
 Code-level diagnostics for performance bottlenecks with 2% overhead
 Download for free and get started troubleshooting in minutes.
 http://p.sf.net/sfu/appdyn_d2d_ap1
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 iText(R) is a registered trademark of 1T3XT BVBA.
 Many questions posted to this list can (and will) be answered with a
 reference to the iText book: http://www.itextpdf.com/book/
 Please check the keywords list before you ask for examples:
 http://itextpdf.com/themes/keywords.php




 -- 

 Best Regards
 ---
 *Mohammed Hashem*
 Web Developer @ ArabSea.
 www.arabsea.com
 00966 - 538 766 152


 --
 Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
 Get 100% visibility into your production application - at no cost.
 Code-level diagnostics for performance bottlenecks with 2% overhead
 Download for free and get started troubleshooting in minutes.
 http://p.sf.net/sfu/appdyn_d2d_ap1
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions