Skip to main content
Participant
June 27, 2024
Question

Adobe PDF Embed starts out too zoomed in

  • June 27, 2024
  • 1 reply
  • 262 views

I am trying to embed a whitepaper into a blog on hubspot.

It worked quite well once I had changed its size to match the page, but today I had noticed that it started out far too zoomed in. Is there anything I can do to make sure that it is only zoomed in enough to fit the container?

This topic has been closed for replies.

1 reply

Participant
June 28, 2024

Until they fix it, I suggest this solution.

adobeDCView
  .previewFile(
    {
      content: {
        location: {
          url: this.file.url,
        },
      },
      metaData: { fileName: this.file.filename },
    },
    {
      embedMode: window.AdobeDC.View.Enum.EmbedMode.SIZED_CONTAINER,
    },
  )
  // Remove after fix
  .then((viewer) => { 
    viewer.getAPIs().then((apis) => {
      apis.getZoomAPIs().setZoomLevel(0.1);
    }); 
  })
  .catch((e) => {
    console.error(e);
  });