I am working on a project in netbeans, and right now I want to embed links to various pdf files so that when that link is clicked, the program will call up the appropriate pdf in it or somewhere in the hard disk and open it with the pdf viewer.
I came across a 'clickable label' concept in one article, but I dont know how to do that, all the labels I insert do not link to the source tab when I double click on them.
Can someone please provide an example of how to implement a 'clickable label'?
Related
I have a Java application which uses Sirius to model some nodes and diagrams.
I have two questions:
1. How I can export these diagrams as an XML/JSON? Is it possible to export some nodes of the diagram only? Please see the attached screenshot. For example, I want to export the node "DataRetentionPeriod" as a JSON. What is the required code and where I should insert it?
2. Can I use Post and Get commands of Liferay to export a diagram or some nodes of the Sirius files. I know that by right clicking on the modelling editor of the Sirius file I can export the diagram as an image. Can I add an option, similar to export an image, to export or call another function which can create endpoints or connection to a database? see the attach screenshot please.
The diagram is already an XML file (or more precisely, an XMI). Open the .aird file with any text editor. Note that the aird represents only the "drawing" element while you may be interested in the underlying "semantic" element (usually an XMI model conforming to your Ecore metamodel). https://www.eclipse.org/sirius/doc/ may help
You want to have a look at Eclipse Commands which allow you to enhance your RCP application with additional menus, menu entries, etc. Vogella.com has a lot of tutorials about this that should help you. Then you can do any behavior, like transforming a model element in an appropriate JSON and upload it to your database.
I'm trying to find a way to copy the whole slide, and paste it with the formatting of 'as an image' to a blank slide, using POI's APIs.
The reason why I'm trying to do this is because I want to save each slide as an image.
The POI's Slide.draw() API by itself does not do a very good job of saving the slides' contents to images.
For example it cannot draw the following two types of objects:
Tables created on PowerPoint
Charts pasted from Excel
Is there any way to 'copy' and 'paste with formatting (as an image)' via POI, just like you do these two operations on MS PowerPoint running on a Windows, in order to save the slides as they are?
Since Slide.draw() works just fine with images, once I paste all the objects as a single flat image onto a slide (using POI), I'll be good to go.
Or if there is a better way to save the slides contents as intact as possible, could you please let me know?
The license which comes along with the method needs to be Apache license or otherwise something more permissive.
Also, I read the following post:
Programmatically extracting slides as images from a PowerPoint presentation (.PPT)
unoconv is GPL-licensed, so it is not an option for us.
JODConverter is LGPL-licensed; I'm not sure if it's acceptable so I will talk to my boss and check.
Then I ran the POI as a command line tool, as suggested by Michael,
but I ended up getting the same problem (tables and pasted Excel charts
do not show up in the saved images.)
Thanks.
I am generating PDF in netbeans and that part is okay as far as requirements are concerned.
My manager added that they may choose where they could save the generated pdf.
How to do it in netbeans? There will be a dialog box where user may choose directory where to save the generated pdfs?
Thanks!
Read the section from the Swing tutorial on How to Use File Choosers For a working example to get you started.
I am using JavaFx-2.I need to view the pdf file in JavaFx. I searched in Google and found the below link.
http://www.idrsolutions.com/jpedalfx-viewer/
In this link I have created every thing whatever mentioned there and I am able to see PdfHelpPanel in Palette. When I drag this component to the PDFHelpFrame I am able to see the fileLocations property. Here I need to give the file locations but I don't know how to give the location of my pdf file. When I click browse in filelocations property it is asking for Custom Code, Default Editor, value from existing component. Which one I need to select. I am struck up exactly at
http://netbeans.dzone.com/articles/how-create-import-a-javabean-c-0
second image from last. If any one has done this already can you help me?
You can use this project https://github.com/james-d/PdfViewer
It uses PDFRenderer library.
im about to write a class that takes a look on the html source code and filters all pdf links from it. the idea behind it is just take the parent link + the relative link..
basically it's working for
pdf
but in some cases it doesn't e.g. if the same pdf link is written as
pdf
or
pdf
(point and space) both are working links and goes to the same pdf in the same directory if they are parsed in browsers, but for the composition in my class completely useless.
i fixed the problem for the two cases above. the question is if there are other special cases in syntax where i should pay attention on.
You do not know what the link points to until you download the file.
I can have a link like http://www.mysite.com/pages/brochure.html which internally redirects to a PDF file.
So, if you're not in control of the links, or working on a particular section of your site, you're going to fail.
On the other hand, if you're working on a specific section of the site, where you know every PDF link has a .pdf estension, you can simply check the extension and not the whole path (don't know how's written in Java the .lastIndexOf("string") thing of C#).