- Posts: 7
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Adding Image to new PDF
IP: 192.168.0.71
8 years 11 months ago #12226
by TeleSon
Replied by TeleSon on topic Adding Image to new PDF
or how can i add it as JPG?
IP: 192.168.0.71
8 years 11 months ago #12227
by nermeen
Replied by nermeen on topic Adding Image to new PDF
You can add JPG images using:
Code:
/**
* create an image from JPEG/JPG file.<br/>
* supported image color space:<br/>
* --GRAY<br/>
* --RGB<br/>
* --CMYK<br/>
* @param path path to JPEG file.
* @return DocImage object or null.
*/
public DocImage NewImageJPEG( String path ){ }
Code:
/**
* create an image from JPEG/JPG byte array.<br/>
* supported image color space:<br/>
* --GRAY<br/>
* --RGB<br/>
* --CMYK<br/>
* @param data byte array include whole jpg file.
* @param len byte length of data.
* @return DocImage object or null.
*/
public DocImage NewImageByMem( byte[] data, int len ) { }
- rohitgarg2990
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
IP: 192.168.0.71
8 years 3 months ago #13256
by rohitgarg2990
Replied by rohitgarg2990 on topic Adding Image to new PDF
Hi Neermen,
I am trying to use the same code mentioned in your reply but i am getting null pointer on the below line. I am getting docimage null even setting icon from drawable. Please suggest something. Thanks!
ResImage rimage = page.AddResImage(docimage);
Regards,
R
I am trying to use the same code mentioned in your reply but i am getting null pointer on the below line. I am getting docimage null even setting icon from drawable. Please suggest something. Thanks!
ResImage rimage = page.AddResImage(docimage);
Regards,
R
IP: 192.168.0.71
8 years 3 months ago #13257
by Davide
Replied by Davide on topic Adding Image to new PDF
Hi,
to use these methods you need a premium license.
I have tried the code Nermeen wrote here and it's working with last version too.
What version of the library are you using? Can you reproduce it with the last one?
For more info check this : www.radaeepdf.com/documentation/javadocs...f.Document.DocImage-
to use these methods you need a premium license.
I have tried the code Nermeen wrote here and it's working with last version too.
What version of the library are you using? Can you reproduce it with the last one?
For more info check this : www.radaeepdf.com/documentation/javadocs...f.Document.DocImage-
- rohitgarg2990
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
IP: 94.204.39.229
5 years 11 months ago #14978
by rohitgarg2990
Replied by rohitgarg2990 on topic Adding Image to new PDF
Hi,
I wanted to confirm if we can achieve this functionality with professional license?
Regards,
Rohit
I wanted to confirm if we can achieve this functionality with professional license?
Regards,
Rohit
IP: 93.36.222.154
5 years 11 months ago #14979
by nermeen
Replied by nermeen on topic Adding Image to new PDF
Dear Rohit,
With professional license you can only add image as an annotation
To add an image to the page content, you must have a premium license.
With professional license you can only add image as an annotation
Code:
Page.AddAnnotBitmap
Time to create page: 0.377 seconds