naturalcrit / homebrewery

Create authentic looking D&D homebrews using only markdown
https://homebrewery.naturalcrit.com
MIT License
1.08k stars 326 forks source link

[FEATURE]: Brew to PDF #3190

Open 5e-Cleric opened 10 months ago

5e-Cleric commented 10 months ago

Feature description

Because browser print to PDF has a number of problems and incompatibilities with our documents, there has been talk about making our own system to export brews as PDFs

Open Issues this feature could potentially resolve:

2716

2312

2278

1311

751

407

Minimum Viable Product

As a minimum, this feature should include the following list of capabilities:

If you have any idea related to this, or that we should add to the MVP, comment in this issue.

lucastucious commented 9 months ago

I like to choose color/black and white when I print to pdf !

lucastucious commented 8 months ago

Another thing is struggle to have is the dpi resolution. I don't know why, but some pdf printer downscale everything to 76dpi. I use homebrewery to print things for print, so a nice 300dpi is mandatory.

5e-Cleric commented 8 months ago

AFAIK dpi will depend on the printer, but we will try to achieve a dpi setting if we can.

dbolack-ab commented 7 months ago

I think we need to add the following to the feature list.

calculuschild commented 7 months ago

Note that "Embed HTML hyperlinks" and "Color/B&W option" are already built-in to the basic Chrome print.

https://github.com/naturalcrit/homebrewery/assets/5878534/49f83200-46e2-473b-8678-919d6ddc13c6

image

Gazook89 commented 7 months ago

I think we need to add the following to the feature list.

Print on Demand ready - Typically this means PDF output in PDF/X-1a:2001 or PDF/X-3:2002.

This is the requirement for DriveThruRPG and is essentially a passthrough for Lightning Source specs.

Here is the list of DTRPG requirements for Print on Demand..

(I may come back to this comment to add print requirements of other PoD services, but can't right now)

5e-Cleric commented 7 months ago

Related, this are the normal options to convert a word to pdf, using adobe acrobat:

image

We could consider saving code comments as pdf comments?

ericscheid commented 7 months ago

I use code comments <!-- comment -→ for temporarily (?) disabling content. (and more sensible reasons).

Having those comments appear in the PDF would be confusing. If done, this needs to be optional.

5e-Cleric commented 7 months ago

Perhaps this snippet could help?

{{PDFComment
Lorem ipsum dolor sit amet.
}}
lucastucious commented 4 months ago

One thing that could be great : An option to have a "printer friendly" checkbox, and maybe a dedicated css class/file for enabling/desabling graphics. Quite the same as the "Background Graphics" checkbox, but extendable for .page img, maybe with a whitelist of css classes

calculuschild commented 4 months ago

@lucastucious

There is already a printer friendly button in the Style Tab that injects the appropriate CSS into your brew.

lucastucious commented 4 months ago

Yeah but this edit the document. I was speaking more of a choice in the print dialog : full pdf OR ink friendly

5e-Cleric commented 4 months ago

We might want to have those as separate features, imagine these possibilities:

lucastucious commented 4 months ago

That's why I imagine the print friendly as a checkbox

dbolack-ab commented 4 months ago

That's why I imagine the print friendly as a checkbox

Without being able to generate the PDF via our code, rather than a third party service or package, there is no practical way to do this and to date that has proven to be nearly impossible if you want a useful PDF.

lucastucious commented 4 months ago

Isn't what we're talking here, making our own way to generate pdf ?

dbolack-ab commented 3 months ago

At present, that isn't possible

calculuschild commented 3 months ago

Yes, "Print-friendly" could easily be a checkbox that injects the appropriate CSS behind the scenes without actually editing the document contents. The checkbox wouldn't go in the browser print dialog, but it could be a dropdown option under the "Get PDF" button or something. If that option is checked, we apply "Print Friendly" CSS before triggering the print dialog, then remove it when the dialog closes.

lucastucious commented 3 months ago

Yes. That's exactly what I was thinking. I know that I could just duplicate my brew and add the print css myself but since we discuss about a printing system, it's worth to talk about a automatic way