Convert PDF to SVG by some libraries

Question:I want to convert PDF to SVG please suggest some libraries/executable that will be able to do this efficiently. I have written my own program using some libraries. This solution works great but the size of the resulting SVG files in huge.(many times greater than the pdf). I have figured out where the problem is by looking at the SVG in a text editor. it encloses every character in the original document in its own block even if the font properties of the characters is the same. For example the word hello will appear as 6 different text blocks. Is there a way to fix this matter in VeryDOC?

Answer: According to your description, you need to find a libraries which can help you convert PDF to SVG in little size. If so, maybe you can have a free trial of this software VeryDOC PDF to Vector Converter, by which you can convert large volumes of PDF files to SVG from Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc. Using the COM object (or DLL Library, or Command Line), file conversions can be done consecutively or simultaneously.  When you use this software, the output SVG file will not too big. You can have a free trial of it, and if you are not satisfied with the result, we provide customization of software developing. We can improve software according to your needs.

Step 1. Free download PDF to Vector Converter SDK Developer License

  • This SDK version provides DLL Library and Command Line exe file for your to try.
  • When downloading finishes, there is a zip file. You need to unzip it then you can call it normally.
  • When you use this software, please refer to the usage  and code template in unzip folder.

Step 2. Convert PDF to SVG from C#

  • Here is code template of calling this software from C# for converting PDF to SVG, please have a check.

Please by following steps to call pdf2vec.exe inside a special user account,
1. Please download and install EXEShell COM Library (freeware) from following URL first,
https://www.verydoc.com/exeshell.html
https://www.verydoc.com/download/exeshell.zip
2. Please use following C# code to run the conversion inside a special user account,

~~~~~~~~~~~~~~~~~
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
System.Type otype = System.Type.GetTypeFromProgID("exeshell.shell");
Object o = System.Activator.CreateInstance(otype);
otype.InvokeMember("RunCommandLine", System.Reflection.BindingFlags.InvokeMethod, null, o,
new object[] { "UserName", "Password", @"C:\pdf2vec.exe ""C:\test.pdf"" ""C:\out.svg""" });
otype = null;
}
}
}
~~~~~~~~~~~~~~~~~

Remark:
You may encounter Error 1314 in some Windows systems when you switch between user accounts, this is caused by permission setting, please by following steps to solve this 1314 Error,

ERROR 1314:
~~~~~~~~~~~~~
1314 A required privilege is not held by the client. ERROR_PRIVILEGE_NOT_HELD
~~~~~~~~~~~~~

The output SVG file converted by this software will not be too big. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!