rendering currency symbols with swingController  XML
Forum Index -> ICEpdf General
Author Message

Joined: 21/Jan/2020 07:44:43
Messages: 1

I'm trying to render a received PDF using free version 6.2 of icepdf but instead of euro symbol € I get a strange char. The strangest think is that using acrobat reader i don't have this issue.
I look up into the forum but i couldn't find any answer to this problem, someone suggest to define font on pdf but I'm not generating it so i can't do it, other suggest to use Font on swingcontroller but i don't know how. Below my java code to render the pdf

private void renderPdf(String filePath) {
PropertiesManager properties = new PropertiesManager(System.getProperties(), ResourceBundle.getBundle(PropertiesManager.DEFAULT_MESSAGE_BUNDLE));
//hide tool bar and status bar
properties.setBoolean(PropertiesManager.PROPERTY_SHOW_STATUSBAR, false);
properties.setBoolean(PropertiesManager.PROPERTY_VIEWPREF_HIDETOOLBAR, true);

//it should works but it doesn't (maybe in the next releases) so I have to set this propertie on SwingViewBuilder constructor
// properties.setInt("document.viewtype"/*PropertiesManager.PROPERTY_DEFAULT_VIEW_TYPE*/,DocumentViewControllerImpl.ONE_COLUMN_VIEW);
//set document width to the window width
properties.setInt(PropertiesManager.PROPERTY_DEFAULT_PAGEFIT, DocumentViewController.PAGE_FIT_WINDOW_HEIGHT);

// Build a SwingViewFactory configured with the controller
SwingViewBuilder factory = new SwingViewBuilder(controller, properties, null, false, SwingViewBuilder.TOOL_BAR_STYLE_FIXED, null,
DocumentViewControllerImpl.ONE_COLUMN_VIEW,//let the document to be shown in one single page
DocumentViewController.PAGE_FIT_WINDOW_WIDTH);//fit the window width


// Use the factory to build a JPanel that is pre-configured
//with a complete, active Viewer UI.
JPanel viewerComponentPanel = factory.buildViewerPanel();

// Open a PDF document to view

attached you can find the PDF file i'm trying to show
is there someone that can help me ?

 Filename Audit.pdf [Disk] Download
 Description pdf to show
 Filesize 25 Kbytes
 Downloaded:  145 time(s)


Joined: 09/Feb/2020 14:28:10
Messages: 1

I have the same issue.
Dollar or paragraph characters are displayed correctly.
I use version 6.2.2 and 6.3.2. So far i have not found another character with the same problem.

I really need a solution for this.
Forum Index -> ICEpdf General
Go to:   
Powered by JForum 2.1.7ice © JForum Team