I use TYPO3 CMS 6.2.14, vhs 2.3.3, Flux 7.2.1 and FluidContent 4.3.1 - my TYPO3 Editor need the opportunity to upload SVG-Images via vhs-ViewHelper. I've made a new FluidTYPO3 Content Element (FCE), but there's no SVG Image visible in frontend. Mmhh?
Flux-FlexForm
<flux:field.file name="imgIcon" allowed="jpg,gif,png,jpeg,svg" uploadFolder="uploads/tx_myext" minItems="0" maxItems="1" size="1" />
...
<v:media.image src="uploads/tx_myext/{imgIcon}" alt="Icon" />
Output
<div class="small-2 columns">
<img alt="Icon" src="" width="" height="">
</div>
Also I use the htaccess entry, but there is no success. Where's my fault? Do I need heightand widthfor this ViewHelper? Aren't vectors availible in vhs?
<IfModule mod_mime.c>
...
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
...
</Ifmodule>
EDIT: I also tried the Fluid ViewHelper, but the SVG Image has height/width = 0:
<f:image src="uploads/tx_myext/{imgIcon}" width="50" height="50" class="xy" alt="Icon" />
EDIT 2: The ImagePath is correct. At Developer Tools I "see" the Image ..
EDIT 3: Oh, I see at my Filemanager (FAL) 0x0 pixels ..
Thanks merec.
Use SVG Images / TYPO3 6.2 with FluidTYPO3
Answer: Use
<img src="{f:uri.image(src: 'uploads/tx_myext/{imgIcon}')}">
instead of
<v:media.image src="uploads/tx_myext/{imgIcon}" alt="Icon" />
// OR
<f:image src="uploads/tx_myext/{imgIcon}" width="50" height="50" class="xy" alt="Icon" />
Related
This is my directory structure:
doc/
├─ image.png
src/
README.md
I'm trying to center and resize a logo image on the top of the README file, just like I'm used to do on GitHub (using HTML tags), but I just can't make it work on Azure's Repos.
So far, this is what I tried:
<p align="center">
<a target="blank"><img src="doc/image.png" width="30%" /></a>
</p>
<center>
![image.png](doc/image.png)
</center>
And some other variations of those... I've found some answers on the internet, but none of them seems to work to me.
An svg file generated from graphviz looks fine in some viewers (Chrome, Gnome Image Viewer) but doesn't in others (Inkscape, when converting using ImageMagick to pdf).
Here's what my minimal example looks like, on the left is Chrome (correct rendering), on the right is Inkscape (wrong):
The above was generated by this graphviz code:
digraph {
node [shape=box];
foo[label="long text long text long text"]
}
SVG produced by:
dot g.txt -Tsvg -o g.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.38.0 (20140413.2041)
-->
<!-- Title: %3 Pages: 1 -->
<svg width="177pt" height="44pt"
viewBox="0.00 0.00 177.00 44.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 40)">
<title>%3</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-40 173,-40 173,4 -4,4"/>
<!-- foo -->
<g id="node1" class="node"><title>foo</title>
<polygon fill="none" stroke="black" points="169,-36 0,-36 0,-0 169,-0 169,-36"/>
<text text-anchor="middle" x="84.5" y="-14.3" font-family="Times,serif" font-size="14.00">long text long text long text</text>
</g>
</g>
</svg>
What is causing this? Am I doing something wrong? How do I fix it?
Thanks!
Program versions:
graphviz version 2.38.0 (20140413.2041)
Inkscape 0.92.2pre0 (973e216, 2017-07-25)
GNOME Image Viewer 3.26.2
Chrome Version 69.0.3497.92
ImageMagick 6.9.9-34 Q16 x86_64 2018012
Using Imagemagick 6.9.10.11 Q16 Mac OSX with inkscape #0.92.3_4, I get the following. Note I just convert to jpg to be able to post here. The pdf is the same.
convert test.svg test.pdf
convert test.pdf test.jpg
So I conclude it is either your Imagemagick version or more likely your version of Inkscape or a faulty install.
I found in a streaming site the thing I want to do and I already lost 2 days to understand how they do it. So please analyze the next info and tell me how he does this thing???
Example of what I mean is in this link: http://www.animeforce.org/ds.php?file=AbsoluteDuo/AbsoluteDuo_Ep_01_SUB_ITA.mp4
In development kit we found the direct link of this video: http://www.lacumpa.org/DDL/ANIME/AbsoluteDuo/AbsoluteDuo_Ep_01_SUB_ITA.mp4
<div style="width: 100%; position: relative;" class="html5video lightsoff" id="wtf">
<div class="main-container" id="wtf">
<div class="hero-unit">
<video controls="" preload="metadata" id="video-player">
<source type="video/mp4" src="http://www.lacumpa.org/DDL/ANIME/AbsoluteDuo/AbsoluteDuo_Ep_01_SUB_ITA.mp4"></source>
</video>
</div>
</div>
<div style="text-align: center; padding: 10px 0px 0px 0px; font-size:12pt; font-weight: bold;" class="lightsoffbtn">Modalità Cinema!</div></div>
The second was if you use Download button in the page you access to adfly "they use it to monetize" after skip the adds download start like from a hotlink but if you copy the link from where you download is the same from embedded sourcecode and if you try after stop download to use again direct link, again you are redirected to "Anty Hotlink".
Simplest solution would be a HTTP_REFERER block. If the request for the content does not include the URL of the correct referring page, in it's HTTP HEADER, you block access eg. Using mod_rewrite
RewriteCond %{HTTP_REFERER} !www.somsite.com/some_URI_path
RewriteRule \.(jpg|gif|png)$ - [F,L]
Beyond that you can do things with cookies, e.g again with mod_rewrite
RewriteCond %{HTTP_COOKIE} xxxxxxxxxxxx [NC]
RewriteRule \.(jpg|gif|png)$ - [F,L]
Or if you want to get serious use session based blocks.
I have a question about IM reading SVG Images and it really troubles me.
For the SVG image below,
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100%" viewBox="0 0 100 100">
<defs>
<linearGradient id="grad1">
<stop offset="0%" stop-color="white"/>
<stop offset="100%" stop-color="black"/>
</linearGradient>
</defs>
<rect x="10" y="10" width="80" height="80" fill="url(#grad1)" stroke="blue"/>
</svg>
When I use identify -verbose sample.svg, I got the result with "Geometry: 1x1+0+0". But other people get "Geometry: 100x100+0+0". And seems 100x100 is correct. Why would this happen?
During my own experiments I have noticed that Imagick's default SVG delegate has problems handling SVGs that contain:
fill="url(#grad_or_imagepattern)"
As far as I am concerned, and explained here: http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=23525, Imagick "can use its internal MSVG or the external delegate for RSVG or I believe Inkscape" if available.
I recommend you do the following in order:
1. uninstall Imagick
2. install Inscape
3. add Inscape directory to system path
4. install Imagick
In this way, Imagick will be able to ask Inscape to do the conversion.
All the best,
I've created a rptdesign file using BIRT IDE. This file contents are in Arial font, when I export the report to PDF in windows it works fine.
I uses the default viewerServlet to create reports. But when I moved the report to a linux system, all contents in the report was displayed in Times New Roman font instead of Arial in th PDF file.
Then I copied the Arial.ttf file to /var/font/truetype and added the following line to platform/plugins/org.eclipse.birt.report.engine.fonts_2.3.2.r232_20090202/fontsConfig.xml
<font-paths>
---------------
---------------
---------------
<path path="/var/font/truetype" />
</font-paths>
After adding this line all contents are coming in Arial font, but the contents which are bold appears to compressed and look very ugly.
Has anyone faced this problem and has any solution?
Thank you
Regards,
Arun
Here is my fontsConfig_pdf.xml file
<font>
<font-aliases>
<mapping name="sans-serif" font-family="Arial" />
<mapping name="serif" font-family="Times-Roman" />
<mapping name="monospace" font-family="Courier" />
</font-aliases>
<font-encodings>
<encoding font-family="Times-Roman" encoding="Cp1252" />
<encoding font-family="Helvetica" encoding="Cp1252" />
<encoding font-family="Courier" encoding="Cp1252" />
<encoding font-family="Zapfdingbats" encoding="Cp1252" />
<encoding font-family="Symbol" encoding="Cp1252" />
<encoding font-family="STSong-Light" encoding="UniGB-UCS2-H" />
<encoding font-family="STSongStd-Light" encoding="UniGB-UCS2-H" />
<encoding font-family="MHei-Medium" encoding="UniCNS-UCS2-H" />
<encoding font-family="MSung-Light" encoding="UniCNS-UCS2-H" />
<encoding font-family="MSungStd-Light" encoding="UniCNS-UCS2-H" />
<encoding font-family="HeiseiMin-W3" encoding="UniJIS-UCS2-H" />
<encoding font-family="HeiseiKakuGo-W5" encoding="UniJIS-UCS2-H" />
<encoding font-family="KozMinPro-Regular" encoding="UniJIS-UCS2-H" />
<encoding font-family="HYGoThic-Medium" encoding="UniKS-UCS2-H" />
<encoding font-family="HYSMyeongJo-Medium" encoding="UniKS-UCS2-H" />
<encoding font-family="HYSMyeongJoStd" encoding="UniKS-UCS2-H" />
</font-encodings>
<font-paths>
<path path="/var/fonts/truetype"/>
</font-paths>
<composite-font name="all-fonts">
<font font-family="Times-Roman" catalog="Western" />
<font font-family="MSung-Light" catalog="Chinese" />
<font font-family="HeiseiKakuGo-W5" catalog="Japanese" />
<font font-family="HYGoThic-Medium" catalog="Korean" />
</composite-font>
</font>
Try explicitly stating your path to the font like this:
<font-paths>
<path path="/var/font/truetype/arial.ttf" />
</font-paths>
Setting this property (font-paths) cause the default fonts directory to be ignored in favor of only the paths in this set. This will make Arial the only available font for your PDF. To include the default fonts (TNR, Courier, etc...) add the default path (org.eclipse.birt.report.engine.fonts) under the eclipse plug-ins to you font-paths entries as well.
You can also choose to just add Arial.ttf to the default directory and REMOVE ALL ENTRIES from font-paths and pick up the Arial type that way. Either way should work.
Good Luck.
Can any one tell me if there is any
issue with Arial font in linux, if the
characters are set as bold
Everything works fine for us. Below is my patch for fontsConfig.xml:
<font-aliases>
<mapping name="sans-serif" font-family="Arial" />
...
</font-aliases>
<font-paths>
<path path="fonts"/>
</font-paths>
Put in fonts folder arial.ttf and arial.xml files.
I spent hours searching for this:
export BIRT_FONT_PATH=/usr/share/fonts/truetype
Execute this and done!
Then I copied the Arial.ttf file to /var/font/truetype
Arial.ttf only contains the plain version of the font.
For bold, italic and italic-bold there are different files (arialbd.ttf etc).
Just copy these, too.