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
{
		drawText( text, textX, textY, width, height, textInfo.getFontInfo( ),
				textInfo.getLetterSpacing( ), textInfo.getWordSpacing( ),
				textInfo.getColor( ), textInfo.isLinethrough( ), textInfo
						.isOverline( ), textInfo.isUnderline( ), textInfo
						.getAlign( ), true );
	}
	public void createBookmark( String bookmark, int x, int y, int width,
			int height )
	{
		createBookmark( bookmark, convertToPoint( x ), convertToPoint( y ),
				convertToPoint( width ), convertToPoint( height ) );
	}
	private void createBookmark( String bookmark, float x, float y, float width,
			float height )
	{
		contentByte.localDestination( bookmark, new PdfDestination(
				PdfDestination.XYZ, -1, transformY( y ), 0 ) );
	}
	public void createHyperlink( String hyperlink, String bookmark,
			String targetWindow, int type, int x, int y, int width, int height )
	{
		createHyperlink( hyperlink, bookmark, targetWindow, type,
				convertToPoint( x ), convertToPoint( y ),
				convertToPoint( width ), convertToPoint( height ) );
	}
	private void createHyperlink( String hyperlink, String bookmark,
			String targetWindow, int type, float x, float y, float width,
			float height )
	{