Excellent websites are https://www.sejda.com/ (with the only limit of three works per hour, regardless to the pdf pages number) and https://tools.pdf24.org/ (with no limitations, but with less features than the first one).
svg rounded corner and shadow
shadow (like css shadow-box)
At least with Firefox you can use a filter, like the following:
.shadow{filter: drop-shadow(8px 6px 6px gray);}
rounded corner
The simplest way to round the corners of a box is to
- use
rectelement with rx and ry attributes (such asrx="20" ry="20") - and define the style of rect with
stroke-linejoin:round;and something like stroke:[your color]; stroke-width:[the width you like];
You can see the following example
php/msql keywords as hashtags
php separate all items in a mysql field
You can use the explode syntax, as in the following exapmple:
$keywords = $row['keywords'];
foreach (explode(',', $keywords) as $key) {
echo "<span><a href="\hashtag.php?tag=$key\">{$key}</a></span>";
}
In the example we have a mysql field (keywords) with many items comma separated (such as : “truth, soul, body, mind” and so on).
And we obtain to have as many links from each item toward a specific target, as they are (that is: 3 links if you have 3 items, 7 links fi you have 7 ones).
In this way you can get a system of hashtags for your database keywords.
other steps
You need another file, let we call them hashtag.php.
The content of hashtag.php could be something like:
<?php
//hashtag.php
if(isset($_GET["tag"]))
{
$tag = preg_replace('/(?<!\S)#([0-9a-zA-Z]+)/', '', $_GET["tag"]);
//to beautify and stylize, but not necessary BEGIN
$title=$tag;
include "$root/intell/header-intell.inc";
//to beautify and stylize, but not necessary END
$connect = mysqli_connect("localhost", "[mysql user]", "[mysql password]", "[mysql database]");
mysqli_set_charset($connect, 'utf8mb4'); // procedural style
$query = "SELECT * FROM [your table] WHERE [your fields with tags] LIKE '%".$tag."%';
$result = mysqli_query($connect, $query);
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
echo "<h2>$row[title]</h2>
<blockquote><p>$row[text]</p></blockquote>
<p><i>$row[author]</i><br />";
$keywords = $row['keywords'];
foreach (explode(',', $keywords) as $key) {
if(trim($row["keywords"])==''){echo "";} else{echo "<span><a href=\"hashtag.php?tag=$key\">{$key}</a></span>";}
}
echo "</p>";
}
}
else
{
echo '<p>No Data Found</p>';
}
}
?>
Afterwards obviously you could adjust the css according to your needs.
Of course you can have as many other php files as you want, where you usually store you database content, in which you can add the kewwords as hashtags, with a code like the following:
echo "</p><p class=\"keywords\">";
$keywords = $row['keywords'];
foreach (explode(',', $keywords) as $key) {
if(trim($row["keywords"])==''){echo "";} else{echo "<span><a href=\"hashtag.php?tag=$key\">{$key}</a></span>";}
}
echo "</p>";}
LibreBase problems with native mysql connector
1. mysql connector not working
From LO 6.4 native mysql connector didn’t work any more. But a possible solution is to comment the line skip-networking in my.conf.
I mean now the line is #skip-networking, before it was skip-networking.
2. subforms not working
In new releases, to avoid this issue, you have to cut a small portion of code in content.xml, as in the following instructions:
have a look at the content.xml in the *.odb-file (could be opened by a zip-program)
Not working code:
<db:driver-settings db:system-driver-settings=”” db:base-dn=”” db:parameter-name-substitution=”false”/>
Working code
<db:driver-settings db:system-driver-settings=”” db:base-dn=””/> ยป
It works!
3. tables or queries not working
You should check the table/query structure and avoid fields (which should have a length) with no length.
regex replace all the text within an html tag
If you want, for example, delete all styles tag within several html in an epub file, keeping only the stylesheet linked in them, you can use this command:
<style type="text/css">(.|\n)*?<\/style>
Calibre editor in this case is better than Sigil, for epub files.
remove duplicate lines from a text file
To remove duplicate lines from a text file in Linux you can use this command
awk '!seen[$0]++' "inputefilename" > "outputfilename"
regex replace keeping a part of a string
Today I managed to replace (in html file links and anchors) absolute paths with relative ones.
I needed to keep the anchors and links number.
I did so:
search: href="#_ftn([0-9])">
replace: href="#_ftnref\1" id="_ftn\1">
In this way href=”#_ftn1 was replaced by href="#_ftnref1" id="_ftn1", href=”#_ftn2 was replaced by href="#_ftnref2" id="_ftn2", and so on.
For numbers with two digits
search: href="#_ftn([0-9][0-9])">
replace: href="#_ftnref\1" id="_ftn\1">
Only the search string is to be modified, if you have more digits (f.e. [0-9][0-9][0-9][0-9] if you have numbers with four digits, such as 1276), not the replace one (so don’t write \1\1).
digits within brackets
To replace digits within brackets you have to escape the brackets with ‘\’, thus: ‘\(‘, or ‘\[‘. For example, if you plan to convert every ‘(some digits) ‘ with ‘</p><p>(some digits)’, you should use this code:
find: \(([0-9])\)
replace: </p><p>(\1)
image-map online
A good, simple and free, website is ImageMap Generator, but you have to save your code after defining 3 or 4 map areas, otherwise the code will result wrong.
svg with external image embedded
All browsers have this limitation: they not allow to show an svg with an external image embedded, such as
<image x="2" y="2" width="somewidth" height="someheight" xlink:href="myimage.jpg">
even though the image is in local.
For security reasons.
expansible image with image-map
We managed to add an image map to the on-click expansible image.
This is the code:
<style type="text/css">
img[usemap] { zoom: 12%;}
img[usemap]:focus {zoom: 50%;}
</style>
<map name="mymap">
<area shape="rect" coords="1294,253,1420,434" title="mount" />
<area shape="rect" coords="1709,296,1835,477" title="tree" />
</map>
<img tabindex="0" src="path-to/myimage" usemap="#mymap" />
The problem is that to close the expansed image you must click either on a map area or outside the image.