Increase font for pdf using Inkscape - pdf

I use to produce pdf graphs with R then I like to modify them using inkscape.
Yet when I increase font, letter size increase but letter spacing don't as you can see in example.
I have the same problem when I do the same with pdf from latex.
Thank for your help

Perhaps you have broken the text into individual letters, and are applying the new font size to those, rather than to the entire word? You may need to recreate the Xlabel text/group the letters back together.

Although there is an answer for exactly the same question here, I will duplicate it:
You should select the text you want to resize and then remove manual kerning either before or after the resizing. This can be done by clicking Text -> Remove Manual Kerns.

Related

How to convert italic font to normal font in pdf using some library?

Is there any way to convert Italic font, Bold font in my pdf to normal font using some library like Imagemagick or GhostScript etc. ?
Basically the answer is 'no' though there are several levels of caveat in there.
The most common scenario for a PDF file is that it contains an embedded font, and that font is subset. In this case the font will use a custom Encoding, so that when you see 'Hello' on your monitor, the actual character codes might be 'Axtte' or similar gibberish. If the font also contain a ToUnicode table you could, technically, create an embedded subset of the regular font from the same family as the bold or italic and embed that, and it would work. This would be an immense amount of work.
If the font isn't subset then it may not contain a custom Encoding, which would make that task easier, because you wouldn't have to re-encode the replacement.
If the font isn't embedded, then you need only change the font name in the Font object, because the PDF consumer will have to find a substitute anyway.
Note that, because PDF is a binary format, with an index (xref) containing the offset of every object in the file, any changes will mean that the xref table has to be reconstructed, again a considerable task.
I'm not aware of any tools which would do any of this for you automatically, you'd have to write your own, though some things could be done automatically. MuPDF for example will 'fix' a PDF file which has an incorrect xref table for you.
And even after all that, the likelihood is that the spacing would be different for the italic or bold font compared to the regular font anyway, and would look peculiar if you replaced them with a regular font.
So, fundamentally, no.
In low-level PDF you can apply some rendering flags in front of a text stream. Like the "Rendering Mode" Tr operation. For instance, in this scenario you can include the rendering of text outline and increase outline drawing width with the command sequence 0.4 w 2 Tr which will cause Normal text to become more "bold" (There are other better ways to accomplish this using the Font Description dictionary). However, one can also employ this tactic to slim down bold text using a clipped thicker outline, but this may not be ideal.
As for italic, most fonts contain a metric indicating their italic angle, and you can use this to add a faux italic using a shear CTM transformation matrix with the cm operation. Once again, this may work better to add an italic shear, but may also have some success in removing it.
See the PDF Reference.
This will require a library with lower level PDF building and you would have to do it manually, but it is possible technically.

MigraDoc Paragraph Text, possible to Truncate?

The Paragraph in MigraDoc automatically wraps text and adjust the height automatically. I want to be able to Truncate the text and if possible get it to Shrink to Fit. Has anyone accomplished this or have any idea how to do so?
You can use functions from PDFsharp to query the size of the text - and then reduce font size or shorten the text until it fits.
See also here:
http://forum.pdfsharp.net/viewtopic.php?p=6158#p6158

False dots around circles in pdf export of libreoffice draw

When i draw a small circle in LibreOffice draw and export it to pdf i get some extra dots around the circles. Especially in the upper left and lower right outer corner of the circle.
See example PDF here: https://dl.dropbox.com/u/233922/example-dots-circle.pdf
or as a Screenshot here:
You have any idea how i can get rid of this?
It is old bug and has not been fixed yet. I can reproduce it under Linux and Windows. My version: LibreOffice 4.1.0.
Create new file in LO Impress or LO Draw.
Draw ellipse (or rounded rectangle, or smile etc.).
Set line width e.g. 5mm (for better view).
Export as PDF.
I propose two workaround:
Export to MS PowerPoint and export in it :/
Print to PDF (using e.g. cups-pdf).
ad 1) You must have MS PP and you graphics may look bad.
ad 2) I use cups-pdf and PDF look very well, but:
Text is stored as bitmap graphics (small rectangles)! You can not extract text without using OCR.
You must use paper format from list (A4, A0, Letter etc.). If you use unstandardised paper format you must use bigger format and you get white bars on PDF. However you can use pdfcrop and remove white bars.
PDF is always orienter horizontally. If you print as vertically you can rotate pdf using pdf270 command line tool.
In Adobe Reader (version 11 at least) -> Go to "Preferences" => "Page Display" => uncheck "Enhance thin lines"
Libre Office seems to add dots of 0 size and practically no visibility. When "Enhance thin lines" is checked, Adobe Reader will make these dots visible.
Best wishes,
Patrick
Similar to the https://stackoverflow.com/users/1797782/dzwiedziu-nkg 's answer, I need a multi-step process to fix this issue.
Steps:
Open the file in a pdf viewer (Document Viewer for me in Ubuntu.)
Print the pdf to a file (also a pdf) from the viewer. I assume this also uses cups-pdf, as it modifies the image size. (I don't mind, because I use the next step to eliminate all margins anyways.)
Use pdfcrop to remove all the extra space around the actual content's bounding box. If you just give pdfcrop one argument, it doesn't overwrite the old file, so use the same argument twice:
$ pdfcrop monkey.pdf monkey.pdf
Another "workaround" that worked for me:
Go without outline. You can set the line style in Draw to "none" and just work with flat solid objects.
PS: I see these dots also in Draw, not just in the exported pdf.
A simple workaround is to "patch" the dot in Libreoffice Draw using a white object -- say, a square with white area and white outline. Note that you can not see the dot in Draw. So you first generate the pdf with the orginal drawing, see where the dot appears in the pdf, go back to Draw, and a add a white patch where it is required.
Searching for a workaround myself, I've found this awk script called odg2epsfix that will fix the exported EPS to not contain those ghost dots anymore.
I stumbled upon it in this launchpad bug entry.
Fixed in LibreOffice pre-export.
Steps:
Right click on the circle in LibreOffice and select "Line"
On the "Line" page, set "Corner Style" to "-none-"
Save document and Export as PDF.
The dot is gone without removing line enhance. Mine still shows in preview but doesn't print.
The bug is still present in LO 6.0. But if you set "Cap style" to "flat" in the "Line" tab of the "Graphic Styles", the dots disappear from the screen and from the exported pdf.

How to "mask" certain text in a PDF document

I have a PDF document, and I want to mask certain text blocks. The reason why I want to do this, is because I don't want this text to be indexed, nor I want this information to be easily accessible by selecting and copying this text block.
What should be the right way to do this?
I guess turning the text to raster would be bad idea, and I don't know if there is some tool that can make only cartain text parts with special privileges.
You will need a program that can convert a font into a series of shapes.
Illustrator may have the functionality you want: see here and here.

Formatting plain text output for printing?

I have a program that outputs a report into plain text. The report must be plain text for it to load into a third party program. The report also needs to be printable.
When dealing with plain text, what limits should I set on line size and number of lines on a page to get it to print reasonably?
It definitely depends on the font you use when printing, and unless you have control over that you can't guarantee it will print nicely. For example, in Word 2007, creating a blank document and setting the font to Courier New 10pt only fits 77 characters per line and 28 lines per page. Changing the margins and line spacing will modify that. However if you used that and they tried to print from Wordpad it wouldn't work because the default with Courier New 10pt only fits 72 characters per line. In either case, the standard 80 characters doesn't work. Those defaults aren't even global defaults.
The best you can probably do is pick a size and provide instructions on printing the report with several common editors so it will look acceptable. Specify the font, margin, line spacing, etc.
Have you considered other options, like creating two files? One could be plain text for import into the other program. The other could be a format better suited for printing.
its going to depend on your printing font, you want to aim for a fixed width font so that it is consistent, 80 columns is generally safe.... i think....
edit: here is a quick guide I googled - http://dsl.org/cookbook/cookbook_17.html
If you have control over the output format, consider a lightweight WYSIWYG markup language, Such as reStructuredText, AsciiDoc, markdown etc.
This way you can pipe the plane-text format into a converter that will result in postscript, PDF or HTML, that you can then print. This also mostly negates the need to consider the line width for the sake of your printer. The converter will do this for you.