# How to set default page transition when viewer loads

**URL:** <https://pdfjs.community/t/how-to-set-default-page-transition-when-viewer-loads/761>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [May 11, 2021, 7:47am UTC](https://pdfjs.community/t/how-to-set-default-page-transition-when-viewer-loads/761 "2021-05-11T07:47:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gokul](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/gokul/32/413_2.png) [@Gokul](https://pdfjs.community/u/Gokul)\
**Post date:** [May 11, 2021, 7:47am UTC](https://pdfjs.community/t/how-to-set-default-page-transition-when-viewer-loads/761/1 "2021-05-11T07:47:50Z")

</div>

**PDF.js Express Version** - 7.3.1

**Detailed description of issue**  
Looking to set the default page transition as “Page by page” instead of continuous. How to change it, unable to find relevant methods in API. Please help as early as possible.

**Expected behaviour**

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/c6fc9a9f10e0b2328e1f46d521bdfe481726b49b.png)

**Does your issue happen with every document, or just one?**  
Yes

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [May 11, 2021, 7:47am UTC](https://pdfjs.community/t/how-to-set-default-page-transition-when-viewer-loads/761/2 "2021-05-11T07:47:53Z")

</div>

**Hello, I’m Ron, an automated tech support bot 🤖**

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:
- [Remove annotations in viewer - Programmatically](https://pdfjs.express/documentation/annotation/remove-annotations#programmatically)
- [Creating custom annotations for your viewer](https://pdfjs.express/documentation/annotation/custom-annotations)
- [How to customize viewer - What option should I choose - Config file](https://pdfjs.express/documentation/ui-customization/customizing-setup#config-file)

APIs:
- [WebViewerInstance.Hotkeys](https://pdfjs.express/api/WebViewerInstance.Hotkeys.html#__anchor)
- [CoreControls.Document - insertPages(sourceDocument [, pageArray] [, insertBeforeThisPage])](https://pdfjs.express/api/CoreControls.Document.html#insertPages__anchor)
- [CoreControls.AnnotationManager - setAnnotationCanvasTransform(annotCanvasContext, zoom, rotation)](https://pdfjs.express/api/CoreControls.AnnotationManager.html#setAnnotationCanvasTransform__anchor)

Forums:
- [Is it possible to partial rendering of pdf file?](https://pdfjs.community/t/is-it-possible-to-partial-rendering-of-pdf-file/372/1)
- [Annotations loads before file loads even if we use ‘documentLoaded’ event](https://pdfjs.community/t/annotations-loads-before-file-loads-even-if-we-use-documentloaded-event/67/1)
- [How to load different pdf on pdfjs express viewer on passing url through button click](https://pdfjs.community/t/how-to-load-different-pdf-on-pdfjs-express-viewer-on-passing-url-through-button-click/320/2)

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [May 11, 2021, 4:03pm UTC](https://pdfjs.community/t/how-to-set-default-page-transition-when-viewer-loads/761/3 "2021-05-11T16:03:41Z")

</div>

Hey there!

You can use the [`setLayoutMode`](https://pdfjs.express/api/WebViewerInstance.html#setLayoutMode__anchor) API for this:

```javascript
instance.setLayoutMode(instance.LayoutMode.Single);

```

Thanks,  
Logan

---

<div class="post-metadata">

**Author:** ![Gokul](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/gokul/32/413_2.png) [@Gokul](https://pdfjs.community/u/Gokul)\
**Post date:** [May 19, 2021, 8:48am UTC](https://pdfjs.community/t/how-to-set-default-page-transition-when-viewer-loads/761/4 "2021-05-19T08:48:26Z")

</div>

Thanks for your response Logan. But your suggestion is to set the “Layout Mode”. I want to set the “Transistion”. Please help me. Thanks

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [May 19, 2021, 2:12pm UTC](https://pdfjs.community/t/how-to-set-default-page-transition-when-viewer-loads/761/5 "2021-05-19T14:12:14Z")

</div>

Hi,

It’s a poorly named API, but that does actually set the transition. Transitions and page layouts are very closely related.

Thanks!
