public void addElement( Element element ) { super.add( element ); }
@Override protected void visitEmptyRun( IITextContainer paragraphContainer ) throws Exception { ExtendedParagraph pdfParagraph = (ExtendedParagraph) paragraphContainer; pdfParagraph.add( Chunk.NEWLINE ); }
public void addElement(Element element) { super.add(element); }
@SuppressWarnings( "unchecked" ) private void postProcessBookmarks() { // add space if last chunk is a bookmark // otherwise the bookmark will disappear from pdf ArrayList<Chunk> chunks = getChunks(); if ( chunks.size() > 0 ) { Chunk lastChunk = chunks.get( chunks.size() - 1 ); String localDestination = null; if ( lastChunk.getAttributes() != null ) { localDestination = (String) lastChunk.getAttributes().get( Chunk.LOCALDESTINATION ); } if ( localDestination != null ) { super.add( new Chunk( ODFUtils.NON_BREAKING_SPACE_STR ) ); } } }
@SuppressWarnings( "unchecked" ) private void postProcessBookmarks() { // add space if last chunk is a bookmark // otherwise the bookmark will disappear from pdf ArrayList<Chunk> chunks = getChunks(); if ( chunks.size() > 0 ) { Chunk lastChunk = chunks.get( chunks.size() - 1 ); String localDestination = null; if ( lastChunk.getAttributes() != null ) { localDestination = (String) lastChunk.getAttributes().get( Chunk.LOCALDESTINATION ); } if ( localDestination != null ) { super.add( new Chunk( ODFUtils.NON_BREAKING_SPACE_STR ) ); } } }
@SuppressWarnings( "unchecked" ) private void postProcessEmptyParagraph() { // add space if this paragraph is empty // otherwise its height will be zero boolean empty = true; ArrayList<Chunk> chunks = getChunks(); for ( Chunk chunk : chunks ) { if ( chunk.getImage() == null && chunk.getContent() != null && chunk.getContent().length() > 0 ) { empty = false; break; } } if ( empty ) { super.add( new Chunk( ODFUtils.TAB_STR ) ); } }
@SuppressWarnings( "unchecked" ) private void postProcessEmptyParagraph() { // add space if this paragraph is empty // otherwise its height will be zero boolean empty = true; ArrayList<Chunk> chunks = getChunks(); for ( Chunk chunk : chunks ) { if ( chunk.getImage() == null && chunk.getContent() != null && chunk.getContent().length() > 0 ) { empty = false; break; } } if ( empty ) { super.add( new Chunk( ODFUtils.TAB_STR ) ); } }