all,

   I've been scouring the examples and the api for a way to create areas on an 
image that can serve as both destinations and links to other pages in the 
document. I have images with small areas that need to behave as links to other 
pages or more precisely to specific text on other pages if possible. I also 
need to have the reverse functionality where the text can act as a link back to 
the specific area on the image. I've used Chunk's to create simple text links, 
but I'm really coming up empty on how to overlay links onto images. Since there 
doesn't seem to be a way to place a Chunk at an absolute x,y coordinate and I 
need to tie the 'hit areas" to specific locations of the image, the Chunk 
doesn't look to be a solution.

  I've been looking at PdfContentByte, PdfDestination & PdfAction, but to be 
blunt I'm in way over my head here. This is just a huge API to try to get a 
grasp of in a couple of days;-( I've tried the following as an experiment, but 
nothing appears at all and I don't see any evidence that local goto's are 
active on the page with the image. 

        PdfContentByte ovrlay=pdfwri.getDirectContent();
         for(int idx=0; idx<bubbles.length; idx++) {
                float                           ctrX;
                float                           ctrY;
                float                           locX;
                float                           locY;
                int                             bubnum;
                PdfContentByte                  cntbyt;
                
                bubble=bubbles[idx];
                ctrX=bubble.getField("centerX",0.0f);
                ctrY=bubble.getField("centerY",0.0f);
                bubnum=bubble.getField("bubbleNum",0);
                locX=x+(ctrX*w);
                locY=y+(ctrY*h);
                cntbyt=new PdfContentByte(pdfwri);
                cntbyt.setColorFill(Color.BLUE);
                cntbyt.setColorStroke(Color.BLUE);
                cntbyt.localGoto(LIST+" 
"+sectionNumber+"-"+currentFigure+svcgrpdsc+" "+PART+bubnum, locX-5, locY-5, 
locX+5, locY+5);
                cntbyt.circle(locX,locY,5.0f);
                ovrlay.add(cntbyt);
                }

  Any advice on how to do this gratefully accepted.

Bob




------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to