Giter VIP home page Giter VIP logo

Comments (11)

calculuschild avatar calculuschild commented on June 28, 2024 1

Looks like we have background-attachment: fixed which is causing the background to scroll out of view on the print page. I thought we had fixed this earlier but I guess not. Should be an easy change.

I believe the original reason we had that was that by attaching the background to the page coordinates rather than the statblock, every statblock on a page would be a "window" onto a different section of the background texture, instead of each having the same identical section of parchment. There is probably a better option to do this than "fixed".

@RKuerten In the mean time you can add this code to your Style tab:

.page .monster.frame {
  background-attachment: unset;
}

from homebrewery.

5e-Cleric avatar 5e-Cleric commented on June 28, 2024 1

so the bug can't happen in a one page document, good to know.

from homebrewery.

Gazook89 avatar Gazook89 commented on June 28, 2024

I just test with a new brew, featuring only a framed stat block, with Chrome on Mac (viewed in Preview), and had no issue. Hrm.

Are you using the default PDF printer, or something else (CutePDF etc)?

Is this true with a brand new brew, with no custom css? Or, can you provide the Share link to your brew that isn't working?

Chrome Version 120.0.6099.234 (Official Build) (arm64)

from homebrewery.

RKuerten avatar RKuerten commented on June 28, 2024

I can't share the brew publicly because it is a product yet to be released on the DMsGuild. I'm using the default printer (on Windows, btw).

I've tested with a brand new brew, and it works. It also works by copying a single page of the brew with a stat block with the custom css. The brew is not that big (30 pages), but there's basically an image in every page along side the stat blocks. Could be some memory issue.

Once I add the pages (cover page & toc + intro page) that should be before the first page with a stat block, the background disappears. If delete both pages, only the first stat block has the background, the others default to the background color.

from homebrewery.

RKuerten avatar RKuerten commented on June 28, 2024

I've circumvented the problem by adding the background texture as a before element in the .monster.frame blocks. The code for it looks like this (for .wide blocks, it is equal except for the width, which is 102.1%).

.page .monster.frame::before  {
  background-color     : #F7F0D4;
  background-image     : url(https://i.imgur.com/owy8gdY.jpg);
  background-blend-mode: normal;
  background-size      : 100% 100%;
  background-repeat    : no-repeat;
  background-position  : top center;
  content              : "";
  position             : absolute;
  width                : 104.1%;
  height               : 100%;
  top                  : 0;
  left                 : -7px;
  z-index              : -3;
}

I'm closing this issue.

from homebrewery.

5e-Cleric avatar 5e-Cleric commented on June 28, 2024

New brew just created:
image
print view:
image
PDF after download:
image

from homebrewery.

5e-Cleric avatar 5e-Cleric commented on June 28, 2024

Please save a new brew in which you find this issue, and share it with us.

Also, what is your OS, and your browser, and the version of both?

It might also be your own CSS, if nothing else is faulty, it will be the css.

from homebrewery.

RKuerten avatar RKuerten commented on June 28, 2024

Here's a brew with the same problem, no CSS changes from the base v3:

I had a 2-page lore doc for my campaign (avernus) written in Portuguese, added two pages with the same generated stat block in each: no background when generating the PDF.

However, I discovered that if I scroll down to the stat block in the print page, the background loads for that stat block (and that stat block only). Additional stat blocks only have the background color.

Here's the share link: https://homebrewery.naturalcrit.com/share/MbQOA3BqiTUz

Tested in both browsers below, on Windows 10:
Brave V 1.62.153 w/ Chromium 121.0.6167.85 64-bits
Chrome V 121.0.6167.86 64-bits

from homebrewery.

calculuschild avatar calculuschild commented on June 28, 2024

For #3297 , the fix should be to just remove the background-attachment property entirely, instead of setting it to unset.

(Unset is only needed to overwrite an existing property, which you would need to do if trying to fix this from your brew style tab.)

Just reopening this instead of making a new issue, so we have all the context.

from homebrewery.

RKuerten avatar RKuerten commented on June 28, 2024

Created a new pull request to fix that.

from homebrewery.

RKuerten avatar RKuerten commented on June 28, 2024

Fixed with the merge of #3330

from homebrewery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.