Quantcast
Channel: Popular recipes
Browsing latest articles
Browse All 20 View Live

Inserting pages into a PDF with PyMuPDF (Python)

Python recipe 580802 by Jorj X. McKie (fitz, mupdf, pdf, text_conversion). Revision 2. Version 1.11.0 of PyMuPDF allows creating new PDF pages, as well as inserting images into existing pages.Here is...

View Article



Tkinter frame with different border sizes (Python)

Python recipe 580798 by Miguel Martínez López (border, size, tkinter). This trick shows how to create a bordered frame with different border size in each side.

View Article

Interactive Mandelbrot Fractal Using HTML5 Canvas (JavaScript)

JavaScript recipe 580804 by FB36 (canvas, fractal, graphics, math). Interactive Mandelbrot Fractal Using HTML5 Canvas.(Download and save as html file and open it.)(Tested only using Firefox browser.)

View Article

How to Create a PDF with a Caustic Drawing (Python)

Python recipe 580806 by Jorj X. McKie (fitz, mupdf, pdf, pymupdf). Just a little demo on how to create simple drawings with PyMuPDF.This script simulates what you see looking into your coffee mug,...

View Article

Tkinter search box (Python)

Python recipe 580773 by Miguel Martínez López (entry, search, searchbox, tkinter). Revision 9. Instead of using two colors for active background and normal background, I use only one color and opacity...

View Article


groupby() For Unsorted Input (Python)

Python recipe 580800 by Alfe (algorithm, datastructures, generators, grouping, lazy). We all know the groupby() which is available in the itertools standard module. This one yields groups of...

View Article

Variable Abbreviations (Python)

Python recipe 580807 by Alfe (abbreviations, contextmanager, variables, with). One sometimes has nice long speaking names vor variables, maybe things like buildingList[foundIndex].height, but would...

View Article

How to handle PDF embedded files with PyMuPDF (Python)

Python recipe 580796 by Jorj X. McKie (embedded_files, fitz, mupdf, pdf, pymupdf). Revision 3. Version 1.11.0 (based on MuPDF v1.11) allows exporting, importing and interrogating files embedded in a...

View Article


Guard against an exception in the wrong place (Python)

Python recipe 580808 by Steven D'Aprano (context, exception, guard, manager). Revision 2. Sometimes exception handling can obscure bugs unless you guard against a particular exception occurring in a...

View Article


Simple multicolumn listbox for tkinter (Python)

Python recipe 580794 by Miguel Martínez López (listbox, multicolumn, table, tkinter). This recipe makes easy to work a treeview widget like a table.It has several options for...

View Article

Create Calendars on PDF with a few lines (Python)

Python recipe 580805 by Jorj X. McKie (calendar, fitz, mupdf, pdf, pymupdf). Revision 2. PyMuPDF (fitz) provides easy to use ways to create PDF documents out of simple texts.An example is the text...

View Article

Inserting Images on PDF Pages (Python)

Python recipe 580803 by Jorj X. McKie (fitz, mupdf, pdf, pymupdf). Version 1.11.0 of PyMuPDF allows putting an image on an existing PDF page. The following example puts the same image on every page of...

View Article

Tkinter table with scrollbars (Python)

Python recipe 580793 by Miguel Martínez López (scrollbars, table, tkinter). Revision 13. I created here a tkinter table with scrollbar support. I use one of my other recipes for the mousewheel support...

View Article


Implementing class-based callbacks in Python (Python)

Python recipe 580788 by Vasudev Ram (callbacks, classes, functions, methods, objects, programming, python). This is a follow-on to this recently posted recipe:Implementing function-based callbacks in...

View Article

Implementing function-based callbacks in Python (Python)

Python recipe 580787 by Vasudev Ram (callback, function, functions, python, techniques). This recipe shows a simple way of implementing callbacks in Python. There are a few ways this can be done. The...

View Article


How to create a simple PDF Pie Chart using fitz / PyMuPDF (Python)

Python recipe 580810 by Jorj X. McKie (fitz, pdf_generation). PyMuPDF now supports drawing pie charts on a PDF page.Important parameters for the function are center of the circle, one of the two arc's...

View Article

Shoelace Formula for polygonal area (Python)

Python recipe 580812 by Paddy McCarthy (2d, area). Copied, by author from "Paddy3118 Go deh!: Python investigation of the Shoelace Formula for polygonal area...

View Article


Insert a Text Box in a PDF page (fitz / PyMuPDF) (Python)

Python recipe 580809 by Jorj X. McKie (fitz, mupdf, pdf, textbox). This method inserts text into a predefined rectangular area of a (new or existing) PDF page. Words are distributed across the...

View Article

Frame with border color for Tkinter (Python)

Python recipe 580735 by Miguel Martínez López (border, color, frame, tkinter). This trick show how to add a border color to frame. These are the important configurations: highlightbackground="your...

View Article

Uno (Text-Based) (Python)

Python recipe 580811 by Brandon Martin (artificial_intelligence, cards, game, text_game, uno). A text based recreation of the classic card game featuring functional AIs to play with. Some rules have...

View Article
Browsing latest articles
Browse All 20 View Live




Latest Images