How to increase the width of TCPDF line? - tcpdf

I'm struggling to increase the width of horizontal line in TCPDF with PHP, can someone help me to
achieve this.
I'm trying with the below code.
$pdf->writeHTML("<hr>",true, false, false, false,'');
Below is the result.
getting this result
I want the result like this
desired result

I got answer to my question on https://tcpdf.org/examples/example_012/
and worked perfectly fine.
Thanks

Related

Highcharts - how to correctly align x-axis ticks when plotOptions.column.crisp set to false

I recently found that there is a built-in option to disable crisp for bar and column charts, which is awesome! However, I noticed that x-axis ticks slightly off (I believe ticks distance gets calculated based on crisp-true). Is there a way to align them properly?
Here are docs https://api.highcharts.com/highcharts/plotOptions.column.crisp
Updated example:
https://jsfiddle.net/bqo9dv5a/
Ideally, I want ticks to be centered for each column.
Thank you!
I found this parameter on documentation (xAxis.offset), maybe it will help achieve what you want.
API Reference: https://api.highcharts.com/highcharts/xAxis.offset
Live Demo: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/yaxis/offset/

Can't figure out how to segment overlapped digits from captcha

i'm writing an application for solving captcha. Original captcha looks like this:
Original captcha
After I apply erosion+dilation it looks like this:
erosion+dilation applied
Finally I find contours for further segmentation. Obviously, I can cut "1" from the image as it's not connected with other digits. But how can I separate 5 from 7, and 7 from 8, and two zeros on the right in this case? On the first link I see that 5 and 7 are not overlapped, this way i can somehow remember it and use after applying erosion+dilation. Maybe drawing white vertical line. But still i have problems with 7 and 8.
Any help and advises are appreciated!
What you need is a technique called skeletonization, https://en.wikipedia.org/wiki/Topological_skeleton
It will help in this specific case.

Changing text adjustment in UIView using swift

I've been trying to create my app and something is bugging me very much,
I have images of what I am trying to achieve:
1)
2 )
number 1 shows what I am trying to do, the letters are "squeezed" together making the text appear tighter with a short width even though the letter sizing is big.
number 2 shows my attempt to achieve this, I tried multiple different ways to get that same look but failed for hours, does anyone have any suggestions or know how to make the text look like that in the first picture?
I appreciate any help, thank you!
The only way how to do it AFAIK is to use transform on UILabel, like this:
let widthTransform = 0.8 // Shrink label to 80% of its width
label.layer.transform = CATransform3DMakeScale(widthTransform, 1.0, 1.0);
Hope it helps!
Note* that transform work for about 30% of decrease (even less imo), then it just starts to look very bad. You can also change text spacing, but if you calculate it dynamically, you could end up with negative one and that looks terrible. The easiest way really is then just change of the design :)
Options:
You can decrease character spacing like in this answer
and increase font size.
Having fun with transformation on layer is really awful idea, as later you won't be able to get the height of text etc -> just everything will be working wrong.
You can also just use different font.

iOS-PDF highlight getting drawn on wrong position

I am using PDFKitten code. I have fixed all the issues regarding parsing of CMap, /Differences in that.
I have a pdf with TrueType and Type1 fonts.
I have parsed its differences and widths array.
However whenever I try to select or search text highlight is shown on the wrong position. What can be the problem?
I have applied MediaBox transform to drawing rect. It worked for some other pdfs but its not working for this. What more I have to do to solve this problem?
I have checked link for similar issue but solution is not working.
Thanks.
Adding the screenshot :
It turns out the glyph for particular unicode was not identified correctly. It is the bug in PDFKitten.
Resolved it by adding Glyph model by keeping it's width.
While calculating width instead of Mapping back to glyph I use glyph from model to get the width from the font.

How to adjust the width of a font using the Uniscribe API

Please bear with me, I am new to Uniscribe so I hope this isn't a dumb question but I have been unable to find the solution anywhere else. So, here goes...
I am trying to use the Uniscribe API to reduce the width of a font; that is, given a specific font of a particular height, I would like to be able to reduce the width of each character (and all the relevant spacings) by some user-defined percentage.
I have successfully achieved this without calling any Uniscribe functions by obtaining a LOGFONT structure for the current font and adjusting the lfWidth field to be a percentage of its original value. I realise that this is just an average character width but it seemed to have the desired result.
However, when I try to do the same thing using Uniscribe I've noticed that the lfWidth field gets reset to 0 following calls to ScriptShape(). As a result, all rendered text is output using its original width. I'm at a loss to explain why this is or what to do to get around it.
Does anybody have any idea if it's even possible to do what I am trying to do?
You might want to start here (look at the Generate Glyph Information Section), then lead to this.
Hope it helps!

Resources