How to set print-media-type and custom fonts with cloud Html to PDF Converter Service? Cloud-Based HTML to PDF Conversion Platform for iPad. Dropbox Integration, Batch, Automated Workflows. Create PDF Files using VeryPDF Cloud REST API

Questions for VeryPDF Cloud API Platform,

https://www.verypdf.com/online/cloud-api/index.html

image

HI!

I use your api for converting html to pdf, I need to use print media css inside my html page,

@media print {
         tfoot {visibility: hidden}
}
 
(I want to use &--footer-html=https://www.verypdf.com&--margin-bottom=30 parameter in request to stick footer at bottom of page)
 
Can you explain how to add --print-media-type parameter in url? I try to use,

--print-media-type=true
--print-media-type=1

but can’t get it work.
 
With best regards.
Customer
-------------------------------------------------------
You can run following command line to convert your HTML file to PDF file and set footer,
 
http://impdf.com?url=google.com&--footer-html=https://www.verypdf.com&--margin-bottom=30&--print-media-type

VeryPDF
-------------------------------------------------------
Thank you for your answer.
Now it works.
 
Well another one question. How to avoid page brake inside article tag?
(or is any way to avoid page brake inside block ?)
 
Look I use css for printing:

.cellsBlock {
margin-left: 50px;
        margin-right: 20px;
        display: block;
        width:90%;
        clear:both;
        overflow:hidden;
        font-size: 14px;
        vertical-align:top;
        color: #646163;
        page-break-inside:avoid !important;
        page-break-after:auto;
}
.cellHeader{
        width: 100%;
        padding: 20px 0 5px 10px;
        text-align:left;
        vertical-align:top;
        border-bottom:2px solid #BD0000;
}
.cellPicture{
        width: 100%;
         padding: 20px 0 15px;
         text-align:center;
}
 
<article class='cellsBlock’> 
            <div class='cellHeader'><font color=#BD0000>&#9776;</font> KARTE</div> 
            <p class='cellPicture’ >
                        <img src='http://maps.googleapis.com/maps/api/staticmap?center=50.127273030143,8.61057646278&zoom=15&markers=size:mid%7Ccolor:blue%7Clabel:S%7C50.127273030143,8.61057646278&size=420x300&sensor=true' style='border: 1px solid #A4A4A4; '>
            </p>
</article>
 
but when I try to convert this in pdf, I got page brake between header and map.

Customer
-------------------------------------------------------
In order to handle page breaking in large images, you can put these images into a div, such as,

HTML:

<div class="Image"><img src=http://localhost/testimage.jpg></div>

CSS:

img {
page-break-inside: avoid;
}
.Image{
page-break-inside: avoid;
}

VeryPDF
-------------------------------------------------------
Is any way to use custom fonts with impdf service?

I try to use next css:

@font-face {
     font-family: 'TheSans';
     font-style: bold;
     font-weight: 600;
     src: local('TheSans Semibold'), local('TheSans-Semibold'), url(http://www.soell-vertrieb.de/lsc/TheSerif-6-SemiBold.otf) format("opentype");
}

but looks like it doesn’t take any effect.

Also I try with TrueType, same result.

Customer
-------------------------------------------------------
Thanks for your message, you can try with our partner VeryPDF's VeryPDF Cloud API Platform, their VeryPDF Cloud API Platform has this function,

https://www.verypdf.com/online/cloud-api/index.html

here are some useful articles,

https://www.verypdf.com/wordpress/201407/how-to-specify-font-using-html-to-pdf-converter-cloud-api-40729.html
https://www.verypdf.com/wordpress/201406/how-to-specify-font-for-html-to-pdf-conversion-using-cloud-api-40702.html

VeryPDF

image

VeryPDF Cloud API Platform Introduction

VeryPDF Cloud API is a REST API for creating and editing PDF files. It can also be used to convert PDF files to different formats like DOC, HTML, XPS, TIFF and many more. VeryPDF Cloud API gives you control: create PDFs from scratch or from HTML, XML, template, database, XPS or an image. Render PDFs to image formats such as JPEG, PNG, GIF, BMP, TIFF and many others.

VeryPDF Cloud API helps you manipulate elements of a PDF file like text, annotations, watermarks, signatures, bookmarks, stamps and so on. Its REST API also allows you to manage PDF pages by using features like merging, splitting, and inserting. Add images to a PDF file or convert PDF pages to images.

VeryPDF Cloud API Supported Platforms

VeryPDF Cloud API’s platform independent document manipulation API is a true REST API that can be used with any language: .NET, Java, PHP, Ruby, Rails, Python, jQuery and many more. You can use it with any language or platform that supports REST. (Almost all platforms and languages support REST and provide native REST clients to work with REST APIs). You do not need to worry about language or platform limitations. You can use it with any platform — web, desktop, mobile, and cloud. The API integrates with other cloud services to give you the flexibility you need when processing documents. It is suitable for any type of business, document, or content.

VeryPDF Cloud API Supported File Formats

VeryPDF Cloud API transforms HTML, SVG, PCL, XPS, JPEG, TIFF, XML file formats to PDF. It can also convert PDF to TIFF, PDF-A1a, PDF-A1b, XPS, DOC, TEX and HTML.

image

Create PDF Files using VeryPDF Cloud API REST API

VeryPDF Cloud API allows you to create new PDF files from scratch. You can create a new PDF file in PDF, PDF/A, PDF/A-1a, or PDF/A-1b formats from scratch. You can also create a new PDF file from an existing HTML or XML file. VeryPDF Cloud API also allows you to generate a new PDF from a text file. It is also feasible by using this component that you can generate PDF files using a template. You can fill in data into this template from a database or from some other resource and create output PDF files.

Convert Different Formats to PDF

  • HTML to PDF, Invoice to PDF
  • XML to PDF
  • TIFF to PDF
  • JPEG to PDF
  • SVG to PDF
  • PCL to PDF
  • XPS to PDF

Articles for VeryPDF Cloud API Platform,

https://www.verypdf.com/wordpress/category/verypdf-cloud-api

VN:F [1.9.20_1166]
Rating: 5.5/10 (2 votes cast)
VN:F [1.9.20_1166]
Rating: -1 (from 1 vote)
How to set print-media-type and custom fonts with cloud Html to PDF Converter Service? Cloud-Based HTML to PDF Conversion Platform for iPad. Dropbox Integration, Batch, Automated Workflows. Create PDF Files using VeryPDF Cloud REST API, 5.5 out of 10 based on 2 ratings

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!