Bug 183809 PDF emitter does not render URLs with specified target correctly
When the hyperlink has specified "_blank" target it's rendered with PdfAction(hyperlink) but when the target is "_parent" or "_top" or "_self" it's rendered with PdfAction.gotoRemotePage(hyperlink, bookmark, false, false) which causes something like "file does not exist" error in PDF viewer. The following change in PDFEmitter from: private PdfAction createPdfAction(String hyperlink, String bookmark, String target, int type) { if ("_blank".equalsIgnoreCase(target)) //$NON-NLS-1$ // Opens the target in a new window. { return new PdfAction(hyperlink); } else ... to: private PdfAction createPdfAction(String hyperlink, String bookmark, String target, int type) { if ("_top".equalsIgnoreCase(target) || //$NON-NLS-1$ "_parent".equalsIgnoreCase(target) || //$NON-NLS-1$ "_blank".equalsIgnoreCase(target) || //$NON-NLS-1$ "_self".equalsIgnoreCase(target)) //$NON-NLS-1$ // Opens the target in a new window. { return new PdfAction(hyperlink); } else ... works for me.
engine/org.eclipse.birt.report.engine.emitter.pdf/src/org/eclipse/birt/report/engine/emitter/pdf/PDFPage.java
currentContentByte.setCharacterSpacing( characterSpacing );
		currentContentByte.setWordSpacing( wordSpacing );
		float baseline = convertToPoint( fontInfo.getBaseline( ) );
		float transformedY = transformY( textY, baseline, containerHeight );
		placeText( currentContentByte, fontInfo, textX, transformedY );
		if ( ( font.getFontType( ) == BaseFont.FONT_TYPE_TTUNI )
				&& IStyle.JUSTIFY_VALUE.equals( align ) && wordSpacing > 0 )
		{
			int idx = text.indexOf( ' ' );
			if ( idx >= 0 )
			{
				float spaceCorrection = -wordSpacing * 1000 / fontSize;
				PdfTextArray textArray = new PdfTextArray( text.substring( 0,
						idx ) );
				int lastIdx = idx;
				while ( ( idx = text.indexOf( ' ', lastIdx + 1 ) ) >= 0 )
				{
					textArray.add( spaceCorrection );
					textArray.add( text.substring( lastIdx, idx ) );
					lastIdx = idx;
				}
				textArray.add( spaceCorrection );
				textArray.add( text.substring( lastIdx ) );
				currentContentByte.showText( textArray );
			}
			else
			{
				currentContentByte.showText( text );
			}
		}