- Corretta query di estrapolazione libri su GM (Marco)
- aggiornato bestseller su fatlast1Y - non mostrare piu i libri che non hanno l'immagine (sul catalogo). - metti online i compressi
This commit is contained in:
@@ -635,6 +635,8 @@ async function JoinPDFCatalogs(cataloghi, options, outputFile, stampa) {
|
||||
|
||||
const pdfDoc = await PDFDocument.create();
|
||||
|
||||
let numcat = 0;
|
||||
|
||||
for (let id_catalog of cataloghi) {
|
||||
let catalog = await Catalog.findOne({ _id: id_catalog });
|
||||
if (catalog) {
|
||||
@@ -642,6 +644,11 @@ async function JoinPDFCatalogs(cataloghi, options, outputFile, stampa) {
|
||||
if (filename) {
|
||||
let myfile = tools.fixFilePath(options.mydir + '/' + filename);
|
||||
if (await tools.isFileExistsAsync(myfile)) {
|
||||
const filenameOnly = path.parse(myfile).base;
|
||||
|
||||
numcat++;
|
||||
console.log(' Aggiungo il catalogo [' + numcat + '] ' + filenameOnly + ' ...');
|
||||
|
||||
const pdfBytes = await fs.promises.readFile(myfile);
|
||||
const pdf = await PDFDocument.load(pdfBytes);
|
||||
const pages = pdf.getPages();
|
||||
|
||||
Reference in New Issue
Block a user