Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different page sizes for each output page #27

Closed
jpt13653903 opened this issue Jan 13, 2024 · 6 comments
Closed

Different page sizes for each output page #27

jpt13653903 opened this issue Jan 13, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@jpt13653903
Copy link
Owner

Paraphrased from an email sent by @JonThe640:

It would be nice if we can choose the pagesize -page_size=extents|A3|A4|letter] for each pdf page separately.

I request this because in the first page, we want to add a signature box automatically by means of a script, but the page should have a standard size (letter or A4). For other pages, the extend option is best because we have larger images.

@jpt13653903 jpt13653903 added the enhancement New feature or request label Jan 13, 2024
@jpt13653903 jpt13653903 self-assigned this Jan 13, 2024
@jpt13653903
Copy link
Owner Author

jpt13653903 commented Jan 13, 2024

I think I'm going to break lots of people's scripts if I change the behaviour of the page_size option...

Would you mind if I keep the page_size option, and add a next_page_size option that does the following:

  • The next page will be forced to one of the standard sizes before "final" processing
  • "Final" processing does what it does at the moment, i.e. override the page size if page_size was specified.

In other words: if you want the behaviour you want, don't mix the next_page_size and page_size options in the same script. Also, you can't use page_size=extents with next_page_size=A4, because the next_page_size will be overwritten with extents.

@jpt13653903
Copy link
Owner Author

I've changed my mind... I think I've found a way to make the next_ variants override the global options.

@jpt13653903
Copy link
Owner Author

jpt13653903 commented Jan 13, 2024

In version 1.10 you can now set up a script similar to:

"Gerber2pdf.exe"                                                     ^
  -nowarnings                                                        ^
  -silentexit                                                        ^
  -page_size=extents                                                 ^
  -output=Output                                                     ^
  -next_page_size=A4                                                 ^
  -combine                                                           ^
    -colour=0,128,0         top_copper.grb                           ^
    -colour=135,157,175,200 top_solder_mask.grb                      ^
    -colour=191,191,0,200   top_silk.grb                             ^
    -colour=255,255,255     drill_file.drl.grb                       ^
    -colour=0,0,0           board_outline.grb                        ^
  -combine -mirror                                                   ^
    -colour=0,128,0         bottom_copper.grb                        ^
    -colour=135,157,175,200 bottom_solder_mask.grb                   ^
    -colour=191,191,0,200   bottom_silk.grb                          ^
    -colour=255,255,255     drill_file.drl.grb                       ^
    -colour=0,0,0           board_outline.grb                        ^
  -combine -nomirror                                                 ^
    -colour=0,128,0         top_copper.grb                           ^
    -colour=135,157,175,200 top_solder_mask.grb                      ^
    -colour=191,191,0,200   top_silk.grb                             ^
    -colour=255,255,255     drill_file.drl.grb                       ^
    -colour=0,0,0           board_outline.grb                        ^
  -mirror                                                            ^
    -colour=0,128,0         bottom_copper.grb                        ^
    -colour=135,157,175,200 bottom_solder_mask.grb                   ^
    -colour=191,191,0,200   bottom_silk.grb                          ^
    -colour=255,255,255     drill_file.drl.grb                       ^
    -colour=0,0,0           board_outline.grb                        ^
  -nomirror -nocombine                                               ^
    top_silk.grb                                                     ^
    bottom_silk.grb                                                  ^
    top_copper.grb                                                   ^
    bottom_copper.grb                                                ^
    top_solder_mask.grb                                              ^
    bottom_solder_mask.grb                                           ^
    drill_file.drl.grb                                               ^
    board_outline.grb

Only the first page will be A4 size. All the others will follow the "global" extents option.

@JonThe640
Copy link

The new version 1.10 work perfectly!!!! Thank you so much John, you are the king!!

@jpt13653903
Copy link
Owner Author

Pleasure. Sorry these updates took so long -- my day-job was CRAZY last year. Hopefully this year will be less chaotic...

@JonThe640
Copy link

no problem, last week, I was on vacation in Mexico.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants