In my Rmarkdown script, I create an svg file that I want to display like this:
![alt text](file.svg)
The problem is that the svg file is a temporary file (because my Rmarkdown is embedded in a pipeline, so the user doesn't always have the same path to the svg file).
So I want to store this svg file temporarily and create an object that will always be displayed in the html file generated by my Rmarkdown script.
Is there a way to do this?
Thank you very much
I would like to generate PDF file in JavaFX. For example I would like to print the scene in PDF file. Is this possible without external library?
No, it is not possible without an external library. I do as ItachiUchiha suggests: convert the AnchorPane into an image via snapshot and then print out the image I created.
In my web application, i'm using openXML to create and export excel files.
but i'm using different theme. so i want to change my excels style sheets base on my themes.
as far as i know this is how you can set the foreground Color of a cell in open xml:
ForegroundColor foregroundColor1 = new ForegroundColor() { Rgb = "FFFF0000" };
but i don't want to hard code my color.
So here is my question: is there anyway to use embed css for colorize my excel content using openXml?
thank you all
Is it possible to use png files in QwtPlot? Normally i can use svg files in my plots with QwtPlotSvgitem class but i could not succeed with these png files. Please give me a clue about that.
Regards
Probably there are several ways to do this. You don't specify what kind of image you want to draw (and where).
You might create a QwtPlotMarker (Qwt docs) with a custom QwtSymbol (Qwt docs). You can try QwtSymbol::setPixmap(). A QPixmap can be created by calling its constructor with the file name of the *.png image (Qt docs).
Is there any way to get the SVG path string off a Photoshop custom shape or path? Or is there another way to get/construct similar data? I'm looking to do something similar to this:
http://raphaeljs.com/icons/
Update: in recent versions of Photoshop, there is a built-in option to export the image as SVG, which works well on paths and custom shapes. Just do:
File -> Export -> Export as... and select SVG in the file settings.
Original Answer:
Starting from Photoshop CC 14.2, you can create SVG files directly from Photoshop:
Create a file named generator.json with the content below in your user home folder.
Restart Photoshop and open your PSD file.
Activate the generator: File > Generate > Image Assets.
Rename your layer to <something>.svg.
The svg file will be created in the assets directory next to your PSD file.
Content for generator.json:
{
"generator-assets": {
"svg-enabled": true
}
}
Source: http://creativedroplets.com/generate-svg-with-photoshop-cc-beta/
Select and copy the path in Photoshop
Launch Adobe Illustrator
Create a new Document
Paste
Save as SVG
If you have Illustrator and have not created all the paths, however, it is probably easier to create them directly in Illustrator.
If you do not have Illustrator, you are probably better off using the free Inkscape SVG editor to draw your paths.
If you do already have the paths in Photoshop, and do not have Illustrator, the best I can think of is to turn on the Info palette in Photoshop select the path points one at a time and manually record the positions of the point itself as well as its handles, and from those manually create the path using absolute curveto commands, 'C' (for the points with handles) and absolute lineto commands, 'L' for those points that have no handles.
Another option is to save the file as EPS in photoshop making sure to have export vectors checked, and then loading that into illustrator and saving as SVG
All answers were good, but for me they were too much, there is an online tool provided by Adobe:
http://adobe.com/go/extract_tryitnow_en
All you have to do is upload /drag & drop/ your .psd file, choose the path layer and download as svg. And you can extract the svg path, d attribute in particular.
Then what I did is put the path into a g element, then scaled g and translated the path
For custom shapes, you may want to have a look at the recently released open-source script called Convert Custom Shapes File to SVG Set (for Photoshop CS3 or later), used to convert a custom shapes file (.csh) or a custom shapes preferences file (CustomShapes.psp) into a set of SVG files.