How to convert an Adobe Illustrator file to only one colour? - adobe-illustrator

I'm trying to generate a new IcoMoon font by uploading this .ai image to IcoMoon.
a simple .ai file
However, once I upload the image and generate the font.
IcoMoon generates a multicolor font:
But I don't want to generate a Multicolor font.
IcoMoon shows the solution and says that:
Now I have Adobe Illustrator, but how can I change all colours in the .ai file to a single colour?

i checked the file you uploaded and you have multiple layers on top of each other,
what you can do is delete the excess layers then add the color you want and export it as svg

Related

Convert pdf document to jpeg using LEADTOOLS and PDF-TOOLS

We have pdf documents (source: camera or scanner) that we want to convert to jpeg.
We use LEADTOOLS and PDF-TOOLS(in two separate programs) to convert these pdf files to jpeg files.
Both these tools use the default DPI of 150 irrespective of the DPI of the source pdf file.
We would rather like this value to be taken from the source pdf file.
For example: Adobe Acrobat software recognizes the source pdf file DPI and uses the same to create the jpeg file.
Is there some way we could achieve the same using the LEADTOOLS and PDF-TOOLS by determining the DPI of the source pdf file?
This feature was added to v19 of LEADTOOLS a few months ago. You can now extract images from PDF pages while preserving their original pixel dimensions using the following members of the Leadtools.Pdf.PDFDocument class:
ParseDocumentStructure method.
Images property.
DecodeImage method.
Furthermore, if the image is stretched inside the PDF page, you can detect that by examining its display size in the PDF page using the Leadtools.Pdf.PDFObject.Bounds property.
There's a dedicated demo for the PDFDocument class and related objects installed with LEADTOOLS 19 in these folders:
Examples\DotNet\CS\PDFDocumentDemo
Examples\DotNet\VB\PDFDocumentDemo

How to clip and concatenate a page region in multiple pdf files with one page each?

I have a lot of pdf files each one with an image inside. I want to clip a rectangular region in each of these files and concatenate them into a single pdf file. Is it possible with ghostscript or similar?
I'll have a go at this. Try Briss if you want to crop rectangular regions in pdf files. It's free and cross-platform GUI.
If you have multiple pdf files you can concatenate/merge them first online using http://www.pdfmerge.com/ Then use Briss to crop the images out into a new pdf file. Or vice-versa depending on the location of your images inside the pdf files.
After you fire up Briss, load the merged pdf file containing the images. When you're asked if you want to exlude anything, just click "cancel" if you want to include all pages.
If your file has many pages, similar pages may be overlapping each other so you can draw a rectangle over the region you want to crop. Click Action -> Preview for previewing the output. Click Action -> Crop PDF to finalize your output pdf file. Cheers.

Ghostscript embedded fonts and substitution

I'm converting PDF to JPG with gs.
Does gs substitute embedded fonts? How exactly this works? Like if i embed all fonts that is used in PDF does gs still look for some substitution or can it use that embedded font data?
So does embedding fonts in PDF mean that all glyphs used in PDF with that font is being embedded and i don't need to have that font in my gs font path?
Thanks!
When you’re outputting a JPEG file, you’re in effect outputting an image. This means that Ghostscript renders the page as image, then compresses the image using JPEG (lossy – to prevent reduced legibility of the text, use a lossless compression format such as PNG instead; JPEG is basically only good for photography because lossless would be much too big there).
In a bitmap image, there are no fonts, only pixels – so, for text rendering (e.g. black text on a white page), Ghostscript will create a bitmap image consisting only of greyscale pixels (by means of anti-aliasing), then save that.
To be able to do that, Ghostscript must have access to the fonts at the time of PDF rendering and JPEG creation. This means that the fonts either must be installed on the system (and in your font path), or embedded in the PDF in the first place. They are not necessary to view the JPEG file.

How to create font preview image from font file on Linux?

I am wondering if there is any easy / possible way to create a "font preview image" file for a given font file on the Linux command line.
You know, like when you click on a font file in Linux or Windows file explorer and you get a little font preview window with "The quick brown fox jumps overs the lazy dog" in different sizes etc.
The input font file would be .PFB (Adobe type 1 font) or .TTF (TrueType font).
So, for example:
createfontpreviewimage somefont.pfb
[which creates somefontpreview.png or whatever]
Any thoughts? Or will I have to go down the hard work route of embedding the font file in a PDF document and generating the preview as a PDF document with PDFLib or some such?
Use fontimage: http://fontforge.sourceforge.net/fontimage.html
Write simple PHP script and use
imagettftext()
function to generate your images

How to replace or modify the font or glyphs embedded in a PDF file?

I want to replace the font embedded in an existing PDF file programmatically (with iText).
iText itself does not seem to provide any data model for glyphs and fonts, but I believe it can let me retrieve and update the binary stream that contains the font.
It's OK even if I don't know which glyph is associated to which font - what I want to do is just to replace them. To be precise, I want to embold all glyphs in a PDF document.
Replacing fonts in rendering time is not an option because the output must be PDF with all information preserved as is.
Is there anyone who has done this before with iText or any other PDF libraries?
PDF files define a set of fonts (ie F0, F1, F2) and then define these separately so you could theoretically rewrite the entry for F0. You would have to ensure the 2 fonts have the same spacing (or you will have to rewrite the PDF as well), and probably hack the PDF manually.