Closed 1kastner closed 1 year ago
A similar or identical issue has been raised at https://groups.google.com/g/sphinx-users/c/r4ahhcagNK0/m/2Tj3nOwIAgAJ, so I guess it has nothing to do with the specific warnings I mentioned in the other issues.
Thanks for the report. :+1:
Can you please test it again with the code from the main
branch?
Some changes were made and I added a DEMO-PDF, which contains a bigger SVG (3000x3000), which looks good:
https://sphinx-simplepdf.readthedocs.io/en/latest/_static/Sphinx-SimplePDF-DEMO.pdf (last chapter: Images
).
But I can't tell why the SVG is not entered correctly. If you still have problems, would it be possible to provide a test-svg, which we can add to our DEMO PDF? This would help us to work on it.
I updated the package with the command pip install --upgrade git+https://github.com/useblocks/sphinx-simplepdf.git@main
which resolved to commit 4e3a3933ad7347a813d1030ceec8d94719257476
and that should fit. After updating to the latest version of the main branch, the creation of the PDF was successful. When I tried to open the PDF, the first pop-up of my Adobe Acrobat Reader was this one:
This has little to do with the issue related to the image but generally I am not sure how to deal with the font problems. I am somehow suspicious that the font issues might be the reason for the unreadable text within the PDF though.
When I checked my figures, I could not see a major improvement. All my SVG files are still cut off. Maybe they are processed according to a different logic?
By the way, the broken SVG is this one:
https://conflowgen.readthedocs.io/en/latest/_images/generation_process.svg
When I first tried to copy it, GitHub correctly rendered it as this:
I did manually manipulate some of the SVG code but it has not created any issues in the SVG viewers of my choice (e.g., browsers). Feel free to use it - I am the "artist" (not that it is beatiful, just legal terms).
@1kastner - could you please tell me how you fixed the image issue? I am using PNG images and I still am hit with this issue. I also face this issue with tables, where the columns exceed the right side of the PDF page. I am using sphinx-simplepdf 1.3.0
It's not solved.
The scaling of the provided svg looks good in the DEMO PDF (main
branch).
Only the used fonts are not working correctly, but I think that's because the used fonts inside the SVG are not available on my machine.
PDF screenshot:
Browser screenshot (Firefox):
Maybe it is a good idea to embed the used font in the SVG. Otherwise, it may look different on each machine (or use a more common font.)
@sachin-suresh-rapyuta: Can you test your problems with the latest version from the main
branch?
pip install --upgrade git+https://github.com/useblocks/sphinx-simplepdf.git@main
We fixed certain stuff there. A new release will come in the next few days.
Thanks for all the feedback and examples here. It helps a lot to identify the corner cases :+1:
Yes, I did take the latest version.
Here is my code in rst:
.. image:: ../images/System_UI/overview/overall_progress.png
:alt: Overall Progress
And the output in PDF:
The same issue is even for the list-table
. Here is the output:
Let's focus on the image problem right now, as tables are a completely different story :)
I need to reproduce the issue so that I'm able to fix it. So I need to ask some more questions...
Can you tell me the dimensions of the image?
Can you show me, how the image is embedded in the used HTML code to build the PDF?
Besides the built PDF, there is an index.html. Open this please, right-click on the image and select "Inspect (or something similar)".
You should see something like this:
Have you made a clean build, after installing the version from the main
branch?
Just delete the _build
folder. It may be needed to not have old stuff in the sphinx cache.
Thanks for the help :+1:
Yes, these are the steps I followed:
Used pip3 here:
$ pip3 install --upgrade git+https://github.com/useblocks/sphinx-simplepdf.git@main
...
Successfully installed sphinx-simplepdf-1.4.0
Deleted the build
folder (make clean
)
Run: make html
In the index.html
, this is the image element- It says: 1152 X 610
Then, ran make simplepdf
. Below is the stack trace with so many warnings.
$ make simplepdf
copying extra files... done
dumping object inventory... done
WARNING: Font-face 'D3 Euronism' cannot be loaded
WARNING: Font-face 'D3 Euronism Bold italic' cannot be loaded
WARNING: Font-face 'D3 Euronism Bold' cannot be loaded
WARNING: Font-face 'D3 Euronism italic' cannot be loaded
WARNING: Font-face 'Helvetica Neue Bold' cannot be loaded
WARNING: Font-face 'Helvetica Neue Light' cannot be loaded
WARNING: Font-face 'Helvetica Neue Medium' cannot be loaded
WARNING: Font-face 'Helvetica Neue Regular' cannot be loaded
WARNING: Font-face 'Fira Sans' cannot be loaded
WARNING: Font-face 'Fira Sans' cannot be loaded
WARNING: Font-face 'Fira Sans' cannot be loaded
WARNING: Font-face 'Fira Sans' cannot be loaded
WARNING: Font-face 'Fira Sans' cannot be loaded
WARNING: Font-face 'fontawesome-webfont' cannot be loaded
WARNING: Ignored `text-shadow: none` at 635:3, unknown property.
WARNING: Ignored `flex-basis: unset` at 734:7, invalid value.
WARNING: Ignored `min-width: unset` at 767:3, invalid value.
WARNING: Ignored `max-width: unset` at 768:3, invalid value.
WARNING: Ignored `white-space: -moz-pre-wrap` at 791:3, invalid value.
WARNING: Ignored `white-space: -o-pre-wrap` at 792:3, invalid value.
ERROR: Failed to load stylesheet at file:///home/sachin/Workspace/Sootballs/rr_sootballs/internal/rr_pa_amr_docs/docs/build/simplepdf/_static/sphinxcontrib-httpexample.css: URLError: <urlopen error [Errno 2] No such file or directory: '/home/sachin/Workspace/Sootballs/rr_sootballs/internal/rr_pa_amr_docs/docs/build/simplepdf/_static/sphinxcontrib-httpexample.css'>
WARNING: Ignored `display:grid ` at 1:11742, invalid value.
WARNING: Ignored `display:-ms-flexbox ` at 1:11781, invalid value.
WARNING: Ignored `display:-ms-flexbox ` at 1:11884, invalid value.
WARNING: Ignored `display:-ms-inline-flexbox ` at 1:11990, invalid value.
WARNING: Expected a media type, got '(min-width: 576px)'
WARNING: Invalid media type '(min-width: 576px)' the whole @media rule was ignored at 1:12059.
WARNING: Expected a media type, got '(min-width: 768px)'
WARNING: Invalid media type '(min-width: 768px)' the whole @media rule was ignored at 1:12456.
WARNING: Expected a media type, got '(min-width: 992px)'
WARNING: Invalid media type '(min-width: 992px)' the whole @media rule was ignored at 1:12853.
WARNING: Expected a media type, got '(min-width: 1200px)'
WARNING: Invalid media type '(min-width: 1200px)' the whole @media rule was ignored at 1:13250.
WARNING: Ignored `font-size:calc(1.375rem + 1.5vw) ` at 1:15051, invalid value.
WARNING: Ignored `line-height:unset ` at 1:15095, invalid value.
WARNING: Ignored `font-size:calc(1.325rem + 0.9vw) ` at 1:15144, invalid value.
WARNING: Ignored `line-height:unset ` at 1:15188, invalid value.
WARNING: Ignored `font-size:calc(1.3rem + 0.6vw) ` at 1:15237, invalid value.
WARNING: Ignored `line-height:unset ` at 1:15279, invalid value.
WARNING: Ignored `font-size:calc(1.275rem + 0.3vw) ` at 1:15328, invalid value.
WARNING: Ignored `line-height:unset ` at 1:15372, invalid value.
WARNING: Ignored `line-height:unset ` at 1:15450, invalid value.
WARNING: Ignored `line-height:unset ` at 1:15525, invalid value.
WARNING: Ignored `box-shadow:none ` at 1:17323, unknown property.
WARNING: Ignored `box-shadow:0 .125rem .25rem var(--sd-color-shadow) ` at 1:17364, unknown property.
WARNING: Ignored `box-shadow:0 .5rem 1rem var(--sd-color-shadow) ` at 1:17440, unknown property.
WARNING: Ignored `box-shadow:0 1rem 3rem var(--sd-color-shadow) ` at 1:17512, unknown property.
WARNING: Ignored `user-select:none` at 1:19248, unknown property.
WARNING: Expected a media type, got '(prefers-reduced-motion: reduce)'
WARNING: Invalid media type '(prefers-reduced-motion: reduce)' the whole @media rule was ignored at 1:19368.
WARNING: Ignored `fill:currentColor` at 1:27305, unknown property.
WARNING: Ignored `border:1px solid var(--sd-color-card-border)` at 1:28119, invalid value.
WARNING: Ignored `display:-ms-flexbox` at 1:28217, invalid value.
WARNING: Ignored `border-bottom:1px solid var(--sd-color-card-border)` at 1:28853, invalid value.
WARNING: Ignored `border-radius:calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0` at 1:28933, invalid value.
WARNING: Ignored `border-top:1px solid var(--sd-color-card-border)` at 1:29071, invalid value.
WARNING: Ignored `border-radius:0 0 calc(0.25rem - 1px) calc(0.25rem - 1px)` at 1:29147, invalid value.
WARNING: Ignored `border-radius:calc(0.25rem - 1px)` at 1:29450, invalid value.
WARNING: Ignored `border-top-left-radius:calc(0.25rem - 1px)` at 1:29575, invalid value.
WARNING: Ignored `border-top-right-radius:calc(0.25rem - 1px)` at 1:29618, invalid value.
WARNING: Ignored `border-bottom-left-radius:calc(0.25rem - 1px)` at 1:29695, invalid value.
WARNING: Ignored `border-bottom-right-radius:calc(0.25rem - 1px)` at 1:29741, invalid value.
WARNING: Ignored `overflow-x:hidden` at 1:29890, unknown property.
WARNING: Ignored `scroll-snap-type:x mandatory` at 1:29908, unknown property.
WARNING: Ignored `overflow-x:auto` at 1:29974, unknown property.
WARNING: Ignored `overflow-x:auto` at 1:30040, unknown property.
WARNING: Ignored `scroll-snap-align:start` at 1:30098, unknown property.
WARNING: Expected a media type, got '(min-width: 576px)'
WARNING: Invalid media type '(min-width: 576px)' the whole @media rule was ignored at 1:30864.
WARNING: Expected a media type, got '(min-width: 768px)'
WARNING: Invalid media type '(min-width: 768px)' the whole @media rule was ignored at 1:30937.
WARNING: Expected a media type, got '(min-width: 992px)'
WARNING: Invalid media type '(min-width: 992px)' the whole @media rule was ignored at 1:31027.
WARNING: Expected a media type, got '(min-width: 1200px)'
WARNING: Invalid media type '(min-width: 1200px)' the whole @media rule was ignored at 1:31134.
WARNING: Ignored `display:-ms-flexbox` at 1:31307, invalid value.
WARNING: Ignored `margin-top:calc(var(--sd-gutter-y) * -1)` at 1:31374, invalid value.
WARNING: Ignored `margin-right:calc(var(--sd-gutter-x) * -0.5)` at 1:31415, invalid value.
WARNING: Ignored `margin-left:calc(var(--sd-gutter-x) * -0.5)` at 1:31460, invalid value.
WARNING: Ignored `padding-right:calc(var(--sd-gutter-x) * 0.5)` at 1:31576, invalid value.
WARNING: Ignored `padding-left:calc(var(--sd-gutter-x) * 0.5)` at 1:31621, invalid value.
WARNING: Expected a media type, got '(min-width: 576px)'
WARNING: Invalid media type '(min-width: 576px)' the whole @media rule was ignored at 1:32554.
WARNING: Expected a media type, got '(min-width: 768px)'
WARNING: Invalid media type '(min-width: 768px)' the whole @media rule was ignored at 1:33497.
WARNING: Expected a media type, got '(min-width: 992px)'
WARNING: Invalid media type '(min-width: 992px)' the whole @media rule was ignored at 1:34440.
WARNING: Expected a media type, got '(min-width: 1200px)'
WARNING: Invalid media type '(min-width: 1200px)' the whole @media rule was ignored at 1:35383.
WARNING: Expected a media type, got '(min-width: 576px)'
WARNING: Invalid media type '(min-width: 576px)' the whole @media rule was ignored at 1:37550.
WARNING: Expected a media type, got '(min-width: 768px)'
WARNING: Invalid media type '(min-width: 768px)' the whole @media rule was ignored at 1:38910.
WARNING: Expected a media type, got '(min-width: 992px)'
WARNING: Invalid media type '(min-width: 992px)' the whole @media rule was ignored at 1:40270.
WARNING: Expected a media type, got '(min-width: 1200px)'
WARNING: Invalid media type '(min-width: 1200px)' the whole @media rule was ignored at 1:41630.
WARNING: Ignored `user-select:none` at 1:43239, unknown property.
WARNING: Invalid or unsupported selector 'details.sd-dropdown summary::-webkit-details-marker', (<IdentToken -webkit-details-marker>, 'Expected a supported pseudo-element, got -webkit-details-marker')
WARNING: Ignored `pointer-events:none` at 1:44087, unknown property.
WARNING: Ignored `border:1px solid var(--sd-color-card-border)` at 1:44405, invalid value.
WARNING: Ignored `outline-style:auto` at 1:45631, invalid value.
WARNING: Ignored `box-shadow:0 -0.0625rem var(--sd-color-tabs-overline),0 .0625rem var(--sd-color-tabs-underline)` at 1:46171, unknown property.
WARNING: Ignored `user-select:none` at 1:130, unknown property.
WARNING: Invalid or unsupported selector 'details.dropdown summary::-webkit-details-marker', (<IdentToken -webkit-details-marker>, 'Expected a supported pseudo-element, got -webkit-details-marker')
WARNING: Ignored `pointer-events:none` at 1:784, unknown property.
WARNING: Ignored `fill:currentColor` at 1:1605, unknown property.
WARNING: Ignored `box-shadow:0 -.0625rem var(--tabs-color-overline),0 .0625rem var(--tabs-color-underline)` at 1:1663, unknown property.
WARNING: Ignored `outline-style:auto` at 1:2315, invalid value.
WARNING: Ignored `user-select:none` at 1:4538, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(0,123,255,0.25)` at 1:4672, unknown property.
WARNING: Expected a media type, got '(prefers-reduced-motion: reduce)'
WARNING: Invalid media type ' (prefers-reduced-motion: reduce)' the whole @media rule was ignored at 1:4766.
WARNING: Ignored `pointer-events:none` at 1:4867, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(0,123,255,0.5)` at 1:5149, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(0,123,255,0.5)` at 1:5649, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(108,117,125,0.5)` at 1:5964, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(108,117,125,0.5)` at 1:6482, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(40,167,69,0.5)` at 1:6789, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(40,167,69,0.5)` at 1:7289, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(23,162,184,0.5)` at 1:7579, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(23,162,184,0.5)` at 1:8056, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(255,193,7,0.5)` at 1:8371, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(255,193,7,0.5)` at 1:8880, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(220,53,69,0.5)` at 1:9180, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(220,53,69,0.5)` at 1:9672, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(248,249,250,0.5)` at 1:9976, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(248,249,250,0.5)` at 1:10471, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(52,58,64,0.5)` at 1:10763, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(52,58,64,0.5)` at 1:11238, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(0,123,255,0.5)` at 1:11517, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(0,123,255,0.5)` at 1:12056, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(108,117,125,0.5)` at 1:12346, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(108,117,125,0.5)` at 1:12903, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(40,167,69,0.5)` at 1:13185, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(40,167,69,0.5)` at 1:13724, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(23,162,184,0.5)` at 1:13989, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(23,162,184,0.5)` at 1:14505, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(255,193,7,0.5)` at 1:14789, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(255,193,7,0.5)` at 1:15331, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(220,53,69,0.5)` at 1:15606, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(220,53,69,0.5)` at 1:16137, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(248,249,250,0.5)` at 1:16410, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(248,249,250,0.5)` at 1:16938, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(52,58,64,0.5)` at 1:17205, unknown property.
WARNING: Ignored `box-shadow:0 0 0 .2rem rgba(52,58,64,0.5)` at 1:17719, unknown property.
WARNING: Ignored `box-shadow:none` at 1:17910, unknown property.
WARNING: Ignored `pointer-events:none` at 1:18004, unknown property.
WARNING: Ignored `pointer-events:auto` at 1:18479, unknown property.
WARNING: Ignored `display:-ms-flexbox` at 1:18693, invalid value.
WARNING: Ignored `border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0` at 1:19536, invalid value.
WARNING: Ignored `border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)` at 1:19792, invalid value.
WARNING: Ignored `border-top-left-radius:calc(.25rem - 1px)` at 1:20201, invalid value.
WARNING: Ignored `border-top-right-radius:calc(.25rem - 1px)` at 1:20243, invalid value.
WARNING: Ignored `border-bottom-left-radius:calc(.25rem - 1px)` at 1:20313, invalid value.
WARNING: Ignored `border-bottom-right-radius:calc(.25rem - 1px)` at 1:20358, invalid value.
WARNING: Ignored `box-shadow:0 0.5rem 1rem rgba(0,0,0,0.15) ` at 1:20441, unknown property.
WARNING: Expected a media type, got '(min-width: 576px)'
WARNING: Invalid media type ' (min-width: 576px)' the whole @media rule was ignored at 1:23995.
WARNING: Expected a media type, got '(min-width: 768px)'
WARNING: Invalid media type ' (min-width: 768px)' the whole @media rule was ignored at 1:24049.
WARNING: Expected a media type, got '(min-width: 992px)'
WARNING: Invalid media type ' (min-width: 992px)' the whole @media rule was ignored at 1:24103.
WARNING: Expected a media type, got '(min-width: 1200px)'
WARNING: Invalid media type ' (min-width: 1200px)' the whole @media rule was ignored at 1:24157.
WARNING: Expected a media type, got '(min-width: 576px)'
WARNING: Invalid media type ' (min-width: 576px)' the whole @media rule was ignored at 1:24369.
WARNING: Expected a media type, got '(min-width: 768px)'
WARNING: Invalid media type ' (min-width: 768px)' the whole @media rule was ignored at 1:24437.
WARNING: Expected a media type, got '(min-width: 992px)'
WARNING: Invalid media type ' (min-width: 992px)' the whole @media rule was ignored at 1:24519.
WARNING: Expected a media type, got '(min-width: 1200px)'
WARNING: Invalid media type ' (min-width: 1200px)' the whole @media rule was ignored at 1:24615.
WARNING: Ignored `display:-ms-flexbox` at 1:24732, invalid value.
WARNING: Expected a media type, got '(min-width: 576px)'
WARNING: Invalid media type ' (min-width: 576px)' the whole @media rule was ignored at 1:25478.
WARNING: Expected a media type, got '(min-width: 768px)'
WARNING: Invalid media type ' (min-width: 768px)' the whole @media rule was ignored at 1:26465.
WARNING: Expected a media type, got '(min-width: 992px)'
WARNING: Invalid media type ' (min-width: 992px)' the whole @media rule was ignored at 1:27452.
WARNING: Expected a media type, got '(min-width: 1200px)'
WARNING: Invalid media type ' (min-width: 1200px)' the whole @media rule was ignored at 1:28439.
WARNING: Ignored `display:-ms-flexbox ` at 1:29435, invalid value.
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id2'
WARNING: Anchor defined twice: 'about'
WARNING: Anchor defined twice: 'intended-audience'
WARNING: Anchor defined twice: 'convention'
WARNING: Anchor defined twice: 'definitions-and-acronyms'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id2'
WARNING: Anchor defined twice: 'id3'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'about'
WARNING: Anchor defined twice: 'intended-audience'
WARNING: Anchor defined twice: 'convention'
WARNING: Anchor defined twice: 'definitions-and-acronyms'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id2'
WARNING: Anchor defined twice: 'id3'
WARNING: Anchor defined twice: 'id4'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id2'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id2'
WARNING: Anchor defined twice: 'id3'
WARNING: Anchor defined twice: 'id4'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id2'
WARNING: Anchor defined twice: 'id3'
WARNING: Anchor defined twice: 'id4'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id2'
WARNING: Anchor defined twice: 'id3'
WARNING: Anchor defined twice: 'id4'
WARNING: Anchor defined twice: 'id5'
WARNING: Anchor defined twice: 'id6'
WARNING: Anchor defined twice: 'id1'
ERROR: No anchor # for internal URI reference
ERROR: No anchor # for internal URI reference
ERROR: No anchor # for internal URI reference
WARNING: Unsupported computed value "inherit" set in variable '--sd-color-card-text' for property 'color'.
WARNING: Unsupported computed value "inherit" set in variable '--sd-color-card-text' for property 'color'.
build succeeded, 9 warnings.
The HTML page is in build/simplepdf.
Opened the PDF in the build folder, and I still have the same issue in the image (as attached above).
UPDATE: Since it is related to the image, the cover page image is also very large.
@danwos thank you very much for sharing the project! I have just updated simplepdf to commit d47a2657a8753a713d57d57f4aaf1944bcddfb8d
. I cleand the output directory with make clean
and rebuild everything. Somehow, I did not see any improvement. I could not redo the steps which have obviously worked in your case. How did you build the demo PDF?
To build the demo:
git clone git@github.com:useblocks/sphinx-simplepdf.git
cd sphinx-simplepdf
pip install .
cd demo
pip install -r doc-requirements.txt
sphinx-build -a -E -b simplepdf . _build/
@sachin-suresh-rapyuta Thanks for the detailed report. It all looks good. Your image is only embedded inside a list, but this should not make trouble. But I will add such a case to our DEMO PDF.
As you have reported problems also with the cover image, I'm totally lost and can't even imagine what the problem could be.
Can I ask you to create the DEMO PDF as well on your system? This is needed for such complex problems, as we all then work on the same data and can reproduce stuff on our side. You can compare then the critical parts with the one created by our CI: https://sphinx-simplepdf.readthedocs.io/en/latest/
@1kastner: I wish the debug option from #24 would be already available :)
Thanks all for helping to hunt this bug down :)
Ohh wait, what kind of operating system are you all using? We had already an Issue, where on macOS not all dependencies got installed. Maybe this is also here the case and some libs for rescaling images got not installed.
I'm working on Linux (ManjaroOS) and also the CI (ReadTheDocs) is running on Linux (ubuntu).
For PDF generation, the weasyprint library is used: https://github.com/Kozea/WeasyPrint/blob/master/pyproject.toml
There are the following dependencies defined:
Especially Pillow
is often used for rescaling images.
Maybe this is not installed or not in the right version.
Can you paste here the requirements.txt
file. Hope I should declare all the above dependencies in this file and run pip3 install
? By the way, I am using Ubuntu 20.04 LTS.
And, to build the DEMO PDF on my system, is it sufficient to run the above commands you listed in your last comment?
UPDATE:
I followed the above steps to build the demo (Yes, I used: pip3 install -r doc-requirements.txt
). I see in the "Demo Versions.pdf" page 61, the SQLite Database image still appears to be out of page.
There was one step missing in my above commands.
I just added a doc-requirements
file to the demo
folder, this must be installed as well (I updated my above description and will also add it to our docs).
Thanks for the test.
On my machine, the DEMO PDF looks like this:
Source: https://sphinx-simplepdf.readthedocs.io/en/latest/_static/Sphinx-SimplePDF-DEMO.pdf (CI Build)
Does this CI version of DEMO PDF look on your machine the same? I just want to be sure that it is not a readers problem.
No, it's a completely different PDF file I get (the one with the RED cover page; attached for reference). Yours had a GREEN cover page. I followed the exact same commands above and this is the Demo Versions.pdf
I get from the _build
folder.
Demo Versions.pdf. Check page 61 for image issue.
Ohh wow, that's really strange.
It looks like no config from conf.py
was read for Sphinx-SimplePDF, as "red" is the default value, if nothing got configured.
I have to set up a clean system on my side, to be sure that I have not missed any steps or some old stuff is still in my env. (But it's working on the CI, which always makes a clean build...)
I guess so. Let me know if you make any changes or if something I have to do to help in this?
Ok, I made some tests with a completely clean Python ENV and installed everything from scratch. It is working on my side as aspected, which is good but mostly bad for finding the bug.
Therefore I added the debug-option from #24.
Docs: https://sphinx-simplepdf.readthedocs.io/en/latest/configuration.html#simplepldf-debug
Result:
Can you please update your local main
branch and build the DEMO project again?
The debug option is already set for it.
Then please check there the (important) python package and see if there are some flashy differences.
I took the update from the main
branch and in the demo
folder, I ran sphinx-build -a -E -b simplepdf . _build/
. I see the simplepdf_debug = True
in conf.py. But the geenrated PDF does not have debug info at the last page. Attaching the PDF.
Sphinx-SimplePDF-DEMO.pdf
That's all strange.
Your installation fetches the latest content (rst) changes but does update the installed theme-files.
To be sure, have you reinstalled it after update? pip install -e .
.
I really can't say what the problem is.
I have attached my current demo folder state. Can you try to build the demo PDF from your end ? Yes, I did run: pip3 install -r doc-requirements.txt
demo.zip
I set up a blank virtual environment and ran the steps described in https://github.com/useblocks/sphinx-simplepdf/issues/9#issuecomment-1247731278. The PDF I generate looks as follows:
On the first page, there is a frog and it is in green. That is a good sign I guess. But then there are issues like these in my Adobe Acrobat Reader:
The logs are as follows:
(my-env) PS C:\git-repos\PDF-Generation\sphinx-simplepdf\demo> sphinx-build -a -E -b simplepdf . _build/
Running Sphinx v5.1.1
making output directory... done
Setting theme to sphinx_simplepdf
Generating css files from scss-templates
building [mo]: all of 0 po files
building [simplepdf]: all source files
updating environment: [new config] 14 added, 0 changed, 0 removed
reading sources... [100%] structure
Copying static files for sphinx-needs datatables support...C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\datatables.min.css C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\datatables.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\datatables_loader.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\sphinx_needs_collapse.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Buttons-1.5.1\css\buttons.dataTables.min.css C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Buttons-1.5.1\css\common.scss C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Buttons-1.5.1\css\mixins.scss C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Buttons-1.5.1\js\buttons.colVis.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Buttons-1.5.1\js\buttons.flash.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Buttons-1.5.1\js\buttons.html5.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Buttons-1.5.1\js\buttons.html5.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Buttons-1.5.1\js\buttons.print.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Buttons-1.5.1\js\dataTables.buttons.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Buttons-1.5.1\swf\flashExport.swf C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\ColReorder-1.4.1\css\colReorder.dataTables.min.css C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\ColReorder-1.4.1\js\dataTables.colReorder.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\DataTables-1.10.16\css\jquery.dataTables.min.css C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\DataTables-1.10.16\images\sort_asc.png C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\DataTables-1.10.16\images\sort_asc_disabled.png C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\DataTables-1.10.16\images\sort_both.png C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\DataTables-1.10.16\images\sort_desc.png C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\DataTables-1.10.16\images\sort_desc_disabled.png C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\DataTables-1.10.16\js\jquery.dataTables.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\FixedColumns-3.2.4\css\fixedColumns.dataTables.min.css C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\FixedColumns-3.2.4\js\dataTables.fixedColumns.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\FixedHeader-3.1.3\css\fixedHeader.dataTables.min.css C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\FixedHeader-3.1.3\js\dataTables.fixedHeader.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\JSZip-2.5.0\jszip.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\pdfmake-0.1.32\pdfmake.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\pdfmake-0.1.32\vfs_fonts.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Responsive-2.2.1\css\responsive.dataTables.min.css C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Responsive-2.2.1\js\dataTables.responsive.min.js C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Scroller-1.4.4\css\scroller.dataTables.min.css C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\libs\html\Scroller-1.4.4\js\dataTables.scroller.min.js
Copying static files for sphinx-needs custom style support...[ 50%] C:\git-repos\PDF-Generation\.venv-simplepdf\lib\siteCopying static files for sphinx-needs custom style support...[ 75%] C:\git-repos\PDF-Generation\.venv-simplepdf\lib\siteCopying static files for sphinx-needs custom style support...[100%] C:\git-repos\PDF-Generation\.venv-simplepdf\lib\site-packages\sphinxcontrib\needs\css\modern\styles.css
C:\git-repos\PDF-Generation\sphinx-simplepdf\demo\test_py_module\test.py:docstring of test_py_module.test.Foo:17: WARNING: Footnote [1] is not referenced.
C:\git-repos\PDF-Generation\sphinx-simplepdf\demo\demo.rst:265: WARNING: Footnote [4] is not referenced.
C:\git-repos\PDF-Generation\sphinx-simplepdf\demo\demo.rst:18: ERROR: Undefined substitution referenced: "problematic".
C:\git-repos\PDF-Generation\sphinx-simplepdf\demo\demo.rst:271: WARNING: duplicate citation Citation, other instance in C:\git-repos\PDF-Generation\sphinx-simplepdf\demo\api.rst
C:\git-repos\PDF-Generation\sphinx-simplepdf\demo\demo.rst:265: ERROR: Unknown target name: "5".
C:\git-repos\PDF-Generation\sphinx-simplepdf\demo\demo.rst:318: ERROR: Unknown target name: "hyperlink reference without a target".
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
assembling single document... structure demo lists_tables api sphinx_needs level1/index level1/level2/index level1/level2/level3/index level1/level2/level3/level4/index level1/level2/level3/level4/level5/index level1/level2/level3/level4/level5/level6/index long images C:\git-repos\PDF-Generation\sphinx-simplepdf\demo\demo.rst:279: WARNING: citation not found: nonexistent
done
writing... done
writing additional files... done
copying images... [100%] _static/phetus_2560x2176.jpg
copying downloadable files... [100%] _static/yi_jing_01_chien.jpg
copying static files... done
copying extra files... done
dumping object inventory... done
WARNING: Ignored `text-shadow: none` at 654:3, unknown property.
WARNING: Ignored `flex-basis: unset` at 753:7, invalid value.
WARNING: Ignored `min-width: unset` at 786:3, invalid value.
WARNING: Ignored `max-width: unset` at 787:3, invalid value.
WARNING: Ignored `white-space: -o-pre-wrap` at 810:3, invalid value.
WARNING: Error: Expected <ident> for declaration name, got literal. at 13:645.
WARNING: Error: Expected <ident> for declaration name, got literal. at 13:8140.
WARNING: Ignored `zoom:1` at 13:8148, unknown property.
WARNING: Error: Expected <ident> for declaration name, got literal. at 13:8720.
WARNING: Ignored `background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc))` at 13:9010, invalid value.
WARNING: Ignored `background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%)` at 13:9118, invalid value.
WARNING: Ignored `background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%)` at 13:9181, invalid value.
WARNING: Ignored `background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%)` at 13:9241, invalid value.
WARNING: Ignored `background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%)` at 13:9300, invalid value.
WARNING: Ignored `box-shadow:none` at 13:9722, unknown property.
WARNING: Ignored `background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111))` at 13:9872, invalid value.
WARNING: Ignored `background:-webkit-linear-gradient(top, #585858 0%, #111 100%)` at 13:9980, invalid value.
WARNING: Ignored `background:-moz-linear-gradient(top, #585858 0%, #111 100%)` at 13:10043, invalid value.
WARNING: Ignored `background:-ms-linear-gradient(top, #585858 0%, #111 100%)` at 13:10103, invalid value.
WARNING: Ignored `background:-o-linear-gradient(top, #585858 0%, #111 100%)` at 13:10162, invalid value.
WARNING: Ignored `background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c))` at 13:10384, invalid value.
WARNING: Ignored `background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%)` at 13:10495, invalid value.
WARNING: Ignored `background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%)` at 13:10561, invalid value.
WARNING: Ignored `background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%)` at 13:10624, invalid value.
WARNING: Ignored `background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%)` at 13:10686, invalid value.
WARNING: Ignored `box-shadow:inset 0 0 3px #111` at 13:10811, unknown property.
WARNING: Ignored `background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)))` at 13:11115, invalid value.
WARNING: Ignored `background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)` at 13:11328, invalid value.
WARNING: Ignored `background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)` at 13:11473, invalid value.
WARNING: Ignored `background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)` at 13:11615, invalid value.
WARNING: Ignored `background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)` at 13:11756, invalid value.
WARNING: Error: Expected <ident> for declaration name, got literal. at 13:12362.
WARNING: Expected a media type, got 'screen/**/and/**/(max-width: 767px)'
WARNING: Invalid media type ' screen and (max-width: 767px)' the whole @media rule was ignored at 13:13576.
WARNING: Expected a media type, got 'screen/**/and/**/(max-width: 640px)'
WARNING: Invalid media type ' screen and (max-width: 640px)' the whole @media rule was ignored at 13:13779.
WARNING: Ignored `box-shadow:3px 3px 8px rgba(0,0,0,0.3)` at 16:556, unknown property.
WARNING: Ignored `background-image:-webkit-linear-gradient(top, #fff 0%, #e9e9e9 100%)` at 16:1122, invalid value.
WARNING: Ignored `background-image:-moz-linear-gradient(top, #fff 0%, #e9e9e9 100%)` at 16:1191, invalid value.
WARNING: Ignored `background-image:-ms-linear-gradient(top, #fff 0%, #e9e9e9 100%)` at 16:1257, invalid value.
WARNING: Ignored `background-image:-o-linear-gradient(top, #fff 0%, #e9e9e9 100%)` at 16:1322, invalid value.
WARNING: Ignored `filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="white", EndColorStr="#e9e9e9")` at 16:1453, unknown property.
WARNING: Ignored `user-select:none` at 16:1632, unknown property.
WARNING: Ignored `background-image:-webkit-linear-gradient(top, #fff 0%, #f9f9f9 100%)` at 16:1829, invalid value.
WARNING: Ignored `background-image:-moz-linear-gradient(top, #fff 0%, #f9f9f9 100%)` at 16:1898, invalid value.
WARNING: Ignored `background-image:-ms-linear-gradient(top, #fff 0%, #f9f9f9 100%)` at 16:1964, invalid value.
WARNING: Ignored `background-image:-o-linear-gradient(top, #fff 0%, #f9f9f9 100%)` at 16:2029, invalid value.
WARNING: Ignored `filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="#ffffff", EndColorStr="#f9f9f9")` at 16:2160, unknown property.
WARNING: Ignored `background-image:-webkit-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%)` at 16:2516, invalid value.
WARNING: Ignored `background-image:-moz-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%)` at 16:2588, invalid value.
WARNING: Ignored `background-image:-ms-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%)` at 16:2657, invalid value.
WARNING: Ignored `background-image:-o-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%)` at 16:2725, invalid value.
WARNING: Ignored `filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="#f3f3f3", EndColorStr="#e2e2e2")` at 16:2862, unknown property.
WARNING: Ignored `box-shadow:inset 1px 1px 3px #999999` at 16:2975, unknown property.
WARNING: Ignored `box-shadow:inset 1px 1px 3px #999999` at 16:3356, unknown property.
WARNING: Ignored `background-image:-webkit-linear-gradient(top, #eaeaea 0%, #ccc 100%)` at 16:3418, invalid value.
WARNING: Ignored `background-image:-moz-linear-gradient(top, #eaeaea 0%, #ccc 100%)` at 16:3487, invalid value.
WARNING: Ignored `background-image:-ms-linear-gradient(top, #eaeaea 0%, #ccc 100%)` at 16:3553, invalid value.
WARNING: Ignored `background-image:-o-linear-gradient(top, #eaeaea 0%, #ccc 100%)` at 16:3618, invalid value.
WARNING: Ignored `filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="#eaeaea", EndColorStr="#cccccc")` at 16:3749, unknown property.
WARNING: Ignored `background-image:-webkit-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%)` at 16:4097, invalid value.
WARNING: Ignored `background-image:-moz-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%)` at 16:4169, invalid value.
WARNING: Ignored `background-image:-ms-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%)` at 16:4238, invalid value.
WARNING: Ignored `background-image:-o-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%)` at 16:4306, invalid value.
WARNING: Ignored `filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="#f9f9f9", EndColorStr="#e0e0e0")` at 16:4443, unknown property.
WARNING: Ignored `text-shadow:0 1px 0 #c4def1` at 16:4687, unknown property.
WARNING: Ignored `background-image:-webkit-linear-gradient(top, #bddef4 0%, #79ace9 100%)` at 16:4753, invalid value.
WARNING: Ignored `background-image:-moz-linear-gradient(top, #bddef4 0%, #79ace9 100%)` at 16:4825, invalid value.
WARNING: Ignored `background-image:-ms-linear-gradient(top, #bddef4 0%, #79ace9 100%)` at 16:4894, invalid value.
WARNING: Ignored `background-image:-o-linear-gradient(top, #bddef4 0%, #79ace9 100%)` at 16:4962, invalid value.
WARNING: Ignored `filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="#bddef4", EndColorStr="#79ace9")` at 16:5099, unknown property.
WARNING: Ignored `box-shadow:3px 3px 5px rgba(0,0,0,0.3)` at 16:5559, unknown property.
WARNING: Ignored `background-image:-webkit-linear-gradient(top, #f0f0f0 0%, #dadada 100%)` at 16:6319, invalid value.
WARNING: Ignored `background-image:-moz-linear-gradient(top, #f0f0f0 0%, #dadada 100%)` at 16:6391, invalid value.
WARNING: Ignored `background-image:-ms-linear-gradient(top, #f0f0f0 0%, #dadada 100%)` at 16:6460, invalid value.
WARNING: Ignored `background-image:-o-linear-gradient(top, #f0f0f0 0%, #dadada 100%)` at 16:6528, invalid value.
WARNING: Ignored `filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr="#f0f0f0", EndColorStr="#dadada")` at 16:6665, unknown property.
WARNING: Ignored `box-shadow:inset 1px 1px 3px #666` at 16:6778, unknown property.
WARNING: Ignored `background:-ms-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%)` at 16:7819, invalid value.
WARNING: Ignored `background:-moz-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%)` at 16:7925, invalid value.
WARNING: Ignored `background:-o-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%)` at 16:8032, invalid value.
WARNING: Ignored `background:-webkit-gradient(radial, center center, 0, center center, 497, color-stop(0, rgba(0,0,0,0.3)), color-stop(1, rgba(0,0,0,0.7)))` at 16:8137, invalid value.
WARNING: Ignored `background:-webkit-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%)` at 16:8275, invalid value.
WARNING: Expected a media type, got 'screen/**/and/**/(max-width: 640px)'
WARNING: Invalid media type ' screen and (max-width: 640px)' the whole @media rule was ignored at 16:8502.
WARNING: Ignored `box-shadow:0 0 3px #444` at 28:907, unknown property.
WARNING: Ignored `box-shadow:0 0 3px #444` at 28:2080, unknown property.
WARNING: Ignored `box-shadow:0 12px 30px rgba(0,0,0,0.6)` at 28:3347, unknown property.
WARNING: Expected a media type, got 'screen/**/and/**/(max-width: 767px)'
WARNING: Invalid media type ' screen and (max-width: 767px)' the whole @media rule was ignored at 28:3845.
WARNING: Ignored `overflow-x: auto` at 9:3, unknown property.
WARNING: Ignored `overflow-x: auto` at 20:5, unknown property.
WARNING: Ignored `box-shadow: None ` at 92:5, unknown property.
WARNING: Ignored `overflow-x: auto` at 113:5, unknown property.
WARNING: Ignored `text-orientation: upright` at 5:5, unknown property.
WARNING: Ignored `writing-mode: sideways-lr` at 6:5, unknown property.
WARNING: Ignored `text-orientation: upright` at 11:5, unknown property.
WARNING: Ignored `writing-mode: sideways-rl` at 12:5, unknown property.
WARNING: Ignored `box-shadow: None` at 19:5, unknown property.
WARNING: Ignored `box-shadow: None` at 31:5, unknown property.
WARNING: Anchor defined twice: 'table-of-contents'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id2'
WARNING: Anchor defined twice: 'id3'
WARNING: Anchor defined twice: 'id4'
WARNING: Anchor defined twice: 'id5'
WARNING: Anchor defined twice: 'id6'
WARNING: Anchor defined twice: 'id7'
WARNING: Anchor defined twice: 'id8'
WARNING: Anchor defined twice: 'id9'
WARNING: Anchor defined twice: 'id10'
WARNING: Anchor defined twice: 'id11'
WARNING: Anchor defined twice: 'table-of-contents'
WARNING: Anchor defined twice: 'id17'
WARNING: Anchor defined twice: 'id18'
WARNING: Anchor defined twice: 'id19'
WARNING: Anchor defined twice: 'id22'
WARNING: Anchor defined twice: 'id23'
WARNING: Anchor defined twice: 'id24'
WARNING: Anchor defined twice: 'id25'
WARNING: Anchor defined twice: 'id27'
WARNING: Anchor defined twice: 'id28'
WARNING: Anchor defined twice: 'id29'
WARNING: Anchor defined twice: 'id30'
WARNING: Anchor defined twice: 'id31'
WARNING: Anchor defined twice: 'id32'
WARNING: Anchor defined twice: 'id33'
WARNING: Anchor defined twice: 'id34'
WARNING: Anchor defined twice: 'id11'
WARNING: Anchor defined twice: 'id12'
WARNING: Anchor defined twice: 'id13'
WARNING: Anchor defined twice: 'id14'
WARNING: Anchor defined twice: 'id15'
WARNING: Anchor defined twice: 'id16'
WARNING: Anchor defined twice: 'table-of-contents'
WARNING: Anchor defined twice: 'id2'
WARNING: Anchor defined twice: 'id3'
WARNING: Anchor defined twice: 'id4'
WARNING: Anchor defined twice: 'id5'
WARNING: Anchor defined twice: 'id6'
WARNING: Anchor defined twice: 'id7'
WARNING: Anchor defined twice: 'id8'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'citation'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'table-of-contents'
WARNING: Anchor defined twice: 'id9'
WARNING: Anchor defined twice: 'id10'
WARNING: Anchor defined twice: 'id11'
WARNING: Anchor defined twice: 'id12'
WARNING: Anchor defined twice: 'id13'
WARNING: Anchor defined twice: 'id14'
WARNING: Anchor defined twice: 'id15'
WARNING: Anchor defined twice: 'id16'
WARNING: Anchor defined twice: 'id17'
WARNING: Anchor defined twice: 'id18'
WARNING: Anchor defined twice: 'id19'
WARNING: Anchor defined twice: 'id20'
WARNING: Anchor defined twice: 'id21'
WARNING: Anchor defined twice: 'id22'
WARNING: Anchor defined twice: 'id23'
WARNING: Anchor defined twice: 'id24'
WARNING: Anchor defined twice: 'id25'
WARNING: Anchor defined twice: 'id26'
WARNING: Anchor defined twice: 'id27'
WARNING: Anchor defined twice: 'id28'
WARNING: Anchor defined twice: 'id29'
WARNING: Anchor defined twice: 'id30'
WARNING: Anchor defined twice: 'id31'
WARNING: Anchor defined twice: 'id32'
WARNING: Anchor defined twice: 'id33'
WARNING: Anchor defined twice: 'id34'
WARNING: Anchor defined twice: 'id35'
WARNING: Anchor defined twice: 'id36'
WARNING: Anchor defined twice: 'id37'
WARNING: Anchor defined twice: 'id38'
WARNING: Anchor defined twice: 'id39'
WARNING: Anchor defined twice: 'id40'
WARNING: Anchor defined twice: 'id41'
WARNING: Anchor defined twice: 'id42'
WARNING: Anchor defined twice: 'id43'
WARNING: Anchor defined twice: 'id44'
WARNING: Anchor defined twice: 'id45'
WARNING: Anchor defined twice: 'id46'
WARNING: Anchor defined twice: 'id1'
WARNING: Anchor defined twice: 'id2'
WARNING: Anchor defined twice: 'id3'
WARNING: Anchor defined twice: 'id4'
WARNING: Anchor defined twice: 'id5'
WARNING: Anchor defined twice: 'id6'
WARNING: Anchor defined twice: 'id7'
WARNING: Anchor defined twice: 'id8'
WARNING: Anchor defined twice: 'images'
ERROR: No anchor # for internal URI reference
ERROR: No anchor #id62 for internal URI reference
ERROR: No anchor #id62 for internal URI reference
ERROR: No anchor #id63 for internal URI reference
ERROR: No anchor #id63 for internal URI reference
ERROR: No anchor # for internal URI reference
ERROR: No anchor # for internal URI reference
Checking sphinx-needs warnings
build succeeded, 7 warnings.
The HTML page is in _build.
Then I thought whether the right simplepdf version is used. This is the output:
(.venv-simplepdf) PS C:\git-repos\PDF-Generation\sphinx-simplepdf\demo> python
Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sphinx_simplepdf
>>> dir(sphinx_simplepdf)
['IfBuilder', 'IfBuilderDirective', 'IfInclude', 'IfIncludeDirective', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'directives', 'setup']
>>> sphinx_simplepdf.__file__
'C:\\git-repos\\PDF-Generation\\.venv-simplepdf\\lib\\site-packages\\sphinx_simplepdf\\__init__.py'
>>> exit()
(.venv-simplepdf) PS C:\git-repos\PDF-Generation\sphinx-simplepdf\demo> pip show sphinx_simplepdf
Name: sphinx-simplepdf
Version: 1.4.0
Summary: A specific theme for Sphinx-Needs
Home-page: https://github.com/useblocks/sphinx-simplepdf
Author: team useblocks
Author-email: info@useblocks.com
License: Commercial
Location: c:\git-repos\pdf-generation\.venv-simplepdf\lib\site-packages
Requires: sphinx, weasyprint, libsass, beautifulsoup4
Required-by:
(.venv-simplepdf) PS C:\git-repos\PDF-Generation\sphinx-simplepdf\demo>
My only explanation is that the sphinx builder possibly imports the wrong simplepdf version from another Python environment even though I am in a virtualenv?
Ah, I finally got the green cover page one with debug info if I run all the commands from the virtualenv. Thats strange!! Why not in the demo folder? Why not in my project folder? Sphinx-SimplePDF-DEMO.pdf
FYI: The image in page 63 still takes extra space.
I ran the command sphinx-build -vvv -a -E -b simplepdf . _build/
. I could verify that the correct version from the virtualenv is used.
Furthermore, some of the SVG files are completely distorted, see this screenshot:
How could this be automatically resized to the page width? The used HTML properities are
Thus, I am a bit surprised that the image is halved.