/** * Prepare the given PdfWriter. Called before building the PDF document, * that is, before the call to {@code Document.open()}. * <p>Useful for registering a page event listener, for example. * The default implementation sets the viewer preferences as returned * by this class's {@code getViewerPreferences()} method. * @param model the model, in case meta information must be populated from it * @param writer the PdfWriter to prepare * @param request in case we need locale etc. Shouldn't look at attributes. * @throws DocumentException if thrown during writer preparation * @see com.lowagie.text.Document#open() * @see com.lowagie.text.pdf.PdfWriter#setPageEvent * @see com.lowagie.text.pdf.PdfWriter#setViewerPreferences * @see #getViewerPreferences() */ protected void prepareWriter(Map<String, Object> model, PdfWriter writer, HttpServletRequest request) throws DocumentException { writer.setViewerPreferences(getViewerPreferences()); }
/** * Prepare the given PdfWriter. Called before building the PDF document, * that is, before the call to {@code Document.open()}. * <p>Useful for registering a page event listener, for example. * The default implementation sets the viewer preferences as returned * by this class's {@code getViewerPreferences()} method. * @param model the model, in case meta information must be populated from it * @param writer the PdfWriter to prepare * @param request in case we need locale etc. Shouldn't look at attributes. * @throws DocumentException if thrown during writer preparation * @see com.lowagie.text.Document#open() * @see com.lowagie.text.pdf.PdfWriter#setPageEvent * @see com.lowagie.text.pdf.PdfWriter#setViewerPreferences * @see #getViewerPreferences() */ protected void prepareWriter(Map<String, Object> model, PdfWriter writer, HttpServletRequest request) throws DocumentException { writer.setViewerPreferences(getViewerPreferences()); }
/** * Prepare the given PdfWriter. Called before building the PDF document, * that is, before the call to {@code Document.open()}. * <p>Useful for registering a page event listener, for example. * The default implementation sets the viewer preferences as returned * by this class's {@code getViewerPreferences()} method. * @param model the model, in case meta information must be populated from it * @param writer the PdfWriter to prepare * @param request in case we need locale etc. Shouldn't look at attributes. * @throws DocumentException if thrown during writer preparation * @see com.lowagie.text.Document#open() * @see com.lowagie.text.pdf.PdfWriter#setPageEvent * @see com.lowagie.text.pdf.PdfWriter#setViewerPreferences * @see #getViewerPreferences() */ protected void prepareWriter(Map<String, Object> model, PdfWriter writer, HttpServletRequest request) throws DocumentException { writer.setViewerPreferences(getViewerPreferences()); }