Skip to content

Loading…

css gets embedded in html while using split page = 1 #142

Closed
notprathap opened this Issue · 9 comments

5 participants

@notprathap

After my recent upgrade to the latest version, when I run pdf2htmlEX with split-pages 1 option, apart from the page files, an html file gets generated, with css being embedded in it. Before my upgrade, only page files, a css file and an outline file was generated. Is it possible to retain this behaviour?

The reason I am asking this is because we have built a tool on top of pdf2htmlEX and we use the css file generated as an input to another part of our system. Please let us know if this is possible. Thanks.

@coolwanglu
Owner

Ok, so this issue affects many people. It's just been mentioned in #125 and I've opened #141 for a possible solution.

Sorry about the inconvenience, the reason I made this change is that actually the original design was ugly, there were many people asking about how to combine the components together, and I did think that this should be a master HTML file.

For now, here are a few options:

  • Revert the commit for #125 and wait for #141
  • Use --clean-tmp 0 and find the components there
  • Remove everything in manifest except for the line $css

And please except about 1-2 weeks before I will have time for this issue. Thanks.

@notprathap

Thanks, will wait for your resolution.

@zagraves

+1 on this.

@anurag29

@coolwanglu : removing everything in manifest whilst keeping $css is working fine for now, though we also had to keep @base.css and @fancy.css in manifest . Thanks!

@coolwanglu
Owner

@anurag29 base.css and fancy.css can be found in <data-dir> (check pdf2htmlEX -v)

@coolwanglu coolwanglu closed this
@coolwanglu coolwanglu reopened this
@akwok

Unfortunately, even when I remove everything in the manifest file (except for $css), this still results in a master html file with just the CSS, but wrapped with style tags. Is there something I am missing to get it to output just a css file, instead of an html file with style tags?

@anurag29

@akwok : "pdf2htmlEX 'path/to/pdf' --split-pages 1 base.css" this will rename the master html file to base.css and you are good to go!

@coolwanglu
Owner

@akwok currently there is no way to remove the tags, you might want to do some post processing.
Sorry for the inconvenience.

@coolwanglu
Owner

A new set of options: --embed and --embed-*** have been implemented. You can now specify whether to embed each specific type of element.

Please have a try.

@coolwanglu coolwanglu closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.