Skip to content

How can I print only first page?  #202

@pcktuts

Description

@pcktuts

Here are my options. It is generating an empty second page which I do not want. How can i print only first page. here is my code

import pdfkit
    options = {
        #'page-size': 'Letter',
        'orientation': 'Landscape',
        'page-width': '14in',
        'page-height': '19in',
        'margin-top': '0.15in',
        'margin-right': '0.15in',
        'margin-bottom': '0.15in',
        'margin-left': '0.15in',
        'encoding': "UTF-8",
        # 'custom-header': [
        #     ('Accept-Encoding', 'gzip')
        # ],        
        # 'no-outline': None
    }


    file_path = '/static/out.pdf'
    pdfkit.from_url('127.0.0.1:5000/pdf', 'static/out.pdf',  options=options)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions