1

Okay everyone, sorry about my original not being up to standard. A better version follows.

First, here is a MWE:

\documentclass{article}

\usepackage{pdfpages}
%\usepackage{screenread}

\begin{document}

Some text

\includepdf{image}

\end{document}

File image.pdf can be found here:

http://www.mathematrucker.com/image.pdf

(Any small-sized pdf ought to work.)

File screenread.sty can be found here:

https://github.com/bishboria/screen-read-class

So here's my problem: when \usepackage{screenread} is activated, image.pdf disappears from the second page. My goal is to use screenread to shorten the height of the first page without losing image.pdf on the second page.

Note: if all I needed to do was merge the second page with the first, there would be no issue. I think it's okay that my MWE didn't include any links though.

Will leave my initial post below in case it contains any useful information. It will mean a lot to me if anyone can help me solve this problem! Thanks everyone.

=======================

Part I of my LaTeX document links to Part II using pdfpages and hyperref—the former merges individual pdf pages together to create Part II.

Part I has a whitespace issue due to lots of images. The screenread package solves this problem beautifully.

Unfortunately, screenread breaks pdfpages. When I try to use both at the same time, Part I still gets created beautifully by screenread, but Part II consists of a bunch of empty pages. They have the same width as the Part I pages, but since they don't have any content and screenread is still in play, they're only about an inch high.

Ideally there would be some way to "turn screenread off" when it comes time to typeset Part II.

Assuming not, can anyone suggest a workaround? My main problem is getting the hyperlinks into Part I. Their number is large (>1000), so I'm really dependent on pdfpages! Note that I am using pdfLaTeX.

The specific command that's broken is

\newcommand{\pdf}[4]{\includepdf[pages={#1},link,noautoscale,offset=#3in #4in]{#2}}
  • Providing a MWE would help "see" the issue rather than just describing the issue. – Leucippus May 17 '17 at 16:12
  • I can't find the screenread package... – Paul Gaborit May 17 '17 at 16:41
  • Welcome back to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. I also can't find the screenread package. Where did you get it from? – jjdb May 17 '17 at 16:43
  • @Leucippus, AFAICT it's "\includepdf" that isn't working like normal. I just now added the specific definition to my question. (Hopefully that suffices as an "MWE" whatever that means. "Minimal working example?") – mathematrucker May 17 '17 at 16:43
  • Admittedly Googling "screenread" (quotes included) isn't quite as quick and easy as clicking a link provided by me, but it's almost as easy. It's not really a "package" per se, but it's a .sty file. – mathematrucker May 17 '17 at 16:46
2

screenread contains no code to deactivate its settings (but it would be rather easy to extend the package). But you can with the help of geometry restore the "normal" page layout:

\documentclass{article}

\usepackage{pdfpages}
\usepackage{geometry}
\savegeometry{normal}


\usepackage{screenread}

\begin{document}

Some text

\newpage
\loadgeometry{normal}
\EveryShipout{\pdfpageheight=\paperheight
              \pdfpagewidth=\paperwidth}
\includepdf{example-image-letter}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.