PDF Software, Scripts, Utilities

How do I convert SVG files to PDF files on Windows Server from PHP or C# source code?

I tried to convert my SVG files to PDF files on Windows Server with a software, but it moves some sub-graphics randomly, and it makes some lines shorter in the output PDF. So it's output is useless, because the graphics looks completely different.

I tried opening the SVG in Google Chrome and printing it to PDF, but it distorts all the colors, and it also removes some elements. (The SVG appears fine on screen, but it's already bad in the print preview and the generated PDF is also bad.)

I don't want to rasterize or render the SVG. A solution which converts the SVG to a bitmap image and then creates a PDF with the image embedded is not an answer to my question.

What other options do I have?

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

image
Thanks for your message, VeryUtils has a SVG to PDF Converter Command Line software, this software supports Windows system, it does convert SVG files to vector PDF files, you can integrate it into your web applications easily on your Windows Server. You may download it from this web page to try,

https://veryutils.com/svg-to-pdf-converter-command-line

After you download it, you can run following command lines to convert your SVG files to PDF files,

svg2pdf.exe -$ XXXX-XXXX-XXXX-XXXX -dpi 72 -d _verypdf001.pdf verypdf001.svg
svg2pdf.exe -$ XXXX-XXXX-XXXX-XXXX -dpi 72 -d _verypdf002.pdf verypdf002.svg
svg2pdf.exe -$ XXXX-XXXX-XXXX-XXXX -dpi 72 -d _verypdf003.pdf verypdf003.svg
svg2pdf.exe -$ XXXX-XXXX-XXXX-XXXX -dpi 72 -d _verypdf004.pdf verypdf004.svg

"XXXX-XXXX-XXXX-XXXX" is your trial license key, after you purchase the software, you will get a license key, please use that license key to replace the trial license key, the demo watermark will be removed from generated PDF files.

You can call svg2pdf.exe from PHP source code easily with shell_exec() function, for example,

<?php

// Use ls command to shell_exec
// function
$output = shell_exec('D:\\VeryUtils\\svg2pdf.exe -$ XXXX-XXXX-XXXX-XXXX -dpi 72 -d D:\\VeryUtils\\output.pdf D:\\VeryUtils\\input.svg');
 
// Display the output message
echo "<pre>$output</pre>";
?>

You may also call svg2pdf.exe from your C# source code to convert SVG files to PDF files, for example,

using System.Diagnostics;

class Program
{
    static void Main()
    {
        LaunchCommandLineApp();
    }

    static void LaunchCommandLineApp()
    {
        // Part 1: use ProcessStartInfo class.
        ProcessStartInfo startInfo = new ProcessStartInfo();
        startInfo.CreateNoWindow = false;
        startInfo.UseShellExecute = false;
        startInfo.FileName = "D:\\VeryUtils\\svg2pdf.exe";
        startInfo.WindowStyle = ProcessWindowStyle.Hidden;

        // Part 2: set arguments.
        startInfo.Arguments = "-$ XXXX-XXXX-XXXX-XXXX -dpi 72 -d D:\\VeryUtils\\output.pdf D:\\VeryUtils\\input.svg";

        try
        {
            // Part 3: start with the info we specified.
            // ... Call WaitForExit.
            using (Process exeProcess = Process.Start(startInfo))
            {
                exeProcess.WaitForExit();
            }
        }
        catch
        {
            // Log error.
        }
    }
}

If you encounter any problem with VeryUtils SVG to PDF Converter Command Line software, please feel free to let us know, we are glad to assist you asap.

Business Software, Photo Software, Utilities

VeryUtils Easy Barcode Generator Software is a barcode encoding library supporting over 50 barcode types

VeryUtils Easy Barcode Generator Software is an easy to use barcode generation program.

* Create UPC-A and EAN-13 and other 50+ barcode graphics.
* Preview barcodes before exporting to a variety of formats.
* Create barcodes in seconds after quick install.

Quickly create the barcodes you need for product and inventory barcode labels. Simply select UPC-A, EAN-13 and other barcode types, enter the barcode number for an instant preview of the barcode, then save and export for printing.

You can Download VeryUtils Easy Barcode Generator Software for Windows from this web page,

https://veryutils.com/easy-barcode-generator

Easy Barcode Generator highlight features:
* Generate UPC-A barcodes and EAN-13 barcodes and other 50+ barcode types.
* Preview barcodes instantly before saving.
* Set the height and width for barcode graphics.
* Export barcodes as eps, svg, bmp, png, gif, tga, tif, or pcx files.
* Free trial version available.
* Include both GUI and Command Line applications.
* Automated ECI switching to support all Unicode characters and automated FNC1 character insertion in GS1 mode.
* Save barcode images to PNG, BMP, TIF, GIF, PCX, SVG, WMF and EPS.
* Includes CLI, GUI and API for calling from other applications.

Encodes data into any of the following:
Australia Post barcode, Aztec Code, Aztec Runes, Channel Code, Codabar, Codablock-F, Code 11, Code 128, Code 16K, Code 2 of 5 (Including IATA, Datalogic, ITF14, Deutsche Post Leitcode and Identcode), Code 32 (Italian Pharmacode), Code 39, Code 39+, Code 49, Code 93, Code One, Data Matrix (including DMRE), DotCode, Dutch Post KIX, EAN, Grid Matrix, GS-1 DataBar (including stacked and composite symbols), Han Xin, HIBC, Japan Post, Korea Post, LOGMARS, MaxiCode, MSI, PDF417 and Micro PDF417, Pharmacode, POSTNET, PLANET, QR Code and Micro QR, Royal Mail 4-state (RM4SCC) and Mailmark, Telepen, Ultracode, UPC-A, UPC-E, UPNQR and USPS Intelligent Mail.

Please by following steps to use VeryUtils Easy Barcode Generator Software,

1. Please download VeryUtils Easy Barcode Generator Software from this web page,

https://veryutils.com/easy-barcode-generator

2. After you install it, please run it and enter the text for the barcode,

imageYou can set more options for the barcode,

image

imageYou can select 50+ barcode types,

image3. After you feel OK with the preview of the barcode, you can click "Save" button to export current barcode image to a PNG or SVG or BMP or JPG or other image format, then you can print the export image file easily.

VeryUtils Easy Barcode Generator Software also supports command line operation, you may run the command line version with following command line,

"C:\Program Files (x86)\VeryUtils Easy Barcode Generator v2.0\barcode-gen-cmd.exe"

Easy Barcode 2.8.0
Encode input data in a barcode and save as BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF

  -b, --barcode=NUMBER  Number of barcode type (default is 20 (=Code128)).
  --batch               Treat each line of input file as a separate data set
  --bg=COLOUR           Specify a background colour (in hex)
  --binary              Treat input as raw binary data
  --bind                Add boundary bars
  --bold                Use bold text
  --border=NUMBER       Set width of border in multiples of x-dimension
  --box                 Add a box around the symbol
  --cmyk                Use CMYK colour space in EPS symbols
  --cols=NUMBER         Set the number of data columns in symbol
  -d, --data=DATA       Set the symbol content
  --direct              Send output to stdout
  --dotsize=NUMBER      Set radius of dots in dotty mode
  --dotty               Use dots instead of squares for matrix symbols
  --dmre                Allow Data Matrix Rectangular Extended
  --dump                Dump hexadecimal representation to stdout
  -e, --ecinos          Display table of ECI character encodings
  --eci=NUMBER          Set the ECI mode for raw data
  --esc                 Process escape characters in input data
  --filetype=TYPE       Set output file type (PNG/EPS/SVG/PNG/EPS/GIF/TXT)
  --fg=COLOUR           Specify a foreground colour (in hex)
  --fullmultibyte       Use multibyte mode for binary and Latin (QR Code/Han Xin/Grid Matrix)
  --gs1                 Treat input as GS1 compatible data
  --gssep               Use separator GS for GS1
  -h, --help            Display help message
  --height=NUMBER       Set height of symbol in multiples of x-dimension
  -i, --input=FILE      Read input data from FILE
  --init                Create reader initialisation/programming symbol
  --mirror              Use batch data to determine filename
  --mode=NUMBER         Set encoding mode (Maxicode/Composite)
  --notext              Remove human readable text
  -o, --output=FILE     Send output to FILE. (default is out.png)
  --primary=STRING      Set structured primary message (Maxicode/Composite)
  --secure=NUMBER       Set error correction level
  --scale=NUMBER        Adjust size of x-dimension
  --small               Use half-size text in PNG images
  --square              Force Data Matrix symbols to be square
  -r, --reverse         Reverse colours (white on black)
  --rotate=NUMBER       Rotate symbol by NUMBER degrees (PNG/BMP/PCX)
  --rows=NUMBER         Set number of rows (Codablock-F)
  -t, --types           Display table of barcode types
  --vers=NUMBER         Set symbol version (QR Code/Han Xin)
  -w, --whitesp=NUMBER  Set Width of whitespace in multiples of x-dimension

for example,

barcode-gen-cmd.exe -d "This Text"
barcode-gen-cmd.exe -i ./somefile.txt
barcode-gen-cmd.exe -o here.png -d "This Text"
barcode-gen-cmd.exe -o there.eps -d "This Text"
barcode-gen-cmd.exe -o datamatrix.png -b 71 -d "Data to encode"
barcode-gen-cmd.exe --height=100 -d "This Text"
barcode-gen-cmd.exe -w 10 -d "This Text"
barcode-gen-cmd.exe --box --border=10 -d "This"
barcode-gen-cmd.exe -r -d 'This'
barcode-gen-cmd.exe --fg=004700 -d "This"
barcode-gen-cmd.exe -b 71 --square --scale 10 --eci 17 -i utf8euro.txt
barcode-gen-cmd.exe -b 71 --square --scale 10 --eci 28 --binary -i big5char.txt
barcode-gen-cmd.exe -b 84 --direct --filetype=pcx -d "Data to encode"

You can integrate barcode-gen-cmd.exe into your application to generate the barcode images on the fly.

Scripts

Generate QR Code in PHP with PHP QR Code Generator source code

A QR code (abbreviated from Quick Response code) is a type of matrix bar-code (or two-dimensional code) first designed for the automotive industry. More recently, the system has become popular outside of the automotive industry due to its fast readability and comparatively large storage capacity. The code consists of black modules arranged in a square pattern on a white background. The information encoded can be made up of any kind of data (e.g., binary, alphanumeric, or Kanji symbols).

image

The amount of data that can be stored in the QR code depends on the character set, version and error correction level. The maximum values for version 40 with error correction capacity levels L, M, Q and H are:

Data Type ECC=L ECC=M ECC=Q ECC=H
Numeric only 7,089 5,596 3,993 3,057
Alphanumeric 4,296 characters 3,391 characters 2,420 characters 1,852 characters
Binary (8 bits) 2,953 bytes 2,331 bytes 1,663 bytes 1,273 bytes
Kanji/Kana 1,817 characters 1,435 characters 1,024 characters   784 characters

image

VeryUtils has a PHP QR Code Generator Script which can be purchased on this web page,

https://veryutils.com/php-qr-code-generator

You can also click "Live Demo" button on this web page to evaluate it online,

PHP QR Code Generator demo page also supports GET parameters:
data=qrcode string
level= L or M or Q or H
size=from 1 to 10

You can use cURL to call PHP QR Code Generator to get the QR Code,

https://veryutils.com/demo/php-qrcode/?data=https://veryutils.com&level=H&size=10

PHP QR Code Generator is a standalone PHP script, after you buy it, you will get full source code, you can integrate it into your project to generate QR Code easily.

Scripts

How to generate QR code in PHP automatically using VeryUtils PHP QR Code Generator?

QR Code is a 2-dimensional barcode specification. QR Codes can be seen on cola cans, business cards, in sushi bars, and in museums. The QR Code has since grown in popularity because of its ability to include a lot of data in a single image and the proliferation of smartphones with scanning apps.

QR codes are a popular type of two-dimensional barcode. They are also known as hardlinks or physical world hyperlinks. QR Codes store up to 4,296 alphanumeric characters of arbitrary text. This text can be anything, for example URL, contact information, a telephone number, even a poem! QR codes can be read by an optical device with the appropriate software. Such devices range from dedicated QR code readers to mobile phones.

In this article I'll show you how you can easily generate QR Codes from within your PHP application and share some ideas on how and when to use them, We'll be using VeryUtils PHP QR Code Generator, a library written in PHP for generating QR Codes and which doesn't require any dependencies beyond the standard GD2 graphics extension for creating images.

The first, please open following web page in your web browser,

https://veryutils.com/php-qr-code-generator

You can click "Live Demo" button to test it online,

image

In the demo page of PHP QR Code Generator Web application, you may enter a text into "Data" field, such as email address, web URL, phone number, address, payment hyperlink, etc. information, select "ECC" and "Size" options, click "Generate" button, then you will get a QR Code easily.

image

VeryUtils PHP QR Code Generator Web application supports GET parameters also,

data=QR Code string
level= L or M or Q or H
size=from 1 to 10

for example, you may call it like below,

https://veryutils.com/demo/php-qrcode/?data=https://veryutils.com&level=H&size=10

The "level" parameter is a level of error correction for the generated barcode, passed as a single letter string. This specifies how much of the data's codewords (8-bits per codeword) can be restored for a distorted or damaged QR Code image using the Reed-Solomon error correction algorithm. The higher the correction level, the less the data capacity of the barcode can be for a given dimension. Below is a table mapping the levels to their restore percentages and the string constants used when calling the PHP QR Code library.

image

Common Uses for QR Codes

The most common application for QR Codes is to encode website URLs, such as that to a Facebook fan page of your latest product, your company, etc. The options are endless. I myself use it on my business card and encode the URL to my LinkedIn profile.

image

Video Software

How to convert Video to mp3 (Convert MP4 to MP3) on windows?

MP4 files are used to store and watch videos, while MP3 files are used to store and listen audio. The MP4 and MP3 file formats have the same lineage, they all come from the File Compression Experts Group (MPEG) format. In addition, in terms of attributes, the MP4 file format and the MP3 file format are very similar. The only major difference between the two is that the MP4 format is used for video and the MP3 format is used for audio.

The conversion between the two formats is very simple. The MP4 file format contains both video and audio, while the MP3 file format contains only audio. In this case, simply strip the video content to convert MP4 files to MP3 files. However, the process of converting MP3 files to MP4 files is not smooth, because it is usually impossible to add videos to audio files and convert them to MP4 files. Many different applications and programs are designed for the Windows operating system, which can convert MP4 files to MP3 files.

VeryUtils Video Editor software is a Windows software, which can convert lots of Video formats to lots of Audio formats, such as,

mp4 to 3gp (3GPP Multimedia File)
mp4 to 3g2 (3GPP2 Multimedia File)
mp4 to aac (Advanced Audio Coding File)
mp4 to ac3 (AC3 Audio File)
mp4 to avi (Windows video file)
mp4 to flac (Free Lossless Audio Codec)
mp4 to flv (Flash video)
mp4 to gif (Compuserve graphics interchange)
mp4 to ipad (MPEG-4 (H264) Video File)
mp4 to iphone (MPEG-4 (H264) Video File)
mp4 to ipod (MPEG-4 Video File)
mp4 to mov (Apple QuickTime Movie)
mp4 to mp3 (Compressed audio file)
mp4 to mpg (Moving Picture Experts Group File)
mp4 to ogg (Ogg Vorbis Compressed Audio File)
mp4 to wav (Windows audio file)
mp4 to webm (Multimedia Container Format)
mp4 to wmv (Windows Media Video)

The following steps will let you know how to convert a MP4 or MKV or other video formats to MP3 Audio file using VeryUtils Video Editor software.

1. Please download and install VeryUtils Video Editor software from this web page,

https://veryutils.com/video-editor-software

2. After you install it, you may run it and open a Video file in the software,

image

3. In the Export window, you may choose "MP3" format as output format, you can also set some options for the MP3 format, then you can click "Export File" button to export to a MP3 file.

4. After a few seconds, you will get the final MP3 file,

image

5. You can open the MP3 file in Windows Media Player to listen it, you can also import this MP3 file to your mobile phone or other devices and listen it on anywhere.

image

If you have any question for VeryUtils Video Editor software, please feel free to let us know, we are glad to assist you asap.