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

Display Bitmap and Drawable contents on the pages

More
10 years 4 months ago - 10 years 4 months ago #9910 by jorisk
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.
Last edit: 10 years 4 months ago by jorisk.
More
10 years 4 months ago #9915 by Davide
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.
More
10 years 4 months ago #9916 by jorisk
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?
More
10 years 4 months ago #9917 by Davide
Hi,
this is the method that draws the bitmap to the pdf:
Code:
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[])
Time to create page: 0.360 seconds
Powered by Kunena Forum