HTMLPrint to Any Converter

How to convert a web page to XPS file from Command Line?

I am attempting to test out the html2any.exe with the print to xps command. I can get it working fine, but the resulting xps image is not crisp at all...very blurry. Is there anything I can do about this?

Customer
-----------------------------
Here is the url for the test page I have been working with.

https://www.verydoc.com

Before I set this up though, even when I tested html2any -printtoxps for the verypdf.com site it also was coming out blurry. As you can see, we are thinking of using this to convert badge files to xps for printing. These badges may have graphics and/or barcodes which will need to be crisp.

I do not have an order id yet because we are still testing the product to se if it will work for our purposes.

Thank you in advance for you help,

Customer
-----------------------------
I have tried following command line, it does convert this web page to a XPS file properly,

html2any.exe -printtoxps D:\temp\out.xps https://www.verydoc.com

Can you work fine by above command line in your system?

How to convert a web page to XPS file from Command Line?

VeryDOC

PDF to Vector Converter

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.

PDF to Vector Converter

Bold text problem when convert PDF file to XPS file by PDF to Vector Converter Command Line

When converting a new version of PDFs with pdf2vec to xps. The result is a blurry and the text is not selectable. This is a new pdf that was exported from our recently upgraded accounting system.

Customer
----------------------------------

You can run following command line to convert your PDF file to XPS file with normal fonts,

pdf2vec.exe -winfont -winfont2 D:\downloads\sample.pdf D:\downloads\sample.xps

-winfont : use Windows fonts to instead of embedded fonts
-winfont2 : force to use Windows fonts to instead of all embedded fonts

"-winfont -winfont2" options will use Windows System fonts to instead of PDF fonts, we hoping these options will useful to you.

This is original PDF file, as you see, text contents are look perfect,

Bold text problem when convert PDF file to XPS file by PDF to Vector Converter Command Line

Convert this PDF file to XPS file by following command line,

pdf2vec.exe D:\downloads\sample.pdf D:\downloads\sample.xps

The text contents are bold and blurry, the text contents are not selectable, this is because pdf2vec.exe does use pdf embedded fonts to render text contents, the characters are become outlines in the XPS file, so you can't extract text contents from this XPS file.

Bold text problem when convert PDF file to XPS file by PDF to Vector Converter Command Line

In order to solve this problem, we need use Windows fonts to instead of PDF Embedded fonts, pdf2vec.exe is provide -winfont and -winfont2 options to use Windows fonts to instead of PDF Embedded fonts, you can run following command line to create a XPS file with Windows system fonts,

pdf2vec.exe -winfont -winfont2 D:\downloads\sample.pdf D:\downloads\sample.xps

Now we can select contents in XPS file easily, please refer to following screenshot,

Bold text problem when convert PDF file to XPS file by PDF to Vector Converter Command Line

VeryDOC

DOC to Any Converter

Running Doc2Any as a scheduled task

This command fails when the scheduled task is set to "Run whether user is logged on or not"; I've spent hours trying to resolve it. I found your suggestion on using the CmdAsUser, but won't work as the password has a '%' sign and can't be changed right now (CmdAsUser can't seem to process the % in a batch file)

It's been a while since I installed this on my client's machine, the file date for doc2any.exe is 8/25/2011, file version is 2.3.0.1 - I was hoping there might be an update that helps work around this issue (running on Windows 2008 R2, Office 2010 is installed)

Test batch file, tried with useOffice 1 and 0

rem TEST
c:\ExtranetDocs\doc2any_cmd\doc2any.exe -log c:\ExtranetDocs\tempdocs\logs\4483003.DOCX.log -killoffice 1 -useoffice 1 c:\ExtranetDocs\tempdocs\4483003.DOCX c:\ExtranetDocs\tempdocs\4483003.PDF

Customer

------------------------------------------------------

>>CmdAsUser can't seem to process the % in a batch file

If you are using .bat file to do the batch conversion, you can use %% to instead of % in the .bat file.

If you just run CmdAsUser.exe from CMD window, you can use quotation marks to include the password, e.g.,

C:\doc2any\CmdAsUser.exe Administrator . /p "pass%word" C:\doc2any\doc2any.exe C:\test.doc C:\out.pdf

Another solution is set MS Word DCOM run inside Administrator user account to instead of default SYSTEM user account, please look at following web pages for more information,

https://www.verydoc.com/blog/failed-to-call-doc2any-exe-from-c-or-vb-net-source-code.html
https://www.verydoc.com/blog/how-to-call-doc2any-exe-from-asp-code.html
https://www.verydoc.com/others/configure-word-and-excel.htm
https://www.verydoc.com/blog/cannot-test-doc2any-on-net.html
https://www.verydoc.com/blog/doc2any-exe-very-slow-when-executed-from-php.html
https://www.verydoc.com/blog/failed-to-call-doc2any-exe-from-java-application-to-convert-pptx-and-docx-files-to-pdf-files.html
https://www.verydoc.com/blog/run-doc2any-on-windows-2003-or-windows-2008-system.html
https://www.verydoc.com/doc-to-any-shell.html

VeryDOC

--------------------------------------------------------------------

You need set MS Word DCOM run inside an interactive user account instead of default system user account, please look at following web pages for more information,

https://www.verydoc.com/blog/cannot-test-doc2any-on-net.html

Please arrange MS Word DCOM run from an interactive user account, please refer to following web page,

https://www.verydoc.com/doc-to-any-faq.html

"Your COM Name" should equal to "Microsoft Office Word 97 – 2003 Document" in your system, please give enough permission to "Microsoft Office Word 97 – 2003 Document" DCOM in your system to try again.

The following web pages will useful to you too,

https://www.verydoc.com/blog/how-to-call-doc-to-any-converter-sdk-from-asp-net-source-code.html

https://www.verydoc.com/blog/how-to-call-doc2any-exe-from-asp-code.html

http://www.verypdf.com/wordpress/201109/doc2any-sdk-dll-does-work-on-localhost-but-not-work-on-internet-2333.html

https://www.verydoc.com/doc-to-any-shell.html

https://www.verydoc.com/blog/run-doc2any-on-windows-2003-or-windows-2008-system.html

https://www.verydoc.com/blog/how-to-call-doc2any-from-php.html

We have also a VeryPDF Cloud API Platform, this is a Cloud Service to convert online office documents to PDF files, please look at following web pages for more information,

http://www.verypdf.com/online/cloud-api/user-guide.html
http://online.verypdf.com/api/

VeryPDF Cloud API Platform is a cloud service, all conversion will be done on our servers, you needn't install any software to your server in order to convert office documents to PDF files.

VeryDOC

DOC to Any Converter

How can I get the number of color pages in a PDF file using C#?

Question:Given a PDF file with color and black & white pages, is there any way with C# to find out among the given pages which are color and which are black & white? Is there a solution on VeryDOC?

Answer:According to your needs, maybe you can have a free trial of software VeryDOC Spool File Page Counter SDK, by which you can count the black and white pages and color pages in document formats like PDF, PS and PCL files and it is useful for printer accounting software. Meanwhile this is SDK version software, it can be called from C# easily. It also can be called together with other programming language like Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc. Please check more information of this software on homepage, in the following part, let us check how to use this software.

Step 1. Free download Spool File Page Counter SDK v2.0

  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can use it normally like other SDK software.
  • And now there is no single user version of this software. If you need to develop it under single computer, please choose the server version, it also can be used under single computer.

Step 2. Count color page number of PDF.

  • When you need to call this software from C# for counting color page number, please refer to the following code template:
  • Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
      Dim bIsRenderToPDF As Integer
      Dim bwPageCount As Integer
      Dim colorPageCount As Integer
      Dim copyCount As Integer
      Dim nPageWidth As Double
      Dim nPageHeight As Double
      Dim strPaperSizeName As String
      Dim nRet As Integer
      Dim strMsg As String
      Dim strFileName As String

      bIsRenderToPDF = 0
      bwPageCount = 0
      colorPageCount = 0
      copyCount = 0
      nPageWidth = 0
      nPageHeight = 0
      strPaperSizeName = Space$(300)
      strFileName = Application.StartupPath() & "\test_tiger.pdf"
      nRet = ReadInfoFromPSFile(strFileName, bIsRenderToPDF, bwPageCount,
      colorPageCount, copyCount, nPageWidth, nPageHeight, strPaperSizeName)

      strMsg = strMsg + "FileName = " + strFileName + vbCrLf
      strMsg = strMsg + "bIsRenderToPDF = " + CStr(bIsRenderToPDF) + vbCrLf
      strMsg = strMsg + "bwPageCount = " + CStr(bwPageCount) + vbCrLf
      strMsg = strMsg + "colorPageCount = " + CStr(colorPageCount) + vbCrLf
      strMsg = strMsg + "copyCount = " + CStr(copyCount) + vbCrLf
      strMsg = strMsg + "PaperSizeName = " + CStr(strPaperSizeName) + vbCrLf
      MsgBox(strMsg)

      strMsg = strMsg + "FileName = " + strFileName + vbCrLf
      strMsg = strMsg + "bIsRenderToPDF = " + CStr(bIsRenderToPDF) + vbCrLf
      strMsg = strMsg + "bwPageCount = " + CStr(bwPageCount) + vbCrLf
      strMsg = strMsg + "colorPageCount = " + CStr(colorPageCount) + vbCrLf
      strMsg = strMsg + "copyCount = " + CStr(copyCount) + vbCrLf
      strMsg = strMsg + "PageWidth = " + CStr(nPageWidth) + vbCrLf
      strMsg = strMsg + "PageHeight = " + CStr(nPageHeight) + vbCrLf
      strMsg = strMsg + "PaperSizeName = " + CStr(strPaperSizeName) + vbCrLf
      MsgBox(strMsg)
    End Sub

    If you need to know more examples, please go to website. During the using, if you have any question, please contact us as soon as possible.