//+------------------------------------------------------------------+
//|                                                   PdfDefines.mqh |
//|                                Copyright 2026, Sandro Begashvili |
//|                    https://www.mql5.com/en/users/sandrobegashvil |
//|                           Telegram: https://t.me/MrMQL5Developer |
//|                          Building a PDF Creation Library in MQL5 |
//|                                                                  |
//|                                                                  |
//|   Constants shared by every file in the library. Nothing here ha |
//|   behavior; if a value needs a decision made about it, it belong |
//|   in the class that uses it.                                     |
//+------------------------------------------------------------------+
#ifndef PDF5_DEFINES_MQH
#define PDF5_DEFINES_MQH

//--- The version written into the header. 1.4 is old enough that every
//--- viewer accepts it and new enough for everything this series does
//--- before compressed cross-reference streams appear much later.
#define PDF_VERSION            "1.4"

//--- Line ending. One byte, everywhere, in every file the library
//--- writes. The format permits CR, LF or CRLF, but every byte offset
//--- we compute depends on knowing which one is in use, so the choice
//--- is made once here and never made again.
#define PDF_NL                 "\n"

//--- Page sizes in points, where one point is 1/72 inch. A4 is
//--- 210 x 297 millimeters, which is 595.276 x 841.890 points. Part 4
//--- introduces fractional sizes and a millimeter helper; Part 3 keeps
//--- the rounded values Part 1 typed by hand.
#define PDF_A4_WIDTH           595
#define PDF_A4_HEIGHT          842
#define PDF_LETTER_WIDTH       612
#define PDF_LETTER_HEIGHT      792

//--- How many bytes the buffer asks for when it first needs memory, and
//--- the smallest amount it grows by afterwards. Both are guesses tuned
//--- to a one-page document; a long report reaches the doubling path
//--- within a few writes either way.
#define PDF_BUFFER_INITIAL     8192
#define PDF_BUFFER_MIN_GROWTH  8192

//--- The generation number written for every object. A file produced in
//--- one pass never reuses an object number, so this is always zero.
#define PDF_GENERATION         0

//--- The writer stops before this number, so the largest object id it
//--- hands out is PDF_MAX_OBJECTS - 1. A long report uses a few thousand;
//--- the limit exists so that a runaway loop fails with a message instead
//--- of exhausting memory.
#define PDF_MAX_OBJECTS        65536

#endif // PDF5_DEFINES_MQH
//+-------------------------------------------------------------------+
