PDF to Vector Converter

-scale option is not work in PDF to Vector Converter SDK

I am trying to use -scale feature from pdf2vec tool when converting to PostScript, but it does not appear to have any effect: same .ps file is produced with out without -scale option. I have tried command line tool, as well as SDK (.DLL). Is there some special syntax required for this option beyond what is on page:

https://www.verydoc.com/pdf-to-vector.html

Customer
----------------------------
Thanks for your message, you can run following command lines to convert your PDF file to PS files with different "scale" option, the output PS files are not same,

pdf2vec.exe -scale 50 -psmode 0 E:\test.pdf E:\test1.ps
pdf2vec.exe -scale 80 -psmode 0 E:\test.pdf E:\test2.ps

VeryDOC
----------------------------
Thank you very much for the quick response.

I have tested with suggested option, and that worked differently, but with issues, so this is not resolved yet.

1) the file produced with "-scale" option "huge". From 100 KB PDF, the .PS is 41 MB (!!). A non-scale converted .PS file is about 200 KB.

2) When printed, the .PS file is still not doing scaling image, so there is not visible difference. I have tested with 2 different types of printers, with different internal postscript engines, no scaling on any of them.

3) I have observed that the conversion is now done by using a print driver with specific name. To see if the issue of print file size could be resolved, I rename another "print to file" postscript driver to required name, and then the conversion produced expected reasonable postscript size (200KB), but still not resizing/scaling when printed.

I have tested printing directly from PDF reader program, and with "scale" option in the driver it does print resizes. So there is possibly some limitation in the way the PDF2Vec is using "scale" option in the driver.

Attached is a sample PDF file that I was using for testing. This is a file from a third-party customer, so while there is no confidential info in the file, please do not share it with others.

Customer
----------------------------
>>1) the file produced with "-scale" option "huge". From 100 KB PDF, the .PS
is 41 MB (!!). A non-scale converted .PS file is about 200 KB.

This is normal, because "-scale 50 -psmode 0" option will embed all necessary fonts into PS file, these fonts' data will increase PS file size a lot. If you don't want to embed the fonts, you may run following command line directly,

pdf2vec.exe D:\test.pdf D:\out.ps

this command line will create a small PS file from PDF file.

Do you want print the PDF file with "scale" option? if yes, we suggest you may download PDFPrint Command Line product from our website to try,

http://www.verypdf.com/pdfprint/pdfprint_cmd.zip

PDFPrint Command Line product has more options to scale the PDF pages to fit the target printer's paper size, for example,

pdfprint.exe -scale 50 -printer "Microsoft XPS Document Writer" D:\test.pdf

pdfprint.exe -scalex 50 -scaley 50 -printer "Microsoft XPS Document Writer" D:\test.pdf

pdfprint.exe -scalex 50 -scaley 50 -raster2 -printer "Microsoft XPS Document Writer" D:\test.pdf

Can you scale the PDF file and print to your printer correctly with PDFPrint Command Line application?

VeryDOC

DOC to Any Converter

How to convert Office file to PDF from web service applications?

In this article, I will show you how to convert Office file to PDF from web service applications. The software I use is named as VeryDOC Doc Converter COM, by this COM software, we can convert .doc, .xls, .html, .txt, .rtf etc files and any other printable files to PDF files. During the conversion, you can set page height, page width and other limitations to output PDF file. Please check more information of this software on homepage, in the following part, let us check how to use this software call DocConverter COM from PHP, ASP, C#, VB.NET, ASP.NET applications.

Step 1. Free download Doc Converter COM

  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can check elements in it. There are some elements in the extracted folder: pdfout.dll, install_as_service.bat, install_as_exe.bat, uninstall.bat, and doc2pdf_service.exe.
  • doc2pdf_service.exe is an Windows Service Application,you can call this software from Web Service Applications easily, for example, once you call DocConverter COM from PHP, ASP, C#, VB.NET, ASP.NET applications, doc2pdf_service.exe will accept and execute all conversion tasks automatically. This application will be started by "install_as_exe.bat" and "install_as_service.bat" files.
    There is one example of calling doc2pdf_service.exe software:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    There are two methods to launch this software--"doc2pdf_service.exe" : run as a Windows System Service and run as a Normal Windows Application,
    1. Run As a Normal Windows Application: C:\>doc2pdf_service.exe "-exe"
    This Command Line will run doc2pdf_service.exe as a normal windows application.
    2. Run As a Windows Service: C:\>doc2pdf_service.exe -i
    This Command Line will install the "VeryPDF DocConverter COM Service" into your system.
    C:\>doc2pdf_service.exe -u
    This Command Line will uninstall the "VeryPDF DocConverter COM Service" from your system.
    C:\>net start "VeryPDF DocConverter COM Service"
    C:\>net stop "VeryPDF DocConverter COM Service"
    Above Command Lines will start/stop "VeryPDF DocConverter COM Service" from your system.

Step 2. Converting Office to PDF from web service application.

    • When you need to convert Office to PDF from web service application, please pay more attention to the following things:
      For ASP example:
      1 You need run "install_as_exe.bat" file first, and make sure "doc2pdf_service.exe" application is running,
      2. Please make sure "html2pdf.exe", "doc2pdf_service.exe", "doc2pdf_config.ini" and "pdfout.dll" files have been installed into your system32 folder,
      3. Please make sure you have already installed "PDFcamp Printer" product.
      Here is some code examples for your reference:

~~~~~~~~~~~~~~~~~~~
Set PdfCreator = New PDFOUTLib.PdfCreator
PdfCreator.Word2PDF "C:\sample.doc", "C:\sample.doc.pdf"
PdfCreator.Word2PDF "C:\sample.xls",  "C:\sample.xls.pdf"
PdfCreator.Word2PDF "C:\sample.ppt", "C:\sample.ppt.pdf"
MsgBox "Word2PDF_ShellPrint finished"
Set PdfCreator = Nothing
~~~~~~~~~~~~~~~~~~~

During the using, if you have any question, please contact us as soon as possible.

DOC to Any Converter

How to insert text file to existing PDF by COM software?

In this article, I will show you how to insert text to PDF by COM software. Meanwhile this method can also be used to append text file to an existing PDF. COM software allows you to run the conversion together with VB, VC, C# etc. The software I will use is VeryDOC Doc Converter COM, by which you can also integrate the corresponding SOFTWARE into your developed software and redistribute it with royalty-free. You have the right to modify and use the SOFTWARE source codes.  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 Doc Converter COM

  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can use this software.
  • In the extracted package, you will find the following elements:
  • pdfout.dll:This is the DocConverter COM Component, you must register it into your system prior to use the HTML2PDF.exe application, "install_as_exe.bat" and "install_as_service.bat" files will install and register pdfout.dll file into your system automatically.
    install_as_service.bat: It will copy all necessary files to system32 folder and install "doc2pdf_service.exe" as a System Service, the Service Name is "VeryPDF DocConverter COM Service", you can start, stop, restart this Service from Windows System Service Management Application.
    install_as_exe.bat: It will copy all necessary files to system32 folder and install "doc2pdf_service.exe" as a Normal Windows Application.
    uninstall.bat:It will uninstall DocConverter COM from your Windows System.

Step 2. Insert text to PDF by this COM software.

  • When you use this software, please refer to the usage and code templates.
  • Here are some functions code examples, please have a check.
  • When you need to insert "C:/test.txt" file at the first page of an existing PDF file, please refer to the following command line template.
    "html2pdf.exe" "C:/test.txt" "C:/output.pdf" "AutomaticValue=3,Overwrite=yes"
    "html2pdf.exe" "C:/test.doc" "C:/output.pdf" "AutomaticValue=3,Overwrite=yes"
    "html2pdf.exe" "C:/test.html" "C:/output.pdf" "AutomaticValue=3,Overwrite=yes"
  • When you need to append "one text file at the end of PDF file, please refer to the following command line templates:
    "html2pdf.exe" "C:/test.txt" "C:/output.pdf" "AutomaticValue=4,Overwrite=yes"
    "html2pdf.exe" "C:/test.doc" "C:/output.pdf" "AutomaticValue=4,Overwrite=yes"
    "html2pdf.exe" "C:/test.html" "C:/output.pdf" "AutomaticValue=4,Overwrite=yes"
  • By this software, you can specify output PDF file name template by the following command line templates:
  • Set output pdf filename,For Example,Doc2PDFCOM.fileName = "C:/html2pdf.pdf"

  • You can also specify output PDF file paper size like the following output paper formats:
  • Set page type, the value is from 0 to 9,
        0 "Letter [8.5 x 11 in]",
        1 "Legal [8.5 x 14 in]",
        2 "Executive [7.25 x 10.5 in]",
        3 "Ledger [355.6 x 215.9 mm]",
        4 "Tabloid [11 x 17 in]",
        5 "Screen [10 x 7.5 in]",
        6 "A3 [297 x 420 mm]",
        7 "A4 [210 x 297 mm]",
        8 "A5 [148 x 210 mm]",
        9 Custom page size
    For Example,
        Doc2PDFCOM.paperType = 7;

So by those parameters, you can insert text to PDF easily. Please check more functions of this software on user manual. During the using, if you have any question, please contact us as soon as possible.

DOC to Any Converter

How to create PDF from printable files and then send output PDF directly by C#?

Sometime, we need to convert printable files to PDF for printing, long time preserving or others by self-developed applications like ERP.  In this article, I will share a method of creating PDF from printable PDF file and then send output PDF directly by C#. The software I will is named as VeryDOC Doc Converter COM, by which you can convert files of Microsoft Word, PowerPoint, Excel, JPG, PNG, GIF, HTML and others to PDF by script together with other application like VB, VC, C# etc. Please check more detail information on homepage, in the following part, I will show you how to use this software.

Step 1. Free download and install Doc Converter COM

  • Please download and install PDFcamp Printer v2.3 or PDFcamp Printer Pro v2.3, and then download DocConverter COM from our website.
  • Please unzip "doc2pdf_com_trial.zip" package to a folder, and run "install_as_exe.bat" file to install the DocConverter COM into your system
  • Then you can run HTML2PDF.exe from command line to try, HTML2PDF.exe is a Windows Command Line Tool, you can run it from command line window,For example:html2pdf.exe "http://www.yahoo.com" "C:\yahoo.pdf".

Step 2. Create PDF from printable file and then send output PDF by email directly.

  • When you need to call this COM software together with  other applications like C#, please refer to the following command line templates.
  • The following command line template can help you convert .doc, .xls, .html, .txt, .rtf etc files to PDF files, but it will popup a print dialog when conversion, this is a global function, you need set any value before you call it,
    Private Sub Word2PDF_ShellPrint_Click()
        Set PdfCreator = New PDFOUTLib.PdfCreator
        PdfCreator.Word2PDF "C:\sample.doc", "C:\sample.doc.pdf"
        Debug.Print "C:\sample.doc -->C:\sample.doc.pdf"
        MsgBox "Word2PDF_ShellPrint finished"
        Set PdfCreator = Nothing
    End Sub
  • When you need to send output PDF file to some body by email directly, please refer to the following command line templates. After create a PDF file and send it from your mail client, For Example,
            Set PdfCreator = New PDFOUTLib.PdfCreator
            PdfCreator.HTML2PDF = "C:\sample.html"
            PdfCreator.FileName = "C:\sample.pdf"
            PdfCreator.HeadersFooters = "off"
            PdfCreator.paperType = 6 '//7 is A4 paper, 6 is A3 paper
            PdfCreator.subject = "I can control the subject this way"
            PdfCreator.body = "And I can control the body too"
            PdfCreator.SendEmail
            While PdfCreator.StillRunning = 1
                DoEvents
                Call WaitMessage
            Wend
            Set PdfCreator = Nothing

There are too many functions of this software, I can not list all of them here. If you need to know more functions of this software, please visit homepage or User Manual of Doc Converter COM Component. During the using, if you have any question, please contact us as soon as possible.

HTML Converter

How to convert encrypted website to PDF by Doc Converter COM?

   In this article, I will show you how to convert encrypted website to PDF by VeryDOC Doc Converter COM. The encrypted website refers to those websites which have user name and password requited when you need to enter those websites. When converting those website to PDF, you need to specify user name and password first then converting it to PDF. For catering this needs, Doc Converter COM has such function.

What VeryDOC Doc Converter COM is?

VeryDOC Doc Converter COM is a software component which can be used to be integrated with other applications (or DLL Library, or Command Line), enabling developers to access the converter via any programming or scripting languages, such as Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc.

By this software, you can fulfill the following functions:

  • Create PDF from any printable files like web pages and DOC, RTF, TXT, PPT, XLS files into PDF paperwork.
  • After creating PDF, you can send output PDF to others by email directly.
  • Create PDF and specify paper size.
  • When converting HTML to PDF, you can set input document filename or a URL point to a website, set input content from a buffer, this function only can work for a html stream and others.
  • Please check more functions of this software on homepage. In the following part, let us check how to convert encrypted website to PDF briefly.

Convert encrypted website to PDF

  • Free download Doc Converter COM. When downloading finishes, there will be a zip file. Please extract it to some folder then you can find component and help document.
  • When converting encrypted website to PDF, please refer to the following command line template.
    Set username&password for encrypted site to PDF conversion,html2pdf "http://www.xxxxxx.com/index.html" "C:/output.pdf" postdata=Username=support@verypdf.com&Password=password

By the above command line, first you need to input the website URL then the full path of the output PDF file. input user name and password. By this way, you can convert encrypted website to PDF.

Here are more examples of other functions for your reference.

  • Set page header&footer for HTML to PDF conversion,
    "html2pdf.exe" "www.yahoo.com" "C:\yahoo.pdf" "htmlHeaders=this is header,htmlFooters=this is footer"
  • Set values for page header&footer within HTML to PDF conversion,
    "html2pdf.exe" "www.yahoo.com" "C:\yahoo.pdf" "htmlHeaders=&w&bPage &p/&P,htmlFooters=&u&b&d"
  • Set passwords for DOC, DOCX, HTML, MHTML, PPT, PPTX, XLS, XLSX, RTF, etc. document to PDF conversion,
    "html2pdf.exe" "C:/Doc1.DOC" "C:/Doc1.pdf" "Encryption=2,EncryBits=16,Permission=0,UserPass=,OwnerPass=123"
  • Set page margin within conversion,
    "html2pdf.exe" "http://www.yahoo.com" "C:/yahoo.pdf" "paperType=9, pageWidth=575, pageHeight=850, margin_left=10, margin_top=40, margin_right=10, margin_bottom=40"

During the using, if you have any question, please contact us as soon as possible.