Create an instance of this class to open a PDF file, process the contents of every page using PyPDF2 then render each one on demand
Initialize self. See help(type(self)) for accurate signature. |
|
Add wx.Bitmap from data, processed by filters. |
|
Convert CMYK values (0 to 1.0) in operand to nearest RGB. |
|
Build set of drawing commands from PDF contents. Ideally these could be drawn |
|
Stroke and/or fill the defined path depending on operator. |
|
Draw a text item. |
|
Draw a text string. Word spacing only works for horizontal text. |
|
Return the standard fonts in current page or form |
|
operand contains an image |
|
XObject can be an image or a ‘form’ (an arbitrary PDF sequence). |
|
Interpret each operation in opslist and return in drawlist. |
|
This function is called at regular intervals during Drawfile |
|
Render the set of pagedrawings |
|
Returns |
Create an instance of this class to open a PDF file, process the contents of every page using PyPDF2 then render each one on demand
Initialize self. See help(type(self)) for accurate signature.
Add wx.Bitmap from data, processed by filters.
Convert CMYK values (0 to 1.0) in operand to nearest RGB.
Build set of drawing commands from PDF contents. Ideally these could be drawn straight into a PseudoDC and the visible section painted directly into scrolled window, but we need to be able to zoom and scale the output quickly without having to rebuild the drawing commands (slow). So build our own command lists, one per page, into self.pagedrawings.
Stroke and/or fill the defined path depending on operator.
Draw a text item.
textitem – the item to draw
f – the font to use for text extent measuring
Draw a text string. Word spacing only works for horizontal text.
text (string) – the text to draw
Return the standard fonts in current page or form
operand contains an image
XObject can be an image or a ‘form’ (an arbitrary PDF sequence).
Interpret each operation in opslist and return in drawlist.
This function is called at regular intervals during Drawfile
Render the set of pagedrawings In a pdf file, bitmaps are treated as being of unit width and height and are scaled via a previous ConcatTransform containing the corresponding width and height as scale factors. wx.GraphicsContext/Cairo appear not to respond to this so scaling is removed from transform and width & height are added to the Drawbitmap call.