var searchIndex = {}; searchIndex["pdf"] = {"doc":"A library for creating pdf files.","items":[[3,"FontRef","pdf","A font ready to be used in a TextObject.",null,null],[3,"FontMetrics","","Relevant data that can be loaded from an AFM (Adobe Font Metrics) file.\nA FontMetrics object is specific to a given encoding.",null,null],[3,"Encoding","","Represent a text encoding used in PDF.\nAn encoding maintains the connection between unicode code points,\nbytes in PDF strings, and glyph names.",null,null],[3,"Canvas","","An visual area where content can be drawn (a page).",null,null],[3,"TextObject","","A text object is where text is put on the canvas.",null,null],[3,"Pdf","","The top-level object for writing a PDF.",null,null],[4,"BuiltinFont","","The "Base14" built-in fonts in PDF.\nUnderscores in these names are hyphens in the real names.",null,null],[13,"Courier","","",0,null],[13,"Courier_Bold","","",0,null],[13,"Courier_Oblique","","",0,null],[13,"Courier_BoldOblique","","",0,null],[13,"Helvetica","","",0,null],[13,"Helvetica_Bold","","",0,null],[13,"Helvetica_Oblique","","",0,null],[13,"Helvetica_BoldOblique","","",0,null],[13,"Times_Roman","","",0,null],[13,"Times_Bold","","",0,null],[13,"Times_Italic","","",0,null],[13,"Times_BoldItalic","","",0,null],[13,"Symbol","","",0,null],[13,"ZapfDingbats","","",0,null],[11,"clone","","",0,null],[11,"hash","","",0,null],[11,"eq","","",0,null],[11,"fmt","","",0,null],[11,"write_object","","",0,null],[11,"pdf_name","","",0,null],[11,"get_encoding","","The encoding is WinAnsiEncoding for all builtin fonts except\nSymbol, for wich it is SymbolEncoding.\nTODO: ZapfDingbats should also have a special encoding.",0,null],[11,"get_width","","",0,null],[11,"get_width_raw","","",0,null],[11,"get_metrics","","",0,null],[11,"clone","","",1,null],[11,"hash","","",1,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"fmt","","",1,null],[11,"new","","",1,{"inputs":[{"name":"usize"},{"name":"encoding"},{"name":"arc"}],"output":{"name":"fontref"}}],[11,"get_encoding","","",1,null],[11,"get_width","","Get the width of the given text in this font at given size.",1,null],[11,"get_width_raw","","Get the width of the given text in thousands of unit of text\nspace. This unit is what is used in some places internally in\npdf files and in some methods on a `TextObject`.",1,null],[11,"fmt","","",1,null],[11,"clone","","",2,null],[11,"eq","","",2,null],[11,"ne","","",2,null],[11,"hash","","",2,null],[11,"fmt","","",2,null],[11,"parse","","Create a FontMetrics by reading an .afm file.",2,{"inputs":[{"name":"file"}],"output":{"name":"result"}}],[11,"get_width","","Get the width of a specific character.\nThe character is given in the encoding of the FontMetrics object.",2,null],[11,"clone","","",3,null],[11,"hash","","",3,null],[11,"eq","","",3,null],[11,"ne","","",3,null],[11,"fmt","","",3,null],[11,"get_name","","",3,null],[11,"get_code","","Get the encoded code point from a type1 character name.\nCharacter names are case sensitive and contains only ascii letters.\nIf the name is not available in the encoding, or is not a proper\ncharacter name, None is returned.",3,null],[11,"encode_string","","Convert a rust string to a vector of bytes in the encoding.\n# Example\n````\nuse pdf::{BuiltinFont, FontSource};\nlet enc = BuiltinFont::Helvetica.get_encoding();\nlet symb_enc = BuiltinFont::Symbol.get_encoding();\nassert_eq!(vec!(65, 66, 67), enc.encode_string("ABC"));\nassert_eq!(vec!(82, 228, 107, 115, 109, 246, 114, 103, 229, 115),\n enc.encode_string("Räksmörgås"));\nassert_eq!(vec!(67, 111, 102, 102, 101, 101, 32, 128, 49, 46, 50, 48),\n enc.encode_string("Coffee €1.20"));\nassert_eq!(vec!(97, 32, 206, 32, 194),\n symb_enc.encode_string("α ∈ ℜ"));\n````",3,null],[11,"new","","",4,{"inputs":[{"name":"write"},{"name":"hashmap"},{"name":"vec"}],"output":{"name":"canvas"}}],[11,"rectangle","","Append a closed rectangle with a corern at (x, y) and\nextending width × height to the to the current path.",4,null],[11,"set_line_width","","Set the line width in the graphics state",4,null],[11,"set_stroke_color","","Set rgb color for stroking operations",4,null],[11,"set_fill_color","","Set rgb color for non-stroking operations",4,null],[11,"set_stroke_gray","","Set gray level for stroking operations",4,null],[11,"set_fill_gray","","Set gray level for non-stroking operations",4,null],[11,"line","","Append a straight line from (x1, y1) to (x2, y2) to the current path.",4,null],[11,"move_to","","Begin a new subpath at the point (x, y).",4,null],[11,"line_to","","Add a straight line from the current point to (x, y) to the\ncurrent path.",4,null],[11,"curve_to","","Add an Bézier curve from the current point to (x3, y3) with\n(x1, y1) and (x2, y2) as Bézier controll points.",4,null],[11,"circle","","Add a circle approximated by four cubic Bézier curves to the\ncurrent path. Based on\nhttp://spencermortensen.com/articles/bezier-circle/",4,null],[11,"stroke","","Stroke the current path.",4,null],[11,"fill","","Fill the current path.",4,null],[11,"get_font","","Get a FontRef for a specific font.",4,null],[11,"text","","Create a text object.",4,null],[11,"left_text","","Utility method for placing a string of text.",4,null],[11,"right_text","","Utility method for placing a string of text.",4,null],[11,"center_text","","Utility method for placing a string of text.",4,null],[11,"add_outline","","Add an item for this page in the document outline.",4,null],[11,"new","","",5,{"inputs":[{"name":"write"}],"output":{"name":"textobject"}}],[11,"set_font","","Set the font and font-size to be used by the following text\noperations.",5,null],[11,"set_leading","","Set leading, the vertical distance from a line of text to the next.\nThis is important for the `show_line` method.",5,null],[11,"set_rise","","Set the rise above the baseline for coming text. Calling\nset_rise again with a zero argument will get back to the old\nbaseline.",5,null],[11,"set_char_spacing","","Set the amount of extra space between characters, in 1/1000\ntext unit.",5,null],[11,"set_word_spacing","","Set the amount of extra space between words, in 1/1000\ntext unit.",5,null],[11,"set_stroke_color","","Set rgb color for stroking operations",5,null],[11,"set_fill_color","","Set rgb color for non-stroking operations",5,null],[11,"set_stroke_gray","","Set gray level for stroking operations",5,null],[11,"set_fill_gray","","Set gray level for non-stroking operations",5,null],[11,"pos","","Move text position. The first time `pos` is called in a\nTextObject, (x, y) refers to the same point as for\n`Canvas::move_to`, after that, the point is relative to the\nearlier pos.",5,null],[11,"show","","Show a text.",5,null],[11,"show_j","","",5,null],[11,"show_line","","Show a text as a line. See also `set_leading`.",5,null],[11,"gsave","","Push the graphics state on a stack.",5,null],[11,"grestore","","Pop a graphics state from the `gsave` stack and restore it.",5,null],[8,"FontSource","","This trait is implemented by any kind of font that the pdf library\nsupports.",null,null],[10,"write_object","","",6,null],[10,"pdf_name","","Get the PDF name of this font.\n# Examples\n```\nuse pdf::{BuiltinFont, FontSource};\nassert_eq!("Times-Roman", BuiltinFont::Times_Roman.pdf_name());\n```",6,null],[10,"get_encoding","","",6,null],[10,"get_width","","Get the width of a string in this font at given size.",6,null],[10,"get_width_raw","","Get the width of a string in thousands of unit of text space.\nThis unit is what is used in some places internally in pdf files.",6,null],[10,"get_metrics","","Get the font metrics for font.",6,null],[11,"create","","Create a new PDF document as a new file with given filename.",7,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"new","","Create a new PDF document, writing to `output`.",7,{"inputs":[{"name":"file"}],"output":{"name":"result"}}],[11,"set_title","","Set metadata: the document's title.",7,null],[11,"set_author","","Set metadata: the name of the person who created the document.",7,null],[11,"set_subject","","Set metadata: the subject of the document.",7,null],[11,"set_keywords","","Set metadata: keywords associated with the document.",7,null],[11,"set_creator","","Set metadata: If the document was converted to PDF from another\nformat, the name of the conforming product that created the original\ndocument from which it was converted.",7,null],[11,"set_producer","","Set metadata: If the document was converted to PDF from another\nformat, the name of the conforming product that converted it to PDF.",7,null],[11,"render_page","","Create a new page in the PDF document.",7,null],[11,"finish","","Write out the document trailer.\nThe trailer consists of the pages object, the root object,\nthe xref list, the trailer object and the startxref position.",7,null]],"paths":[[4,"BuiltinFont"],[3,"FontRef"],[3,"FontMetrics"],[3,"Encoding"],[3,"Canvas"],[3,"TextObject"],[8,"FontSource"],[3,"Pdf"]]}; initSearch(searchIndex);