Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC:

Adding Image to new PDF 7 years 1 week ago #12226

  • TeleSon
  • TeleSon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
or how can i add it as JPG?

Please Log in or Create an account to join the conversation.

Adding Image to new PDF 7 years 1 week ago #12227

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
You can add JPG images using:
/**
	 * 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 ){	}
/**
     * 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 ) {    }

Please Log in or Create an account to join the conversation.

Adding Image to new PDF 6 years 4 months ago #13256

  • rohitgarg2990
  • rohitgarg2990's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
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

Please Log in or Create an account to join the conversation.

Adding Image to new PDF 6 years 4 months ago #13257

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
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-

Please Log in or Create an account to join the conversation.

Adding Image to new PDF 3 years 11 months ago #14978

  • rohitgarg2990
  • rohitgarg2990's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
Hi,

I wanted to confirm if we can achieve this functionality with professional license?

Regards,
Rohit

Please Log in or Create an account to join the conversation.

Adding Image to new PDF 3 years 11 months ago #14979

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
Dear Rohit,

With professional license you can only add image as an annotation
Page.AddAnnotBitmap
To add an image to the page content, you must have a premium license.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Powered by Kunena Forum