How to break pages and HTML tables in htmltools application by using CSS Page Breaks When Converting HTML to PDF?

Similarly like in word editors, there are also page breaks in CSS that allows you to break your content across pages. With these properties you can control page breaks when printing and converting to PDF.

http://www.verypdf.com/app/html-converter/index.html

image

How to control page breaks in CSS?
There are three different css properties for page break control:

* page-break-before
The page-break-before property control a page-break that occur immediately before the element to which it is applied.

* page-break-after
The page-break-after property control a page-break that occur immediately after the element to which it is applied.

* page-break-inside
The page-break-inside property control a page-break inside the element to which it is applied.

These properties can be applied to block-level elements in the normal flow of the root element.

Syntax for css page break property
page-break-after: auto | always | avoid | left | right
page-break-before: auto | always | avoid | left | right
page-break-inside: auto | avoid

Detailed descriptions of each css page break possible value:

auto: Initial value. Automatic page breaks.
always: Always force page breaks before/after the element.
avoid: Avoid page breaks before/after/inside the element.
left: Force page breaks before/after the element so that the next page is formatted as a left page.
right: Force page breaks before/after the element so that the next page is formatted as a right page.

/* avoid splitting element across pages */
.no-break {
  page-break-inside: avoid;
}
/* force h2 title to display on new page */
h2 {
  page-break-before: always;
}

<h2>Title</h2>
<div>
  ... content ...
</div>
<div class=”no-break”>
  ... content inside this element will not break from page to page ...
</div>
<h2>New page title</h2>

How to control page breaks inside tables?
HTML PDF API controls page breaks in tables and table rows automatically, but however, in some specific situations with advance layout, you can get all kinds of incompatibility. If you're building the table in such situations, we'd suggest cutting it up into smaller tables, and put page breaks between them. The other solution is to convert table to block elements structure.

Also HTML PDF API is trying to keep image elements from being split in half automatically, but in tables they may hang over the page break a bit. The best way to deal with this problem is to wrap img with block-element.

.no-break {
  page-break-inside: avoid;
}

<td>
  <div class="no-break">
    <img src="http://placehold.it/350x700">
    <img src="http://placehold.it/350x600">
  </div>
</td>

But if your HTML file contains complicated CSS styles, and if "page-break-after" or "page-break-inside" or "page-break-before" option doesn't work, in this case, we have another solution to you, please refer to following steps,

1. You may split your long HTML file to several small HTML files by "<div style = "display:block; clear:both; page-break-after:always;"></div>" tag, one HTML file per page, you may write a PHP script to do this work, it's not difficulty. You may put some common resources into external files, and refer to these external files from these single page HTML files.

2. You may run htmltools.exe to convert these HTML files to PDF files one by one,
 
htmltools.exe -webkit "-$" "XXXXXXXXXXXXXXXXXXX" -javascript-delay 5000 -run-script-file "chart_legend_fix.txt" page1.html page1.pdf
htmltools.exe -webkit "-$" "XXXXXXXXXXXXXXXXXXX" -javascript-delay 5000 -run-script-file "chart_legend_fix.txt" page2.html page2.pdf
htmltools.exe -webkit "-$" "XXXXXXXXXXXXXXXXXXX" -javascript-delay 5000 -run-script-file "chart_legend_fix.txt" page3.html page3.pdf
htmltools.exe -webkit "-$" "XXXXXXXXXXXXXXXXXXX" -javascript-delay 5000 -run-script-file "chart_legend_fix.txt" page4.html page4.pdf
htmltools.exe -webkit "-$" "XXXXXXXXXXXXXXXXXXX" -javascript-delay 5000 -run-script-file "chart_legend_fix.txt" page5.html page5.pdf
 
3. You may combine these PDF files into one final PDF file by "-mergepdf" option,
 
htmltools.exe -mergepdf "C:\*.pdf" C:\out.pdf
htmltools.exe -mergepdf "C:\filelist.txt" C:\out.pdf
htmltools.exe -mergepdf "C:\test-extraction.pdf*10-15 C:\out10-15.pdf
htmltools.exe -mergepdf "C:\test-extraction.pdf*500-501 C:\out500-501.pdf

We hope above solution will work fine to you, you may give it a try.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in HTML Converter (htmltools) | Tagged , , , , , | Leave a comment

VeryPDF Paperless Solution for Paperless Office

VeryPDF provides a paperless solution that can help your business through paperless. With the VeryPDF Paperless Solution, you can integrate digital document workflows into your company.

image

Here are many ways that your business can greatly benefit from VeryPDF Paperless Solution.

Increase Productivity
Combining digital documents and collaboration tools enables employees to share knowledge, collaborate, and innovate by quickly and easily obtaining the right information.

Save Costs
All these papers, plus the cost of printers, copiers, toners, filing cabinets, etc., can be eliminated and replaced with low-cost computer storage devices. Paperless ROI is usually measured in months.

Boost Satisfaction
When customer support staff can answer their questions immediately, or can access their information and documents on demand through your website or email, your customers will be happy.

Improve Security
Through encryption, rights management and audit trails, despite the news of widely publicized cyber attacks, digital documents are more secure than printed documents.

Protect the Environment
Despite our best efforts to recycle, the paper industry still produces greenhouse gases, which causes deforestation and landfill. Save a tree, paperless!

Paperless is easy!
Let us provide you with a solution covering a few simple steps,

1. Convert your paper into a digital document
If there is a lot of paper in the file cabinet and/or a lot of paper mail and faxes in the mail room, a high-performance scanner and server software solution is needed to convert the paper from the scanned image to a digital PDF document. VeryPDF image to PDF (OCR) converter command line is a high-performance software solution that converts all scanned images to standard PDF.

2. Replace paper forms with interactive PDF forms
Using interactive PDF forms is not only easy to fill out, but also saves complete digital forms as records and pulls data from the form to a centralized repository. VeryPDF Form Filler and VeryPDF PDF editor software can fill interactive PDF forms quickly and easily.

VeryPDF PDF Editor
http://www.verypdf.com/app/pdf-editor/index.html

VeryPDF PDF Form Filler
http://www.verypdf.com/app/pdf-form-filler/index.html

3. Standardize on PDF editor and ECM to construct, modify and manage all documents
PDF is the preferred file format for managing paperless offices. VeryPDF PDF Editor provides the industry's best solution for building and modifying shareable PDF documents. Its built-in integration with enterprise content management (ECM) systems makes management and collaboration easy.

4. Document workflow in digital applications
Integrate PDF technology into your applications through VeryPDF's various PDF SDK products. Cross-platform viewing capabilities and annotations enable you to highlight and underline certain parts of PDF documents from any device, add annotations, delete text and even draw shapes without any printing.

5. Choose an electronic signature solution
The organization has contracts to sign contracts and approve documents/forms both inside and outside the company. VeryPDF PDF Editor is integrated with leading electronic signature technology, making document signing in a paperless office a breeze.

Evaluate VeryPDF Signer Online,
https://signer.verypdf.com/

VeryPDF Online Tools,
http://online.verypdf.com/products

VeryPDF DRM Cloud DocSafe Solution,
http://drm.verypdf.com/online/

A Platform for Digital Products,
https://veryutils.com/

Celebrate your paperless success and wisely decide to cooperate with 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)
Posted in VeryPDF Blog, VeryPDF SDK & COM | Tagged , , | Leave a comment

VeryPDF Document Converter Software can be used to convert between 50+ document formats, the Enterprise Server Solution

VeryPDF Document Converter Software can be used to convert documents of DOC, DOCX, PPT, PPTX, XLS, XLSX, VSD, PDF, HTML, RTF, TXT, etc. to PDF, PS, EPS, JPEG, TIFF, PCX, PNG, GIF, TGA, BMP, DCX, WMF, EMF, XPS, PCL, TXT, and so on by a command line tool and Windows GUI application. VeryPDF Document Converter Software is one of the most stable, easy-to-use, and comprehensive multi-format document file converters.

image

You can Download VeryPDF Document Converter Software for Windows from this web page,

http://www.verypdf.com/app/document-converter/document-converter.html

VeryPDF Document Converter is the enterprise server solution

The VeryPDF Document Converter is a company-wide PDF converter solution that converts all popular file formats to PDF, PDF/A and TIFF. The conversion service can be accessed using watched folders, batch or its API.

VeryPDF Document Converter Software highlight features:

  • Quick and easy one-click document convert process.
  • Batch file converter to converts thousands of files.
  • Converts between 20+ document formats within minutes.
  • Supports both Windows GUI and Command Line two operation methods.
  • Converts between many different document formats.
  • Supports converting between or from Microsoft Office files such as DOC, DOCX, XLS and XLSX.
  • Microsoft Works converter lets you convert wps to word.
  • Supports conversions from WordPerfect, TXT, Open Office, ODT and more to PDF, DOCX and more.
  • Batch convert thousands of files at once.
  • Convert Office document formats to PDF, EPS, PS, Text, Image and more formats.
  • Drag and drop documents to be converted into VeryPDF Document Converter software.
  • Share documents with friends and clients who use different word processing software.
  • Easily combine multiple PDF files with PDF merge function.
  • Installs two virtual printers, docPrint and docPrint PDF Driver.
  • docPrint Virtual Printer is for EMF saving and 1 up, 2 up, 4 up, 8 up, 1 up printing.
  • docPrint PDF Driver is a Virtual Printer for PDF, EPS, PS, PNG, JPG, PCX, TGA format creation.
  • You can use docPrint Virtual Printer to convert color documents to grayscale printing, save Your Printer Ink.
  • You can use docPrint Virtual Printer to convert to combine several pages into one page, save Your Paper.
  • You can call docPrint Command Line from your application to convert documents, it's royalty free.
  • Making documents archivable (MS Word to PDF also convert docx to pdf).
  • Migrating existing archives.
  • Fulfilling standards (ISO) and security requirements.
  • Archiving websites and email.
  • Standardizing the variety of formats across the corporation.
  • Conversion of a variety of formats, such as Office documents or emails, to PDF/A and TIFF.
  • Merge PDF and TIFF documents.
  • Configuration application for easy management of conversion settings.
  • Minimal platform and resources requirements for clients.
  • Automatic conversion processing from watched folders.
  • Scalability for high throughput by parallel processing.
  • Automatic processing also from folders on an e-mail server.
  • Application Programming Interfaces available (C/C++, Java, COM).

image

VeryPDF Document Converter Software is a great document conversion software for your office and home use. You may download the trial version from this web page to try,

http://www.verypdf.com/app/document-converter/try-and-buy.html#buy_pro

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

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in docPrint Pro | Tagged , , , , , , , , | Leave a comment

I am rebuilding my server using doc2any for file conversions, how do I register doc2any.exe application on my server?

Hi,

I am rebuilding my server using doc2any for file conversions, I have a licence key but I cant find any way to apply this licence so that I am not limited by how many times I can call the executable.

Can you help please?

Thanks
Customer
------------------------------------------

image
Thanks for your message, the latest version of "VeryDOC DOC to Any Converter Command Line" can be downloaded from following URL,

http://www.verydoc.com/doc2any_cmd.zip

After you download and unzip it to a folder, you may run following command line to register "VeryDOC DOC to Any Converter Command Line" product,

doc2any.exe "-$" "XXXXXXXXXXXXXXXXX"

Please use your real license key to instead of the "XXXXXXXXXXXXXXXXX" in above command line.

You can also pass the license key and other parameters together, for example,

doc2any.exe "-$" "XXXXXXXXXXXXXXXXX" "D:\test.doc" "D:\out.pdf"
doc2any.exe "-$" "XXXXXXXXXXXXXXXXX" "D:\test.docx" "D:\out.pdf"
doc2any.exe "-$" "XXXXXXXXXXXXXXXXX" "D:\test.xls" "D:\out.pdf"
doc2any.exe "-$" "XXXXXXXXXXXXXXXXX" "D:\test.xlsx" "D:\out.pdf"
doc2any.exe "-$" "XXXXXXXXXXXXXXXXX" "D:\test.ppt" "D:\out.pdf"
doc2any.exe "-$" "XXXXXXXXXXXXXXXXX" "D:\test.pptx" "D:\out.pdf"

After you register the doc2any.exe application, the trial version of doc2any.exe will be changed to registered version automatically, then you can use it without any restrictions.

Please refer to following web pages for more information about how to call doc2any.exe from web service,

http://www.verypdf.com/wordpress/category/doc-to-any-converter

http://www.verydoc.com/blog/how-to-call-doc2any-exe-from-php-source-code.html

http://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

http://www.verydoc.com/blog/category/doc-to-any-converter

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)
Posted in DOC to Any Converter | Tagged , , , , , , , , , | Leave a comment

How to insert a page break in HTML so htmltools.exe parses it?

So basically I'm using htmltools.exe to convert a dynamic HTML report to PDF with "-webkit" option.

The report has a particular format and I've been asked to clone that format with HTML.

The problem I'm facing is that I can't simulate a 100% functional page break in html so htmltools.exe can interpret it and send content to another page.

I'm trying to avoid page size measurement methods and so.

TIA for any help provided.

So far I'm emulating page break using <br> and it works. I still have to do some testing though.

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

HTML Converter Command Line (htmltools.exe),
http://www.verypdf.com/app/html-converter/try-and-buy.html#cmd

image
Specify a CSS rule specific to the print media type. There are a number of properties that can be used for paging. I find it easiest to attach the page-break-before property to a class, as shown below.

In the HTML:

<p>Page 1, paragraph 1</p>
<p class="new-page">Page 2, paragraph 1</p>
<p>Page 2, paragraph 2</p>

In the CSS:

@media print {
  .new-page {
    page-break-before: always;
  }
}

Or, you can also add following code into your HTML code where you want to break the page,

<div style = "display:block; clear:both; page-break-after:always;"></div>

VeryPDF
------------------------------
Hi,
 
I have a problem with printing the content in new pages. I am adding <div style="page-break-before:always"></div> to my html file to the positions where I want to start to a new page, but it looks like it is only adding some empty space after that. I am sending 2 example files, 1 with page breaks and 1 with no page breaks.
 
I am using this command by the way, if it has anything to do.

htmltools.exe -webkit "-$" "XXXXXXXXXXXXXXX" -javascript-delay 5000 -run-script-file "chart_legend_fix.txt" D:\PDF_Output.html _test_webkit.pdf
 
Thanks in advance.
Customer
---------------------------------------
We suggest you may add following line to your HTML code where you want to break the pages,

<div style = "display:block; clear:both; page-break-after:always;"></div>

If you still can't get it work, please send to us your sample HTML file, we will test it and come back to you asap.

VeryPDF
---------------------------------------
Hi,
 
I added the line you mentioned, but it looks like it is sometimes working and sometimes not working on my example. I am sending the sample html and the output pdf in the attachments.
 
Thanks in advance.
Customer
---------------------------------------
We added following style into the HTML file, the resultant PDF file looked better,

<style type="text/css">
thead {
    display: table-row-group;
}
tr {
    page-break-before: always;
    page-break-after: always;
    page-break-inside: avoid;
}
table {
    word-wrap: break-word;
}
table td {
    word-break: break-all;
}
</style>

You may test the new HTML file to try again.

Because the new CSS code will break the pages automatically, so it's not necessary to force break the pages again, however, if you wish break the pages on the special positions, you may use '<div style = "display:block; clear:both; page-break-after:always;"></div>' code continue, that's no problem.

VeryPDF
---------------------------------------
Hello,

Continue to previous message, '<div style = "display:block; clear:both; page-break-after:always;"></div>' may not work properly if your HTML page contains heavy and complicated tables, this problem is caused by webkit engine, because webkit engine doesn't support '<div style = "display:block; clear:both; page-break-after:always;"></div>' pagination tag very well.

In this cause, we have another solution to you, you may download "HTMLPrint to Any Converter Command Line" from this web page to try,

https://www.verydoc.com/htmlprint-to-any.html

after you download and unzip it to a folder, you may run following command line to convert your HTML file to PDF file properly with pagination,

html2any.exe -marginleft 20 -margintop 20 -marginright 20 -marginbottom 20 -printtopdf "D:\PDF_Output.pdf" "D:\PDF_Output.html"

html2any.exe does use Internet Explorer's engine to render web page with pagination, it works better than webkit engine for pagination in printing function.

Thank you.

Regards.
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)
Posted in HTML Converter (htmltools) | Tagged , , , , , | Leave a comment
Page 1 of 1,45612345...102030...Last »