borderStyle.setStyle("D"); break; case "bevelled": borderStyle.setStyle("B"); break; case "inset": borderStyle.setStyle("I"); break; case "underline": borderStyle.setStyle("U"); break; case "cloudy": borderStyle.setStyle("S"); PDBorderEffectDictionary borderEffect = new PDBorderEffectDictionary(); borderEffect.setStyle("C"); break; default: borderStyle.setStyle("S"); break;
PDBorderStyleDictionary borderStyleDictionary = new PDBorderStyleDictionary(); borderStyleDictionary.setWidth(2); borderStyleDictionary.setStyle(PDBorderStyleDictionary.STYLE_SOLID); widget.setBorderStyle(borderStyleDictionary); widget.setPage(page);
borderStyleDictionary.setStyle(PDBorderStyleDictionary.STYLE_SOLID); widget.setBorderStyle(borderStyleDictionary);
private void addLinkToPage(PDPage page, PDAnnotationLink annot) { PDBorderStyleDictionary styleDict = new PDBorderStyleDictionary(); styleDict.setWidth(0); styleDict.setStyle(PDBorderStyleDictionary.STYLE_SOLID); annot.setBorderStyle(styleDict); try { List<PDAnnotation> annots = page.getAnnotations(); if (annots == null) { annots = new ArrayList<PDAnnotation>(); page.setAnnotations(annots); } annots.add(annot); } catch (IOException e) { throw new PdfContentStreamAdapter.PdfException("processLink", e); } }
private void addLinkToPage(PDPage page, PDAnnotationLink annot) { PDBorderStyleDictionary styleDict = new PDBorderStyleDictionary(); styleDict.setWidth(0); styleDict.setStyle(PDBorderStyleDictionary.STYLE_SOLID); annot.setBorderStyle(styleDict); try { List<PDAnnotation> annots = page.getAnnotations(); if (annots == null) { annots = new ArrayList<PDAnnotation>(); page.setAnnotations(annots); } annots.add(annot); } catch (IOException e) { throw new PdfContentStreamAdapter.PdfException("processLink", e); } }
private void addLinkToPage(PDPage page, PDAnnotationLink annot) { PDBorderStyleDictionary styleDict = new PDBorderStyleDictionary(); styleDict.setWidth(0); styleDict.setStyle(PDBorderStyleDictionary.STYLE_SOLID); annot.setBorderStyle(styleDict); try { List<PDAnnotation> annots = page.getAnnotations(); if (annots == null) { annots = new ArrayList<PDAnnotation>(); page.setAnnotations(annots); } annots.add(annot); } catch (IOException e) { throw new PdfContentStreamAdapter.PdfException("processLink", e); } }
borderULine.setStyle(PDBorderStyleDictionary.STYLE_UNDERLINE); borderULine.setWidth(INCH / 72); // 1 point
borderStyle.setStyle("D"); break; case "bevelled": borderStyle.setStyle("B"); break; case "inset": borderStyle.setStyle("I"); break; case "underline": borderStyle.setStyle("U"); break; case "cloudy": borderStyle.setStyle("S"); PDBorderEffectDictionary borderEffect = new PDBorderEffectDictionary(); borderEffect.setStyle("C"); break; default: borderStyle.setStyle("S"); break;
PDBorderStyleDictionary borderULine = new PDBorderStyleDictionary(); borderULine.setStyle(PDBorderStyleDictionary.STYLE_UNDERLINE); borderULine.setWidth(1); PDAnnotationLink txtLink = new PDAnnotationLink(); txtLink.setBorderStyle(borderULine); // Set the rectangle containing the link textWidth = font.getStringWidth("Click here") / 1000 * xscale; position = new PDRectangle(); position.setLowerLeftX(...); position.setLowerLeftY(...); position.setUpperRightX(...); position.setUpperRightY(...); txtLink.setRectangle(position); // add an action PDActionURI action = new PDActionURI(); action.setURI("http://pdfbox.apache.org"); txtLink.setAction(action); annotations.add(txtLink);
borderULine.setStyle(PDBorderStyleDictionary.STYLE_UNDERLINE); borderULine.setWidth(INCH / 72); // 1 point