I'm looking to programmatically convert SVG to PDF documents on a server. What are my options for doing that on Windows?
I've seen links to Inkscape, Batik, and svg2pdf, but I'm not sure if these can easily be automated to perform the conversion on a Windows server.
There's an unusual solution here which involves automating OpenOffice Portable on the server: http://www.codeproject.com/KB/office/PortableOpenOffice.aspx
There are two options:
Batik (Java, open source)
Inkscape (native binary, open source)
Batik will give you more control. With Inkscape, you can use the command line parameters (--export-pdf IIRC) to do the conversion without firing up the UI.
Take a look at the Apache Batik Toolkit.
The rasterizer can convert svg to images or pdf (It's a java tool).
The SVG Rasterizer is a utility that can convert SVG files to a raster format. The tool can convert individual files or sets of files, making it easy to convert entire directories of SVG files. The provided formats are JPEG, PNG and TIFF, however the design allows new formats to be added easily. In addition, the rasterizer can (despite its name) transcode to PDF.
It does not come free, but PrinceXML does a very good job with SVG.
You can probably use Cairo and librsvg to read SVG into Cairo surface and export to PDF using Cairo. There are many bindings for languages and these are open source libraries.
You can use altsoft xml2pdf server for this
http://www.databasesandlife.com/svg-to-pdf/
you might want to look into Apache FOP.
Check out the part about graphic formats.
Related
I have a scanned pdf and I want to transform it to an editable text format. Do you have some recommendations to do this on Windows? I was thinking about using Linux as a subprogram of Windows. Any other ideas?
It looks like you work in Python, so a pypi package you might want to look into is pypdfocr. Essentially you'll want to use a tool like poppler to render the pdf and get the images from it (a scanned PDF is built on images), then read the text from the images via an OCR solution to get the text.
I have not used this package myself, so this is as much help as I can give. It should work with python in both Windows and Linux.
Does anyone have any pointers where I can find extra information on how to create an opentype wrapper around a CFF font?
Currently I have a parser for CFF files so I can get all sorts of information out of it (cmap, glyph names, widths, names etc etc). Given this information I am unable to create an Opentype (truetype format like) wrapper so I can use the font on Windows using GDI; GDI will not load the Opentype font and the only thing I know is that it fails to load the font.
Does anyone know any additional information, validation applications, example code, get additional information why the font does not load from Windows etc etc?
Note: I am looking for information how to do it, not utilities and/or conversion tools.
Until now, I found three libraries you could reference:
FreeType: mainly in the cff package. Its main entry is cff\cffload.c. The library is now on GitHub.
FontForge: fontforge\parsettf.c, still on sf.net.
fonttools: fonttools\cffLib.py, on GitHub.
ots tools: cff.cc on Google Code
In parsettf.c, George Williams wrote that
"TrueType is a really icky format." ...Now that I understand it better it seems better designed, but the docs remain inconsistent. Sometimes badly so.
IMO, the cff spec is just as bad.
Maybe it is better designed. I might eventually look into it to confirm, but it might just be too old to be good.
What old things are good? Parents, math and philosophy :)
Anything else must be up-to-date!
CFF(Compact Font Format) is mainly used for embedded PostScript font in PDF files. And you can also find CFF in OpenType font files which is based on PostScript outlines.
If you got CFF from the embedded font file of a PDF, you can get a PostScript name from the NameIndex of the CFF. You should find the corresponding OpenType File by the PostScript Name.
If you got CFF from a OpenType file, why did you ask this question? :-D
I quote this link: Raster, Vector, TrueType, and OpenType Fonts
... the glyphs for a font are stored in a font-resource file. ...
So, Windows loads glyphs from a file with a format that it understands, not a CFF file, and not a structure from memory. If you want to draw CFF files without using a file conversion tool, I think you will need to load the CFF and draw the glyphs by yourself.
To load the CFF and determine the glyph, you can use the FreeType Project. Here is a link here on SO that explain how to build a Win32 DLL from FreeType source: Compiling FreeType to DLL (as opposed to static library)
To draw the glyphs, you can get some inspiration from the gdipp project, which is a replacement of the Windows text renderer, and contains Win32 C/C++ sample code that display glyphs loaded from FreeType.
It appears that the CFF format was made to be embedded directly into an OpenType file. Microsoft has a good overview of OpenType files: http://www.microsoft.com/typography/otspec/otff.htm
I'm looking to convert PPT and PPTX files to Flash (or flv) files in an automated fashion in Linux - So I need a command-line utility.
Are there any available options out there for me? (I haven't found any so far).
I was also looking for a Flash player to play ppt/pptx files as an alternative (similar to what slideshare provides) - does anyone know of any other than openslide?
Thanks for any help.
Related question here: Convert powerpoint to flash
Summary of answers: you should probably use OpenOffice to do it.
To do it from the command-line, it looks like you should probably use PyODConverter http://www.artofsolving.com/opensource/pyodconverter
OpenOffice generates a very poor SWF version. It should generate a back/foward button at least.
I am in Mac OSX, Cocoa .
I want to read and write multi layered .psd images.
With Cocoa native api's i can read or write the images as flat images.(i.e., single layered)
So is there any 3rd party library available to perform the operations?
This is my earlier query.
psd Image creation with layer properties using CGImageRef
Thanks,
Dhana
PSD is a lousy format for anything but use in PhotoShop, and most third party libraries will miss some of the finer points of layer composition, in part because Adobe keeps extending the format, and in part because it isn't extremely well documented.
If you need to keep altered images in PSD, then presumably you have PhotoShop in-house. Your best bet is to use Photoshop Batch Processing which can be as easy as keyboard macros or as complex as you want to script.
I am using 2 500K bitmaps in to display images on my WiX dialogs.
They dramatically increase the size of the installation package, and what is worse - it looks there's no way to package them as a part of a .cab file since they're <binary>-es in the WiX terms.
So, I thught, is there any way to use other file formats for bitmaps or WiX is tethered with BMP? Ideally it would be greate if there's a way to use .png format since it comes with a looseless compression option.
The Windows Installer documentation for the Bitmap control states that the image should be a "bitmap" -- presumably a .BMP file -- or a JPEG.
You have to remember, when working with WiX, that it's based on Windows Installer. This means that any limitations in WiX are often caused by limitations in the underlying Windows Installer implementation.
.BMP files can be RLE-compressed. I don't know if they support any other compression algorithms.
The WiX toolset isn't tethered to BMP and JPG. As you've found you could put any of those other image formats into your package. However, the MSI SDK only documents BMP and JPG support.
Yes, if you only need to install on Windows 8 or later. From Bitmap Control:
Windows 8 and Windows Server 2012: The image file can be in any
standard format supported by the Windows Imaging Component (WIC),
including TIFF, JPEG, PNG, GIF, BMP, and HDPhoto. The control does not
support animation.
As was stated in other answers the image format limitation comes from Microsoft's implementation of MSI, and not from WiX. Although .jpeg seems to be supported starting from Windows 7, and PNG starting from Windows 8, be very careful about the format you use. Your trade-off is the look of your installer.
My experience showed that the only reliable way to ensure that your resulting installer displays your images correctly is to use uncompressed BMPs. And that is it! Yes, I know they balloon the size of the final file, but, hey, like everything else with Microsoft they are ages behind and there's no way around it.
So if you don't want to have your installer to display gray squares on Windows XP or Vista instead of your graphics, don't use anything other than raw .bmp format.