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

TOPIC:

Display Bitmap and Drawable contents on the pages 8 years 4 months ago #9910

  • jorisk
  • jorisk's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 37
  • Thank you received: 0
Hi Davide, after few months, I still didn't get how to do it.
See my video for more about my problem:


The two URI annotations are well placed, and move with the page when we scroll or zoom, depending on the page with AddAnnotURI.
But when you do it with a Bitmap annotation, look what is happening.

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

Last edit: by jorisk.

Display Bitmap and Drawable contents on the pages 8 years 4 months ago #9915

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
to add annot bitmap correctly, I suggest you to look at PDFSetStamp method of PDFReader class.
In the demo project if you try to add image to the pdf with "Stamp button", the bitmap doesn't move to other page like in your video.

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

Display Bitmap and Drawable contents on the pages 8 years 4 months ago #9916

  • jorisk
  • jorisk's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 37
  • Thank you received: 0
Thanks Davide, I think I start to understand how to get it, these are the called methods (in the good order):
1) PDFSetStamp (start)
2) onTouchStamp
3) onDrawStamp
4) PDFSetStamp (end)
But is there a way to send automatic coordinates (not drawn with the fingers like steps 2nd and 3rd)? If yes, what kind of coordinates we must put? Percents or pixels?

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

Display Bitmap and Drawable contents on the pages 8 years 4 months ago #9917

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
this is the method that draws the bitmap to the pdf:
page.AddAnnotBitmap(m_icon, true, rect);

rect - 4 elements: left, top, right, bottom in PDF coordinate system.

For more info check :
www.radaeepdf.com/documentation/javadocs....html#AddAnnotBitmap(Bitmap, boolean, float[])

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

Powered by Kunena Forum