Closed markismail7 closed 5 months ago
Hi @markismail7 we are unable to answer API specific questions here. Please route this request through your regular support channels if you still need help.
The team behind Acrobat Services doesn't monitor posts here, please post here https://community.adobe.com/t5/acrobat-services-api/ct-p/ct-Document-Cloud-SDK
Note that this is for unofficial support. If you have an enterprise contract with us, you can get direct technical support.
Hi, I'm facing a significant problem with the Adobe Embed PDF API on mobile devices. Despite setting the default view mode to "FIT_WIDTH" in the preview configuration, the PDF width appears too small on phone screens. This issue is not encountered on desktops.
Google and Edge browsers adjust the PDF width perfectly on mobile devices when using their built-in PDF viewer.
Could you please provide guidance on resolving this issue? here is my code: const previewConfig = { defaultViewMode: "FIT_WIDTH", showDownloadPDF: false, showZoomControl: true, showAnnotationTools: false
}
var adobeDCView = new AdobeDC.View({ clientId: "your_id", divId: "adobe-dc-view" }); adobeDCView.previewFile({ content: { location: { url: pdfUrl } }, metaData: { fileName: pdfUrl } }, previewConfig);
// Use PDF.js to read the name from the PDF var loadingTask = pdfjsLib.getDocument(pdfUrl); loadingTask.promise.then(function (pdf) { pdf.getPage(1).then(function (page) { // Assuming the name is on the first page page.getTextContent().then(function (textContent) { // Process textContent to find the name // This is a simplified example and may need more logic to find the correct text
}, function (reason) { console.error(reason); });