@verypdf news, pdf print

How to add new paper form of custom size?

See “How to change current paper form on the printer?” article from following web page,

https://www.verypdf.com/wordpress/201109/how-to-change-current-paper-form-2423.html

Do you know how to add the new paper size or paper form of custom size to the printer? if not, please refer to the sample VC++ source code at below,

if (OpenPrinter(PRINTER_NAME, &hPrinter, NULL))
{
FORM_INFO_1 FormInfo = {0};
FormInfo.pName = (char*) &szFormName;
FormInfo.Size.cx = FormInfo.ImageableArea.right = nFormWidth*1000;
FormInfo.Size.cy = FormInfo.ImageableArea.bottom = nFormLength*1000;

if (AddForm(hPrinter, 1, (BYTE*) &FormInfo))
{
FillPrinterPapers();

// set new paper to the printer
for (int i=0; i<nVeryPDFPaperCount; i++)
{
if (lstrcmp(szFormName, &pPaperNames[i*64]) == 0)
{
SetPrinterPaper(lpPapers[i], szFormName);
FillPrinterPapers();
break;
}
}
}
else
{
// report error
}

ClosePrinter(hPrinter);
}

How to change print quality (resolution) and paper orientation to target printer?

HANDLE hPrinter = NULL;
PRINTER_DEFAULTS printerDef = { NULL, NULL, PRINTER_ALL_ACCESS };

if (OpenPrinter(PRINTER_NAME, &hPrinter, &printerDef))
{
DWORD dwNeeded = 0;

GetPrinter(hPrinter, 2, NULL, 0, &dwNeeded);
if (dwNeeded > 0)
{
BYTE* lpPrinterInfo = new BYTE[dwNeeded];

// get current printer settings
if (GetPrinter(hPrinter, 2, lpPrinterInfo, dwNeeded, &dwNeeded))
{
DEVMODE* lpDevMode = ((PRINTER_INFO_2*) lpPrinterInfo)->lpDevMode;
lpDevMode->dmFields = lpDevMode->dmFields|DM_ORIENTATION |DM_PRINTQUALITY|DM_YRESOLUTION;

// change parameters
lpDevMode->dmOrientation = 1;    // Orientation: 1 - portrait; 2 - landscape.
lpDevMode->dmPrintQuality = 300; // Horizontal resolution value
lpDevMode->dmYResoultion = 300; // Vertical resoultion value

// save changed settings
if (!SetPrinter(hPrinter, 2, lpPrinterInfo, 0))
{
// report error
}
}
else
{
// report error
}

delete [] lpPrinterInfo;
}

ClosePrinter(hPrinter);
}
else
{
// report error
}

You can also look at "Adding custom paper sizes to named printers" article at following web page,

http://www.codeproject.com/KB/printing/custom_paper_sizes.aspx

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
@verypdf news, pdf print

How to change current paper form?

You can use following VC++ source code to retrieve paper size information from a special printer,

// Function that enumerates all available paper forms or paper size:
void FillPrinterPapers()
{
int nPaperCount = 0;
WORD* lpPapers = NULL;
char* lpPaperNames = NULL;
POINT* lpPaperSizes = NULL;

HANDLE hPrinter = NULL;

if (OpenPrinter(PRINTER_NAME, &hPrinter, NULL))
{
DWORD dwNeeded = 0;

// get printer forms
nPaperCount = DeviceCapabilities(PRINTER_NAME, NULL, DC_PAPERS, NULL, NULL);
if (nPaperCount)
{
lpPapers = new WORD[nPaperCount];
ZeroMemory(lpPapers, sizeof(WORD)*nPaperCount);
DeviceCapabilities(PRINTER_NAME, NULL, DC_PAPERS, (LPSTR) lpPapers, NULL);

lpPaperNames = new char[nPaperCount*64];
ZeroMemory(lpPaperNames, sizeof(char)*64*nPaperCount);
DeviceCapabilities(PRINTER_NAME, NULL, DC_PAPERNAMES, lpPaperNames, NULL);

lpPaperSizes = new POINT[nPaperCount];
ZeroMemory(lpPaperSizes, sizeof(POINT)*nPaperCount);
DeviceCapabilities(PRINTER_NAME, NULL, DC_PAPERSIZE, (LPSTR) lpPaperSizes, NULL);
}

ClosePrinter(hPrinter);
}
else
{
// report error
}
}

// Function that sets current paper form:
BOOL SetPrinterPaper(short dmPaperSize, const char* pszFormName)
{
BOOL bResult = FALSE;
HANDLE hPrinter = NULL;

if (OpenPrinter(PRINTER_NAME, &hPrinter, NULL))
{
DWORD dwNeeded = 0;
GetPrinter(hPrinter, 2, NULL, 0, &dwNeeded);
if (dwNeeded > 0)
{
BYTE* lpPrinterInfo = new BYTE[dwNeeded];

if (GetPrinter(hPrinter, 2, lpPrinterInfo, dwNeeded, &dwNeeded))
{
DEVMODE* pDevMode = ((PRINTER_INFO_2*) lpPrinterInfo)->pDevMode;
pDevMode->dmPaperSize = dmPaperSize;
lstrcpy((char*) &pDevMode->dmFormName, pszFormName);
SetPrinter(hPrinter, 2, lpPrinterInfo, 0);
bResult = TRUE;
}
else
{
// report error
}

delete [] lpPrinterInfo;
}

ClosePrinter(hPrinter);
}
else
{
// report error
}

return bResult;
}

VeryPDF

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

Introduce to VeryPDF HTML Converter Command Line product

Enhanced Metafile (EMF) is a graphics file format used for print, display on Windows Operating System. Compared with 16-bit Windows Metafile (WMF) format, 32-bit EMF is an enhanced version containing more information to provide better drawing precision. Both EMF and WMF are standard formats for scalable graphics in many Windows applications. Unfortunately, you'll have to convert them to other formats, e.g. PDF, so that you can use them across different platforms or applications.

Portable Document Format (PDF), an open standard for information exchange, is recognized by industries and organizations around the world. PDF is one of the most popular file format. It's hard to say how much information is distributed and got from PDF nowadays.

The PDF format has been a success because of its advantages:
1. Portable: Not only because of its small file size, but also the capability of self-contained, it's easy to transmit files between computers and various applications without worrying about the communication problem caused by different looks of the original sources on different screens.

2. Secure: Editing PDF files is difficult. In the circle of passing on from one person to another, the files can't be revised easily, you can also add signatures and watermarks to PDF files.

3. Accurate: PDF is just an image of your document, it looks the same on multi-screens and printers.

4. Easily created: since PDF is an open standard, any companies can build their own products to create and read PDF files.

VeryPDF provides you an all-in-one solution to convert EMF/WMF/RTF/Word Doc/HTML into PDF format. VeryPDF HTML Converter is an easy-to-use application. It allows user to convert files with graphical user interface or command line. Users can easily get started from the friendly graphical interface or call the command lines from ASP, C#, PHP etc. programs.

How to Convert a EMF file to PDF file via VeryPDF HTML Converter Command Line?

Step 1: Download the latest VeryPDF HTML Converter Command Line Version v2.1 to your local disk from https://www.verypdf.com/htmltools/htmltools.zip.
Step 2: Unzip the files to the path where you want to save them.
Step 3: Launch Start menu, click "Run...", input "cmd" to open a command prompt window.

(Notes: if you are using a Windows Vista system, you need to use "Run as Administrator" to launch the command prompt window.)

* Then input following commands:

cd <installation path>

htmltools.exe [options] "input-file" "output-file"<EMF-WMF-HTML-URL-RTF-file> [<PDF-PS-Image-file>]

Where [options] can be any of the following commands:

-width <int> : Set page width to PDF file
-height <int> : Set page height to PDF file
-bwidth <int> : Set web browser's width for HTML conversion
-bheight <int> : Set web browser's height for HTML conversion
-multipagetif : Create multipage TIFF format
-xres <int> : Set X resolution to image file
-yres <int> : Set Y resolution to image file
-bitcount <int> : Set color depth for image conversion
-rotate <int> : Rotate pages, 90, 180, 270
-margin <string> : Set page margin to PDF file
-margin 10 : Set margin to 10pt to left
-margin 10x10 : Set margin to 10pt to left,top
-margin 10x10x10 : Set margin to 10pt to left,top,right
-margin 10x10x10x10 : Set margin to 10pt to left,top,right,bottom
-view : View PDF file after creation
-append <int> :
-append 0: Overwrite if PDF file exists
-append 1: Insert before first page if PDF file exists
-append 2: Append to last page if PDF file exists
-append 3: Rename filename if PDF file exists
...
...
...

Example:

cd D:\VeryPDF

htmltools.exe D:\inputfiles\example.emf D:\outputfiles\example.pdf
htmltools.exe -bwidth 150 -bheight 150 D:\inputfiles\example.emf D:\outputfiles\example.pdf

FAQ:

Q. Can I use VeryPDF HTML Converter on Mac platforms?
A. No. The system requirements is Windows Platform, IE 5 or above with internet connection.

Q. May I call the VeryPDF HTML Converter command line version from a Java program?
A. Yes, you can. The VeryPDF HTML Converter command line application can be called from Java, ASP, C#, PHP, Delphi, VB, VC, .Net and COM+ etc program languages.

Q. I am browsing a web page which contains many beautiful pictures, may I save them in a PDF file?
A. Sure, The VeryPDF HTML Converter supports entire web page to PDF conversion. A multi-page PDF will be created with all the rich information.

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

Introduce to VeryPDF PDFcamp Printer

1. How to convert DOC file to PDF file with PDF Writer?

General:
Have you ever attempted to find a software to alter your paperwork to PDF format when you review it from any application* PDFcamp Printer may be your best choice to do this. Conversion from DOC, DOCX, XLS, XLSX, PPT, PPTX formats into PDF files can is so easy without the need to have Adobe Acrobat installed.

Steps:
* Download PDFcamp Printer from https://www.verypdf.com/pdfcamp/pdfcamp.htm web site.
* Install PDFcamp Printer on your local disk by double clicking the executable file pdfcamp_setup.exe
* Follow the Setup Wizard and complete the installation.
* Set PDFcamp Printer as your default printer will make it's easier to use when the installation is complete.
* After installation, a printer icon of "PDFcamp Printer" will show in Control Panel -> Printers and Faxes as your default printer.
* Open the DOC file, select File -> Print to open the Printer setup dialog. "PDFcamp Printer" has been the default printer. (You still can select "PDFcamp Printer" from the printer name drop down list if it's not set as your default printer.)
* Click "Properties" to customize your printer settings.
* Click "OK" to save your settings and then confirm to name and save the new PDF file to a destination.
* The newly generated PDF file will be shown to you if select "View after creation" in the "Save As" tab of Properties dialog once the conversion is completed.

2. HTML to PDF Converter
PDFcamp Printer offers an easy way of converting HTML or HTM formats to PDF file within your Internet browsers. No need to install other programs when you use this function. Being installed and operating as a printer driver, PDFcamp Printer provides you a low-cost, one-stop service to alter your e-documents to PDF files.

PDFcamp Printer works as a virtual printer that prints the web page to PDF files without missing original information, like Fonts, Links and etc. By choosing to print from the Internet browsers and then printing to the PDFcamp Printer, user can easily customize the output files by changing the printer properties.

Page Setup:
* Supports both Portrait and Landscape style.
* Supports customized and all kinds of standard page sizes.
* Supports any resolution and display scale.

Compression settings:
* Provides options to compress text and line art.
* Provides auto zoom images and compressions.

Doc Info:
* Provides PDF compatibility options for Adobe PDF format.
* Allows customized info of Title, Subject, Author and Keywords.

Output Options:
* Batch output to user path.
* Options for renaming, overwriting files or insert/append pages to existing files.
* Options for outputting as TEXT file.
* Options for viewing and sending email after creation.

Fonts Embedding:
* Provides a large set of fonts for adding.
* Quick options for selecting to embed all fonts or base 14 fonts.
* Easy way to add or remove all fonts.

Security:
* Supports file encryption.
* Defines different permissions according to user actions.
* Provides two encryption levels: 40-Bits and 128-Bits.

Links:
* Supports automatically detecting URLs and converting to PDF links.
* Provides options to set link appearances.
* Offers immediate preview of appearance settings.

Finish:
* Allows user to execute other special program after PDF conversion.

Email:
* Helps user to set Email recievers, senders, subject and contents.
* Allows to send mail through SMTP server.

About:
* Shows the version info of the application.
* Provides the entry point of registering.

The generated PDF file can be saved to the local disks or any other portable storage devices.

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

Dependency on Office

Please can you explain the meaning of the doc2any switch "-useoffice" with 0 or 1 ?
In both cases, to convert doc,docx,xls,xlsx,ppt,pptx, the program outputs:
"Please install Microsoft Office"

So: is doc2any capable of rendering office files without office being installed ?
==========================
"-useoffice 0" will not use MS Office to convert DOC, DOCX, PPT, PPTX, XLS, XLSX, etc. office documents to PDF and other formats.
"-useoffice 1" will use MS Office to convert office documents to other formats.

If your system hasn't MS Office installed, doc2any.exe will output "Please install Microsoft Office" message, this is normal, you can simple ignore this message.

>>So: is doc2any capable of rendering office files without office being installed ?

Yes, our DOC to Any Converter Command Line does convert office documents to PDF files without MS Office installed. DOC to Any Converter Command Line will work by following solutions:

1. If your system has MS Office 2007 + PDF&XPS addon installed, DocToAny will use PDF&XPS addon to save MS Office documents to PDF and XPS files,
2. If your system has MS Office installed but without PDF&XPS addon, DocToAny will use MS Office to print documents to PDF and XPS files,
3. If your system hasn't MS Office installed, but have OpenOffice installed, DocToAny will use OpenOffice to convert documents,
4. If your system hasn't both MS Office and OpenOffice installed, DocToAny will use ourself's DOC/RTF render to convert DOC and RTF formats to other formats, but doc2any will not support PPT and XLS formats at this time.

In general, you can do following conversions if your system hasn't MS Word and OpenOffice installed,
1. RTF to HTML without MS Word or OpenOffice,
2. RTF to DOC without MS Word or OpenOffice,
3. RTF to PDF without MS Word or OpenOffice,
4. DOC to HTML without MS Word or OpenOffice,
5. DOC to RTF without MS Word or OpenOffice,
6. DOC to PDF without MS Word or OpenOffice,

VeryPDF

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