GithubHelp home page GithubHelp logo

PDF on Chromium about docfx HOT 12 CLOSED

yufeih avatar yufeih commented on May 25, 2024
PDF on Chromium

from docfx.

Comments (12)

yufeih avatar yufeih commented on May 25, 2024 1

Playwright isn't packaged today, it is only for testing. If packaged, it would increase the size of published zip releases of each platform from ~60MB to ~100MB, and increase the size of the docfx tool package to 300MB due to redistribution of NodeJS runtime for many platforms.

Dependency on NodeJS isn't a bad thing as we probably need it for #661 and to replace JINT. We can probably set NodeJS as a pre-requisite instead of redistributing it if size is a concern.

from docfx.

yufeih avatar yufeih commented on May 25, 2024 1

Dependency on NodeJS isn't a bad thing as we probably need it for #661 and to replace JINT.

Actually waiting for this for my solution. The release v2.72.1 does not include the usual binary. Is this intentional?

No, there are some problems with NuGet.org's signing key setup causing publish failures that I need to consult their support. Obviously, they work on a different time-zone so it could take a while.

from docfx.

yufeih avatar yufeih commented on May 25, 2024 1

Issue: API Page Namespace links points to localhost.

Seems to be caused by 404s on the pages themselves.

from docfx.

paulushub avatar paulushub commented on May 25, 2024

About wkhtmltopdf: This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Edited: (wanted to verify it myself): Is the Playwright packaged with the releases?

from docfx.

paulushub avatar paulushub commented on May 25, 2024

Dependency on NodeJS isn't a bad thing as we probably need it for #661 and to replace JINT.

Actually waiting for this for my solution. The release v2.72.1 does not include the usual binary. Is this intentional?

from docfx.

filzrev avatar filzrev commented on May 25, 2024

If packaged, it would increase the size of published zip releases of each platform from ~60MB to ~100MB, and increase the size of the docfx tool package to 300MB due to redistribution of NodeJS runtime for many platforms.

I'm using Docfx.App NuGet package and it's undesirable to increasing package size.
(Though It might be possible to excluding playwright assets via PackageReference)

Is is hard to separate PDF generation functionality to separate docfx-pdf.exe process.
And docfx.exe's docfx pdf command operations are delegated to that process like dotnet-tools.

from docfx.

yufeih avatar yufeih commented on May 25, 2024

It only affect the size of the docfx package not the size of Docfx.App.

from docfx.

filzrev avatar filzrev commented on May 25, 2024

It only affect the size of the docfx package not the size of Docfx.App.
I've intended output bin size that referencing Docfx.App NuGet package.
It increase bin size about ~60MB to ~100MB as noted above.

It's desirable to use pre-installed node runtime.
(It's planned at microsoft/playwright-dotnet#1850)

Additionally latest docfx main branch build consume twice as much disk space as before. (about 5GB increased)
Because .playwright resources are separately included by following output combinations.

  • Projects
    • docfx
    • docfx.App
    • docfx.Tests
    • docfx.Snapshot.Tests
  • TargetFrameworks
    • net6.0
    • net7.0
    • net8.0
  • Configuration
    • Debug
    • Release

Note:
It might not be a problem on Dev Drive environment.
Because CopyOnWrite feature exists.

from docfx.

paulushub avatar paulushub commented on May 25, 2024

Issue: API Page
Namespace links points to localhost.

from docfx.

paulushub avatar paulushub commented on May 25, 2024

Task: Optimize Playwright binary size?
Since DocFX is plugin based, will it be possible to only install the playwright when needed?

from docfx.

yufeih avatar yufeih commented on May 25, 2024

The biggest size factor is the redistrbution of NodeJS for 4 platforms in Playwright dotnet: microsoft/playwright-dotnet#1850

At this moment, I tend to leaning on Playwright team fixing the issue using approaches such as using system-wide NodeJS or dynamically install NodeJS

from docfx.

paulushub avatar paulushub commented on May 25, 2024

We know this is going to be difficult. For MS (on GitHub and Azure), more time used is better business.
For developers we need to cut this time also for better business.
Hope tools like DocFX make the right choice to avoid fragmentation.

Since this playwright is bringing in quiet a baggage, defining the PDF build interfaces with implementations
through Playwright and others might be a good compromise in my view.
I am looking at other options including WeasyPrint, but will also require NodeJs
for the conversion of mermaid-js graphics. WeasyPrint depends on GTK, no simple road but having a choice
is better.

Here are samples pdf output of the MkDocs's pdf-plugin using the WeasyPrint:

Not that bad in my view!

from docfx.

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.