printpdf 0.9.1

Rust library for reading and writing PDF files
Documentation
<!DOCTYPE html>
<html title="Japanese Ramen Recipe">
    <head>
        <style>
            body { font-family: "NotoSansJP", sans-serif; padding: 20mm; }
            h1, h2 { color: #D63031; }
            .section { margin-bottom: 15mm; }
            .ingredients { background: #FFF7E0; padding: 10px; border-radius: 5px; }
            .steps { background: #F1F9FF; padding: 10px; border-radius: 5px; }
            .tip { background: #E8FDF5; padding: 5px; border-radius: 3px; margin-top: 10px; }
            img { border-radius: 5px; }
            table { width: 100%; border-collapse: collapse; }
            td, th { border: 1px solid #ddd; padding: 8px; }
            th { background-color: #f2f2f2; }
        </style>
        
        <header exclude-pages="1">
            <div style="text-align: right; color: #888; font-size: 10px;">
                Japanese Cuisine Recipes - Page <page-number/>
            </div>
            <hr style="color: #ddd;">
        </header>
        
        <footer>
            <hr style="color: #ddd;">
            <div style="text-align: center; color: #888; font-size: 10px;">
                © 2025 Japanese Cuisine Recipes Collection
            </div>
        </footer>
    </head>
    <body>
        <div class="section">
            <h1 style="text-align: center; font-size: 24px;">とんこつラーメン</h1>
            <h2 style="text-align: center; font-size: 18px;">Tonkotsu Ramen</h2>
            
            <div style="text-align: center; margin: 20px 0;">
                <img src="ramen.png" style="width: 80%; max-width: 500px; height: auto;"></img>
            </div>
            
            <p style="text-align: center; font-style: italic;">
                とんこつラーメンは、豚骨を長時間煮込んで作るクリーミーで濃厚なスープが特徴の日本の伝統的な麺料理です。
            </p>
            <p style="text-align: center; font-style: italic;">
                Tonkotsu ramen is a traditional Japanese noodle dish featuring a creamy, rich soup made by simmering pork bones for many hours.
            </p>
        </div>
        
        <div class="section ingredients">
            <h2>材料 (4人分) / Ingredients (Serves 4)</h2>
            <table>
                <tr>
                    <th>日本語 / Japanese</th>
                    <th>英語 / English</th>
                    <th>量 / Amount</th>
                </tr>
                <tr>
                    <td>豚骨</td>
                    <td>Pork Bones</td>
                    <td>1.5 kg</td>
                </tr>
                <tr>
                    <td>ラーメン麺</td>
                    <td>Ramen Noodles</td>
                    <td>4 portions</td>
                </tr>
                <tr>
                    <td>チャーシュー</td>
                    <td>Chashu (Braised Pork Belly)</td>
                    <td>200g</td>
                </tr>
                <tr>
                    <td>味玉</td>
                    <td>Ajitama (Marinated Soft-Boiled Egg)</td>
                    <td>4</td>
                </tr>
                <tr>
                    <td>長ねぎ</td>
                    <td>Green Onions</td>
                    <td>2 stalks</td>
                </tr>
                <tr>
                    <td>もやし</td>
                    <td>Bean Sprouts</td>
                    <td>200g</td>
                </tr>
                <tr>
                    <td>にんにく</td>
                    <td>Garlic</td>
                    <td>4 cloves</td>
                </tr>
                <tr>
                    <td>生姜</td>
                    <td>Ginger</td>
                    <td>30g</td>
                </tr>
                <tr>
                    <td>醤油</td>
                    <td>Soy Sauce</td>
                    <td>100ml</td>
                </tr>
                <tr>
                    <td>みりん</td>
                    <td>Mirin</td>
                    <td>50ml</td>
                </tr>
                <tr>
                    <td>料理酒</td>
                    <td>Cooking Sake</td>
                    <td>50ml</td>
                </tr>
            </table>
        </div>
        
        <div class="section steps">
            <h2>作り方 / Instructions</h2>
            <ol>
                <li>
                    <p><strong>豚骨スープを作る / Prepare the tonkotsu broth</strong></p>
                    <p>豚骨を水で洗い、冷水から鍋に入れて強火で沸騰させます。沸騰したら一度ゆで汁を捨て、豚骨を洗います。</p>
                    <p>Wash the pork bones, place them in a pot with cold water, and bring to a boil over high heat. Once boiling, discard the water and wash the bones.</p>
                </li>
                <li>
                    <p><strong>スープを煮込む / Simmer the broth</strong></p>
                    <p>豚骨と新しい水、にんにく、生姜を鍋に入れ、弱火で8〜12時間煮込みます。途中で水を足して適切な量を維持します。</p>
                    <p>Place the bones in the pot with fresh water, garlic, and ginger. Simmer on low heat for 8-12 hours, adding water as needed to maintain the proper level.</p>
                </li>
                <li>
                    <p><strong>タレを作る / Make the tare (seasoning base)</strong></p>
                    <p>醤油、みりん、料理酒を小鍋に入れて沸騰させ、アルコール分を飛ばします。</p>
                    <p>Combine soy sauce, mirin, and cooking sake in a small pot. Bring to a boil to cook off the alcohol.</p>
                </li>
                <li>
                    <p><strong>麺を茹でる / Cook the noodles</strong></p>
                    <p>ラーメン麺を袋の指示に従って茹でます。通常は2〜3分です。</p>
                    <p>Cook the ramen noodles according to package instructions, typically 2-3 minutes.</p>
                </li>
                <li>
                    <p><strong>ラーメンを組み立てる / Assemble the ramen</strong></p>
                    <p>丼にタレを入れ、スープを注ぎ、麺を入れます。その上にチャーシュー、味玉、長ねぎ、もやしをのせて完成です。</p>
                    <p>Place tare in a bowl, pour in the broth, and add the noodles. Top with chashu, ajitama, green onions, and bean sprouts to serve.</p>
                </li>
            </ol>
            
            <div class="tip">
                <p><strong>ヒント / Tip:</strong> 本格的な豚骨スープを作るには、最低でも8時間、できれば12時間煮込むことをお勧めします。豚骨から十分にコラーゲンとうま味を抽出するために必要です。</p>
                <p>For authentic tonkotsu broth, simmer for at least 8 hours, preferably 12 hours. This is necessary to extract sufficient collagen and umami from the pork bones.</p>
            </div>
        </div>
    </body>
</html>