-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Switched RML highlighting in RML Reference from SilverCity to Pygments. - Bug: Properly reset pdfform before rendering a document. - Bug: Reset fonts properly before a rendering.
- Loading branch information
Showing
15 changed files
with
400 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,5 +22,5 @@ eggs = ${test:eggs} | |
|
||
[versions] | ||
reportlab = 2.6 | ||
PIL = 1.1.7 | ||
lxml = 2.3 | ||
Pillow = 1.7.8 | ||
lxml = 3.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
# Hook up our custom paragraph parser. | ||
import z3c.rml.paraparser | ||
import z3c.rml.rlfix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
############################################################################## | ||
# | ||
# Copyright (c) 2012 Zope Foundation and Contributors. | ||
# All Rights Reserved. | ||
# | ||
# This software is subject to the provisions of the Zope Public License, | ||
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
# FOR A PARTICULAR PURPOSE. | ||
# | ||
############################################################################## | ||
"""ReportLab fixups. | ||
""" | ||
__docformat__ = "reStructuredText" | ||
from reportlab.pdfbase import pdfform | ||
from reportlab.pdfbase.pdfpattern import PDFPattern | ||
from reportlab.graphics import testshapes | ||
|
||
def resetPdfForm(): | ||
pdfform.PDFDOCENC = PDFPattern(pdfform.PDFDocEncodingPattern) | ||
pdfform.ENCODING = PDFPattern( | ||
pdfform.EncodingPattern, PDFDocEncoding=pdfform.PDFDOCENC) | ||
pdfform.GLOBALFONTSDICTIONARY = pdfform.FormFontsDictionary() | ||
pdfform.GLOBALRESOURCES = pdfform.FormResources() | ||
pdfform.ZADB = PDFPattern(pdfform.ZaDbPattern) | ||
|
||
def resetFonts(): | ||
for f in testshapes._setup(): | ||
if f not in testshapes._FONTS: | ||
testshapes._FONTS.append(f) | ||
|
||
def setSideLabels(): | ||
from reportlab.graphics.charts import piecharts | ||
piecharts.Pie3d.sideLabels = 0 | ||
setSideLabels() | ||
|
||
from reportlab.rl_config import register_reset | ||
register_reset(resetPdfForm) | ||
register_reset(resetFonts) | ||
del register_reset |
Binary file not shown.
Oops, something went wrong.