Спасибо за то, что рассмотрели мой вопрос: < /p>
Используя этот настройка кода, я могу сгенерировать код Datmatrix для экрана, HTML2PDF () стреляет и открывает экземпляр Acrobat, но страница. это пусто. Вес < /p>
DM Code Output Test
document.body.appendChild(barcode))
// Choose the element id which you want to export.
var element = document.getElementById('div_barcode');
element.style.width = '100px';
element.style.height = '100px';
var opt = {
margin: 0.5,
filename: 'mydmcode.pdf',
image: { type: 'png', quality: 1 },
html2canvas: { scale: 1 },
jsPDF: { unit: 'mm', format: [50,50], orientation: 'landscape', precision: '12' }
};
// choose the element and pass it to html2pdf() function and call the save() on it to save as pdf.
html2pdf().set(opt).from(element).save();
});
});
< /code>
Это 2d JavaScript 2D, который работает < /p>
var stemassno = document.getElementById("stemassno").textContent;
var barcode = document.getElementById("barcode");
JsBarcode(barcode, stemassno, {
height: 20,
width: 2
});
barcode.style.display = "inline";
// Choose the element id which you want to export.
var element = document.getElementById('div_barcode');
element.style.width = '100px';
element.style.height = '50px';
var opt = {
margin: 0.5,
filename: 'myfile.pdf',
image: { type: 'jpeg', quality: 1 },
html2canvas: { scale: 1 },
jsPDF: { unit: 'mm', format: [60,22], orientation: 'landscape', precision: '12' }
};
// choose the element and pass it to html2pdf() function and call the save() on it to save as pdf.
html2pdf().set(opt).from(element).save();
});
Подробнее здесь: https://stackoverflow.com/questions/794 ... blank-page
Печать DataMatrix дает пустую страницу ⇐ Javascript
Форум по Javascript
1739323603
Anonymous
Спасибо за то, что рассмотрели мой вопрос: < /p>
Используя этот настройка кода, я могу сгенерировать код Datmatrix для экрана, HTML2PDF () стреляет и открывает экземпляр Acrobat, но страница. это пусто. Вес < /p>
DM Code Output Test
document.body.appendChild(barcode))
// Choose the element id which you want to export.
var element = document.getElementById('div_barcode');
element.style.width = '100px';
element.style.height = '100px';
var opt = {
margin: 0.5,
filename: 'mydmcode.pdf',
image: { type: 'png', quality: 1 },
html2canvas: { scale: 1 },
jsPDF: { unit: 'mm', format: [50,50], orientation: 'landscape', precision: '12' }
};
// choose the element and pass it to html2pdf() function and call the save() on it to save as pdf.
html2pdf().set(opt).from(element).save();
});
});
< /code>
Это 2d JavaScript 2D, который работает < /p>
var stemassno = document.getElementById("stemassno").textContent;
var barcode = document.getElementById("barcode");
JsBarcode(barcode, stemassno, {
height: 20,
width: 2
});
barcode.style.display = "inline";
// Choose the element id which you want to export.
var element = document.getElementById('div_barcode');
element.style.width = '100px';
element.style.height = '50px';
var opt = {
margin: 0.5,
filename: 'myfile.pdf',
image: { type: 'jpeg', quality: 1 },
html2canvas: { scale: 1 },
jsPDF: { unit: 'mm', format: [60,22], orientation: 'landscape', precision: '12' }
};
// choose the element and pass it to html2pdf() function and call the save() on it to save as pdf.
html2pdf().set(opt).from(element).save();
});
Подробнее здесь: [url]https://stackoverflow.com/questions/79431682/printing-datamatrix-gives-a-blank-page[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия