@@ -1109,14 +1109,33 @@ Supported usecases:
1109
1109
usageLongResize = `Resize existing pages.
1110
1110
1111
1111
pages ... please refer to "pdfcpu selectedpages"
1112
- description ... scalefactor, dimensions, enforce:f/t, formsize(=papersize) , bgcolor
1112
+ description ... scalefactor, dimensions, formsize, enforce, border , bgcolor
1113
1113
inFile ... input pdf file
1114
1114
outFile ... output pdf file
1115
1115
1116
- Use scalefactor < 1 to shrink pages
1117
- Use scalefactor > 1 to enlarge pages
1118
-
1119
- Examples:
1116
+ <description> is a comma separated configuration string containing:
1117
+
1118
+ scalefactor: Resize page by scale factor.
1119
+ Use scale < 1 to shrink pages.
1120
+ Use scale > 1 to enlarge pages.
1121
+
1122
+ formsize: Resize page to form/paper size eg. A4, Letter, Legal...
1123
+ Append 'L' to enforce landscape mode. (eg. A3L)
1124
+ Append 'P' to enforce portrait mode. (eg. A4P, TabloidP)
1125
+ Please refer to "pdfcpu paper" for a comprehensive list of defined paper sizes.
1126
+ "papersize" is also accepted.
1127
+
1128
+ dimensions: Resize page to custom dimensions.
1129
+ (width height) in given display unit eg. "400 200"
1130
+
1131
+ enforce: if dimensions set only, enforce orientation (on/off, true/false, t/f).
1132
+
1133
+ border: if dimensions set only, draw content region border (on/off, true/false, t/f).
1134
+
1135
+ bgcolor: if dimensions set only, background color value for unused page regions.
1136
+
1137
+
1138
+ Examples:
1120
1139
1121
1140
pdfcpu resize "scale:2" in.pdf out.pdf
1122
1141
Enlarge pages by doubling the page dimensions, keep orientation.
@@ -1143,14 +1162,34 @@ description ... scalefactor, dimensions, enforce:f/t, formsize(=papersize), bgco
1143
1162
usageLongPoster = `Create a poster using paper size.
1144
1163
1145
1164
pages ... Please refer to "pdfcpu selectedpages"
1146
- description ... formsize(=papersize), dimensions, scalefactor, border, margin, bgcolor
1165
+ description ... formsize(=papersize), dimensions, scalefactor, margin, bgcolor, border
1147
1166
inFile ... input pdf file
1148
1167
outDir ... output directory
1149
1168
outFileName ... output file name
1150
1169
1151
- Optionally scale your page dimensions then define the poster grid tile size via form size or dimensions.
1170
+ Optionally scale up your page dimensions then define the poster grid tile size via form size or dimensions.
1171
+
1172
+ <description> is a comma separated configuration string containing:
1173
+
1174
+ scalefactor: Enlarge page by scale factor > 1.
1175
+
1176
+ formsize: Posterize using tiles with form/paper size eg. A4, Letter, Legal...
1177
+ Append 'L' to enforce landscape mode. (eg. A3L)
1178
+ Append 'P' to enforce portrait mode. (eg. A4P, TabloidP)
1179
+ Please refer to "pdfcpu paper" for a comprehensive list of defined paper sizes.
1180
+ "papersize" is also accepted.
1181
+
1182
+ dimensions: Posterize using tiles with custom dimensions.
1183
+ (width height) in given display unit eg. "400 200"
1184
+
1185
+ margin: Apply margin / glue area (float >= 0 in given display unit)
1186
+
1187
+ bgcolor: color value for visualization of margin / glue area.
1188
+
1189
+ border: if margin set, draw content region border (on/off, true/false, t/f)
1190
+
1152
1191
1153
- Examples:
1192
+ Examples:
1154
1193
1155
1194
pdfcpu poster "f:A4" in.pdf outDir
1156
1195
Page format is A2, the printer supports A4.
@@ -1160,21 +1199,30 @@ description ... scalefactor, dimensions, enforce:f/t, formsize(=papersize), bgco
1160
1199
Page format is A2, the printer supports A4.
1161
1200
Generate a poster(A0) via a corresponding 4x4 grid of A4 pages.
1162
1201
1163
- pdfcpu poster -u cm -- "dim:15 10" in.pdf outDir
1164
- Generate a poster via a corresponding grid with cell size 15x10 cm.
1202
+ pdfcpu poster -u cm -- "dim:15 10, margin:1, bgcol:DarkGray, border:on " in.pdf outDir
1203
+ Generate a poster via a corresponding grid with cell size 15x10 cm and provide a glue area of 1 cm .
1165
1204
1166
1205
See also the related commands: ndown, cut`
1167
1206
1168
1207
usageNDown = "usage: pdfcpu ndown [-p(ages) selectedPages] -- [description] n inFile outDir [outFileName]" + generalFlags
1169
1208
usageLongNDown = `Cut selected page into n pages symmetrically.
1170
1209
1171
1210
pages ... Please refer to "pdfcpu selectedpages"
1172
- description ... border, margin, bgcolor
1211
+ description ... margin, bgcolor, border
1173
1212
n ... the n-Down value (see below for details)
1174
1213
inFile ... input pdf file
1175
1214
outDir ... output directory
1176
1215
outFileName ... output file name
1177
1216
1217
+ <description> is a comma separated configuration string containing:
1218
+
1219
+ margin: Apply margin / glue area (float >= 0 in given display unit)
1220
+
1221
+ bgcolor: color value for visualization of margin / glue area.
1222
+
1223
+ border: if margin set, draw content region border (on/off, true/false, t/f)
1224
+
1225
+
1178
1226
grid Eg.
1179
1227
Supported values for n: 2 ... 1x2 A1 -> 2 x A2
1180
1228
3 ... 1x3
@@ -1184,7 +1232,8 @@ description ... scalefactor, dimensions, enforce:f/t, formsize(=papersize), bgco
1184
1232
12 ... 3x4
1185
1233
16 ... 4x4 A1 -> 16 x A5
1186
1234
1187
- Examples:
1235
+
1236
+ Examples:
1188
1237
1189
1238
pdfcpu ndown 2 in.pdf outDir
1190
1239
Page format is A2, the printer supports A3.
@@ -1193,22 +1242,41 @@ description ... scalefactor, dimensions, enforce:f/t, formsize(=papersize), bgco
1193
1242
pdfcpu ndown 4 in.pdf outDir
1194
1243
Page format is A2, the printer supports A4.
1195
1244
Quick cut page into 4 equally (A4) sized pages.
1245
+
1246
+ pdfcpu ndown -u cm -- "margin:1, bgcol:DarkGray, border:on" 4 in.pdf outDir
1247
+ Page format is A2, the printer supports A4.
1248
+ Quick cut page into 4 equally (A4) sized pages and provide a glue area of 1 cm.
1196
1249
1197
1250
See also the related commands: poster, cut`
1198
1251
1199
1252
usageCut = "usage: pdfcpu cut [-p(ages) selectedPages] -- description inFile outDir [outFileName]" + generalFlags
1200
1253
usageLongCut = `Custom cut pages horizontally or vertically.
1201
1254
1202
1255
pages ... Please refer to "pdfcpu selectedpages"
1203
- description ... horizontal, vertical, origin , bgcolor, border, margin
1256
+ description ... horizontal, vertical, margin , bgcolor, border
1204
1257
inFile ... input pdf file
1205
1258
outDir ... output directory
1206
1259
outFileName ... output file name
1207
1260
1208
1261
Fine grained custom page cutting.
1209
1262
Apply any number of horizontal or vertical page cuts.
1210
1263
1211
- Examples:
1264
+ <description> is a comma separated configuration string containing:
1265
+
1266
+ horizontal: Apply horizontal page cuts at height fraction (origin top left corner)
1267
+ A sequence of fractions separated by white space.
1268
+
1269
+ vertical: Apply vertical page cuts at width fraction (origin top left corner)
1270
+ A sequence of fractions separated by white space.
1271
+
1272
+ margin: Apply margin / glue area (float >= 0 in given display unit)
1273
+
1274
+ bgcolor: color value for visualization of margin / glue area.
1275
+
1276
+ border: if margin set, draw content region border (on/off, true/false, t/f)
1277
+
1278
+
1279
+ Examples:
1212
1280
1213
1281
pdfcpu cut -- "hor:.25" inFile outDir
1214
1282
Apply a horizontal page cut at 0.25*height
@@ -1217,7 +1285,6 @@ description ... scalefactor, dimensions, enforce:f/t, formsize(=papersize), bgco
1217
1285
pdfcpu cut -- "hor:.25, vert:.75" inFile outDir
1218
1286
Apply a horizontal page cut at 0.25*height
1219
1287
Apply a vertical page cut at 0.75*width
1220
- Results in 4 PDF pages.
1221
1288
1222
1289
pdfcpu cut -- "hor:.33 .66" inFile outDir
1223
1290
Has the same effect as: pdfcpu ndown 3 in.pdf outDir
0 commit comments