Skip to content

When using the command line export tool the page index, and page range arguments have unexpected behaviour #627

Open
@casperlamboo

Description

@casperlamboo

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug
I'm using the command line tool to export specific pages from my draw.io document. According to draw.io --help this can be achieved by using the page (-p) argument.

  -p, --page-index <pageIndex>       selects a specific page, if not specified
                                     and the format is an image, the first page
                                     is selected

However when I do this for lets say page 2, all pages from page 2 and up are exported (I only expected page 2 to be exported).

The range index -g argument seems to do nothing at all.

  -g, --page-range <from>..<to>      selects a page range (for PDF format only)

To Reproduce
Steps to reproduce the behavior:

  1. Download pages.drawio.zip
  2. In your command line navigate to the file and execute $ draw.io -x ./pages.drawio -f pdf -p 2 -o ./page_index.pdf. For good measure also execute $ draw.io -x ./pages.drawio -f pdf -g 2..2 -o ./page_range.pdf

Expected behavior
For files page_index.pdf and page_range.pdf only page 2 is exported. While in reality all pages are exported for page_range.pdf and pages 2 and up are exported for page_index.pdf.

Screenshots
Not applicable

draw.io version (In the Help->About menu of the draw.io editor):

$ draw.io -V
14.6.13

Desktop (please complete the following information):
Desktop, MacOS V10.15.7

Smartphone (please complete the following information):
Not applicable

Additional context
Not applicable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions