private PDDocumentInformation createPDFDocumentInfo(String title, String creator, String subject) { LOG.info("Setting document info (title, author, subject) for merged PDF"); PDDocumentInformation documentInformation = new PDDocumentInformation(); documentInformation.setTitle(title); documentInformation.setCreator(creator); documentInformation.setSubject(subject); return documentInformation; }
@Override public void setTitle(String title) { this.info.setTitle(title); }
private PDDocumentInformation createPDFDocumentInfo(String title, String creator, String subject) { LOG.info("Setting document info (title, author, subject) for merged PDF"); PDDocumentInformation documentInformation = new PDDocumentInformation(); documentInformation.setTitle(title); documentInformation.setCreator(creator); documentInformation.setSubject(subject); return documentInformation; }
PDDocumentInformation docInfo = inPdfDoc.getDocumentInformation(); if (inTitle != null) { docInfo.setTitle(inTitle);
private void setDidValues(PDDocument doc) { PDDocumentInformation info = new PDDocumentInformation(); info.setCreationDate(Calendar.getInstance()); if (_producer == null) { info.setProducer("openhtmltopdf.com"); } else { info.setProducer(_producer); } for (Metadata metadata : _outputDevice.getMetadata()) { String name = metadata.getName(); if (name.isEmpty()) continue; String content = metadata.getContent(); if( content == null ) continue; if( name.equals("title")) info.setTitle(content); else if( name.equals("author")) info.setAuthor(content); else if(name.equals("subject")) info.setSubject(content); else if(name.equals("keywords")) info.setKeywords(content); else info.setCustomMetadataValue(name,content); } doc.setDocumentInformation(info); }
private void setDidValues(PDDocument doc) { PDDocumentInformation info = new PDDocumentInformation(); info.setCreationDate(Calendar.getInstance()); if (_producer == null) { info.setProducer("openhtmltopdf.com"); } else { info.setProducer(_producer); } for (Metadata metadata : _outputDevice.getMetadata()) { String name = metadata.getName(); if (name.isEmpty()) continue; String content = metadata.getContent(); if( content == null ) continue; if( name.equals("title")) info.setTitle(content); else if( name.equals("author")) info.setAuthor(content); else if(name.equals("subject")) info.setSubject(content); else if(name.equals("keywords")) info.setKeywords(content); else info.setCustomMetadataValue(name,content); } doc.setDocumentInformation(info); }
info.setCreator("Pdf"); info.setSubject("Stéganographie"); info.setTitle("Stéganographie dans les documents PDF"); info.setKeywords("Stéganographie, pdf"); content= new PDPageContentStream(document, page);