Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substitute full-size images in print PDF exports #894

Closed
greatislander opened this issue Aug 22, 2017 · 1 comment

Comments

@greatislander
Copy link
Collaborator

commented Aug 22, 2017

Prerequisites

Description

Print PDF requires high-resolution (~300dpi) images. However, if a user has inserted an image at a smaller size (e.g. "large", "medium" etc.) they will end up with a downsampled image in their book. Ideally the full-size image should be substituted, and sizing can be determined from the width & height attributes of the <img> tag.

Methods for accomplishing this:

Steps to Reproduce

  1. Insert an image, choosing "large" size or smaller.
  2. Export Print PDF.

Expected behavior: Image in export is 300dpi.

Actual behavior: Image in export is 72dpi or something.

System Information

Pressbooks: 4.2-dev
WordPress: 4.8.1
PHP: 7.1

@greatislander greatislander added this to the 4.2 milestone Aug 22, 2017

connerbw added a commit to pressbooks/pressbooks-docraptor that referenced this issue Aug 23, 2017
greatislander added a commit to pressbooks/pressbooks-docraptor that referenced this issue Aug 23, 2017

@greatislander greatislander assigned zwhnz and apurvaashok and unassigned connerbw Aug 23, 2017

@apurvaashok

This comment has been minimized.

Copy link

commented Aug 25, 2017

Works as expected! Print PDF confirms that images inserted at smaller sizes (medium, custom) are 300dpi or higher, and that pixel dimensions are the same as the original image (largest dimensions available).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.