阪急バス
3番のりば
運行日(平日・土休日等)とダイヤ改正状況をお確かめの上でご利用ください。
#pdfjs_view { width: 100%; } #pdfjs_view canvas{ width: 100%; display: block; } var url = “https://www.suitaweb.net/bus_resources/cache/hankyubus-081903-.pdf”; var pdfjsLib = window[‘pdfjs-dist/build/pdf’]; // pdf.worker.js のURL pdfjsLib.GlobalWorkerOptions.workerSrc = “/resources/pdfjs/pdf.worker.js”; var loadingTask = pdfjsLib.getDocument({ url: url, cMapUrl: “/resources/pdfjs/cmaps/”, cMapPacked: true, }); var pdfjs_target = document.getElementById(‘pdfjs_view’); var page_w = document.getElementById(‘pdfjs_view’).width; var scale = 1; loadingTask.promise.then( function (pdf) { for( var i=1; i<=pdf._pdfInfo.numPages; i++ ){ pdf.getPage(i).then(function (page) { //横幅を2000pxに調整 page_w = page._pageInfo.view[2]; scale = 2000 / page_w; var viewport = page.getViewport({ scale: scale }); var canvas = document.createElement("canvas"); var context = canvas.getContext("2d"); canvas.width = viewport.width; canvas.height = viewport.height; var renderContext = { canvasContext: context, viewport: viewport, }; pdfjs_target.appendChild(canvas); page.render(renderContext); }); } } );2024/08/03 時点