2017-02-09 1 views

답변

0

나는 다음과 같은 코드를 사용하여 문제를 해결할 수 있었다
2

PDFium에는 다양한 FPDF_RenderPage * 메소드에 전달할 수있는 FPDF_ANNOT 플래그가 있습니다. PDFiumViewer 코드가 어딘가에서 동일한 플래그를 제공 할 수 있습니다.

doc = PDDocument.load(FilePath); 
PDPage page = (PDPage)doc.getDocumentCatalog().getAllPages().get(pageNum); 
int rotPD = page.findRotation(); 
PDRectangle pageBound = page.findCropBox(); 
PDRectangle rect = ModifyRectAccordingToRotation(rectangle, rotPD, pageBound); 
PDAnnotationLink txtLink = new PDAnnotationLink(); 
    PDBorderStyleDictionary borderULine = new PDBorderStyleDictionary(); 
        borderULine.setStyle(PDBorderStyleDictionary.STYLE_UNDERLINE); 
borderULine.setWidth(0); 
txtLink.setBorderStyle(borderULine); 
PDActionRemoteGoTo remoteGoto = new PDActionRemoteGoTo(); 
PDComplexFileSpecification fileDesc = new PDComplexFileSpecification(); 
fileDesc.setFile(System.IO.Path.GetFileName(path)); 
remoteGoto.setOpenInNewWindow(true); 
remoteGoto.setFile(fileDesc); 
txtLink.setAction(remoteGoto); 
txtLink.setRectangle(rect); 
page.getAnnotations().add(txtLink); 
:
관련 문제