| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244 |
- /**
- This file was auto-generated by mupdfwrap.py.
- */
- #ifndef MUPDF_CLASSES2_H
- #define MUPDF_CLASSES2_H
- #include "classes.h"
- namespace mupdf
- {
- /** Class-aware wrapper for `::fz_aa_level()`. */
- /**
- Get the number of bits of antialiasing we are
- using (for graphics). Between 0 and 8.
- */
- FZ_FUNCTION int fz_aa_level();
- /** Class-aware wrapper for `::fz_abs()`. */
- /**
- Some standard math functions, done as static inlines for speed.
- People with compilers that do not adequately implement inline
- may like to reimplement these using macros.
- */
- FZ_FUNCTION float fz_abs(float f);
- /** Class-aware wrapper for `::fz_absi()`. */
- FZ_FUNCTION int fz_absi(int i);
- /** Class-aware wrapper for `::fz_add_layout_char()`. */
- /**
- Add a new char to the line at the end of the layout block.
- */
- FZ_FUNCTION void fz_add_layout_char(const FzLayoutBlock& block, float x, float w, const char *p);
- /** Class-aware wrapper for `::fz_add_layout_line()`. */
- /**
- Add a new line to the end of the layout block.
- */
- FZ_FUNCTION void fz_add_layout_line(const FzLayoutBlock& block, float x, float y, float h, const char *p);
- /** Class-aware wrapper for `::fz_add_separation()`. */
- /**
- Add a separation (null terminated name, colorspace)
- */
- FZ_FUNCTION void fz_add_separation(const FzSeparations& sep, const char *name, const FzColorspace& cs, int cs_channel);
- /** Class-aware wrapper for `::fz_add_separation_equivalents()`. */
- /**
- Add a separation with equivalents (null terminated name,
- colorspace)
-
- (old, deprecated)
- */
- FZ_FUNCTION void fz_add_separation_equivalents(const FzSeparations& sep, uint32_t rgba, uint32_t cmyk, const char *name);
- /** Class-aware wrapper for `::fz_adjust_rect_for_stroke()`. */
- /**
- Given a rectangle (assumed to be the bounding box for a path),
- expand it to allow for the expansion of the bbox that would be
- seen by stroking the path with the given stroke state and
- transform.
- */
- FZ_FUNCTION FzRect fz_adjust_rect_for_stroke(const FzRect& rect, const FzStrokeState& stroke, const FzMatrix& ctm);
- /** Class-aware wrapper for `::fz_advance_glyph()`. */
- /**
- Return the advance for a given glyph.
-
- font: The font to look for the glyph in.
-
- glyph: The glyph to find the advance for.
-
- wmode: 1 for vertical mode, 0 for horizontal.
-
- Returns the advance for the glyph.
- */
- FZ_FUNCTION float fz_advance_glyph(const FzFont& font, int glyph, int wmode);
- /** Class-aware wrapper for `::fz_aes_crypt_cbc()`. */
- /**
- AES block processing. Encrypts or Decrypts (according to mode,
- which must match what was initially set up) length bytes (which
- must be a multiple of 16), using (and modifying) the insertion
- vector iv, reading from input, and writing to output.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_aes_crypt_cbc(const FzAes& ctx, int mode, size_t length, unsigned char iv[16], const unsigned char *input, unsigned char *output);
- /** Class-aware wrapper for `::fz_aes_setkey_dec()`. */
- /**
- AES decryption initialization. Fills in the supplied context
- and prepares for decryption using the given key.
-
- Returns non-zero for error (key size other than 128/192/256).
-
- Never throws an exception.
- */
- FZ_FUNCTION int fz_aes_setkey_dec(const FzAes& ctx, const unsigned char *key, int keysize);
- /** Class-aware wrapper for `::fz_aes_setkey_enc()`. */
- /**
- AES encryption initialization. Fills in the supplied context
- and prepares for encryption using the given key.
-
- Returns non-zero for error (key size other than 128/192/256).
-
- Never throws an exception.
- */
- FZ_FUNCTION int fz_aes_setkey_enc(const FzAes& ctx, const unsigned char *key, int keysize);
- /** Class-aware wrapper for `::fz_alpha_from_gray()`. */
- FZ_FUNCTION FzPixmap fz_alpha_from_gray(const FzPixmap& gray);
- /** Class-aware wrapper for `::fz_append_base64()`. */
- /**
- Write a base64 encoded data block, optionally with periodic newlines.
- */
- FZ_FUNCTION void fz_append_base64(const FzBuffer& out, const unsigned char *data, size_t size, int newline);
- /** Class-aware wrapper for `::fz_append_base64_buffer()`. */
- /**
- Append a base64 encoded fz_buffer, optionally with periodic newlines.
- */
- FZ_FUNCTION void fz_append_base64_buffer(const FzBuffer& out, const FzBuffer& data, int newline);
- /** Class-aware wrapper for `::fz_append_bits()`. */
- FZ_FUNCTION void fz_append_bits(const FzBuffer& buf, int value, int count);
- /** Class-aware wrapper for `::fz_append_bits_pad()`. */
- FZ_FUNCTION void fz_append_bits_pad(const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_append_buffer()`. */
- /**
- Append the contents of the source buffer onto the end of the
- destination buffer, extending automatically as required.
-
- Ownership of buffers does not change.
- */
- FZ_FUNCTION void fz_append_buffer(const FzBuffer& destination, const FzBuffer& source);
- /** Class-aware wrapper for `::fz_append_byte()`. */
- FZ_FUNCTION void fz_append_byte(const FzBuffer& buf, int c);
- /** Class-aware wrapper for `::fz_append_data()`. */
- /**
- fz_append_*: Append data to a buffer.
-
- The buffer will automatically grow as required.
- */
- FZ_FUNCTION void fz_append_data(const FzBuffer& buf, const void *data, size_t len);
- /** Class-aware wrapper for `::fz_append_image_as_data_uri()`. */
- FZ_FUNCTION void fz_append_image_as_data_uri(const FzBuffer& out, const FzImage& image);
- /** Class-aware wrapper for `::fz_append_int16_be()`. */
- FZ_FUNCTION void fz_append_int16_be(const FzBuffer& buf, int x);
- /** Class-aware wrapper for `::fz_append_int16_le()`. */
- FZ_FUNCTION void fz_append_int16_le(const FzBuffer& buf, int x);
- /** Class-aware wrapper for `::fz_append_int32_be()`. */
- FZ_FUNCTION void fz_append_int32_be(const FzBuffer& buf, int x);
- /** Class-aware wrapper for `::fz_append_int32_le()`. */
- FZ_FUNCTION void fz_append_int32_le(const FzBuffer& buf, int x);
- /** Class-aware wrapper for `::fz_append_json()`. */
- FZ_FUNCTION void fz_append_json(const FzBuffer& buf, const FzJson& value);
- /** Class-aware wrapper for `::fz_append_pdf_string()`. */
- /**
- fz_append_pdf_string: Append a string with PDF syntax quotes and
- escapes.
-
- The buffer will automatically grow as required.
- */
- FZ_FUNCTION void fz_append_pdf_string(const FzBuffer& buffer, const char *text);
- /** Class-aware wrapper for `::fz_append_pixmap_as_data_uri()`. */
- FZ_FUNCTION void fz_append_pixmap_as_data_uri(const FzBuffer& out, const FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_append_rune()`. */
- FZ_FUNCTION void fz_append_rune(const FzBuffer& buf, int c);
- /** Class-aware wrapper for `::fz_append_string()`. */
- FZ_FUNCTION void fz_append_string(const FzBuffer& buf, const char *data);
- /** Class-aware wrapper for `::fz_append_vprintf()`. */
- /**
- fz_append_vprintf: Format and append data to buffer using
- printf-like formatting with varargs (see fz_vsnprintf).
- */
- FZ_FUNCTION void fz_append_vprintf(const FzBuffer& buffer, const char *fmt, va_list args);
- /** Class-aware wrapper for `::fz_arc4_encrypt()`. */
- /**
- RC4 block encrypt operation; encrypt src into dst (both of
- length len) updating the RC4 state as we go.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_arc4_encrypt(const FzArc4& state, unsigned char *dest, const unsigned char *src, size_t len);
- /** Class-aware wrapper for `::fz_arc4_final()`. */
- /**
- RC4 finalization. Zero the context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_arc4_final(const FzArc4& state);
- /** Class-aware wrapper for `::fz_arc4_init()`. */
- /**
- RC4 initialization. Begins an RC4 operation, writing a new
- context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_arc4_init(const FzArc4& state, const unsigned char *key, size_t len);
- /** Class-aware wrapper for `::fz_archive_format()`. */
- /**
- Return a pointer to a string describing the format of the
- archive.
-
- The lifetime of the string is unspecified (in current
- implementations the string will persist until the archive
- is closed, but this is not guaranteed).
- */
- FZ_FUNCTION const char *fz_archive_format(const FzArchive& arch);
- /** Class-aware wrapper for `::fz_atof()`. */
- /**
- Range checking atof
- */
- FZ_FUNCTION float fz_atof(const char *s);
- /** Class-aware wrapper for `::fz_atoi()`. */
- /**
- atoi that copes with NULL
- */
- FZ_FUNCTION int fz_atoi(const char *s);
- /** Class-aware wrapper for `::fz_atoi64()`. */
- /**
- 64bit atoi that copes with NULL
- */
- FZ_FUNCTION int64_t fz_atoi64(const char *s);
- /** Class-aware wrapper for `::fz_atoz()`. */
- /**
- size_t atoi that copes with NULL.
-
- NOTE: limited to 63bits. Negative numbers
- are returned as 0.
- */
- FZ_FUNCTION size_t fz_atoz(const char *s);
- /** Class-aware wrapper for `::fz_authenticate_password()`. */
- /**
- Test if the given password can decrypt the document.
-
- password: The password string to be checked. Some document
- specifications do not specify any particular text encoding, so
- neither do we.
-
- Returns 0 for failure to authenticate, non-zero for success.
-
- For PDF documents, further information can be given by examining
- the bits in the return code.
-
- Bit 0 => No password required
- Bit 1 => User password authenticated
- Bit 2 => Owner password authenticated
- */
- FZ_FUNCTION int fz_authenticate_password(const FzDocument& doc, const char *password);
- /** Class-aware wrapper for `::fz_autowarp_pixmap()`. */
- FZ_FUNCTION FzPixmap fz_autowarp_pixmap(const FzPixmap& src, const FzQuad& points);
- /** Class-aware wrapper for `::fz_available()`. */
- /**
- Ask how many bytes are available immediately from
- a given stream.
-
- stm: The stream to read from.
-
- max: A hint for the underlying stream; the maximum number of
- bytes that we are sure we will want to read. If you do not know
- this number, give 1.
-
- Returns the number of bytes immediately available between the
- read and write pointers. This number is guaranteed only to be 0
- if we have hit EOF. The number of bytes returned here need have
- no relation to max (could be larger, could be smaller).
- */
- FZ_FUNCTION size_t fz_available(const FzStream& stm, size_t max);
- /** Class-aware wrapper for `::fz_barcode_type_from_string()`. */
- /**
- Helper function to search the above list (case insensitively)
- for an exact match. Returns FZ_BARCODE_NONE if no match found.
- */
- FZ_FUNCTION ::fz_barcode_type fz_barcode_type_from_string(const char *str);
- /** Class-aware wrapper for `::fz_base_colorspace()`. */
- /**
- Get the 'base' colorspace for a colorspace.
-
- For indexed colorspaces, this is the colorspace the index
- decodes into. For all other colorspaces, it is the colorspace
- itself.
-
- The returned colorspace is 'borrowed' (i.e. no additional
- references are taken or dropped).
- */
- FZ_FUNCTION FzColorspace fz_base_colorspace(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_basename()`. */
- /**
- Find the filename component in a path.
- */
- FZ_FUNCTION const char *fz_basename(const char *path);
- /** Class-aware wrapper for `::fz_begin_group()`. */
- FZ_FUNCTION void fz_begin_group(const FzDevice& dev, const FzRect& area, const FzColorspace& cs, int isolated, int knockout, int blendmode, float alpha);
- /** Class-aware wrapper for `::fz_begin_layer()`. */
- FZ_FUNCTION void fz_begin_layer(const FzDevice& dev, const char *layer_name);
- /** Class-aware wrapper for `::fz_begin_mask()`. */
- FZ_FUNCTION void fz_begin_mask(const FzDevice& dev, const FzRect& area, int luminosity, const FzColorspace& colorspace, const float *bc, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_begin_metatext()`. */
- FZ_FUNCTION void fz_begin_metatext(const FzDevice& dev, ::fz_metatext meta, const char *text);
- /** Class-aware wrapper for `::fz_begin_page()`. */
- /**
- Called to start the process of writing a page to
- a document.
-
- mediabox: page size rectangle in points.
-
- Returns a borrowed fz_device to write page contents to. This
- should be kept if required, and only dropped if it was kept.
- */
- FZ_FUNCTION FzDevice fz_begin_page(const FzDocumentWriter& wri, const FzRect& mediabox);
- /** Class-aware wrapper for `::fz_begin_structure()`. */
- FZ_FUNCTION void fz_begin_structure(const FzDevice& dev, ::fz_structure standard, const char *raw, int idx);
- /** Class-aware wrapper for `::fz_begin_tile()`. */
- FZ_FUNCTION void fz_begin_tile(const FzDevice& dev, const FzRect& area, const FzRect& view, float xstep, float ystep, const FzMatrix& ctm);
- /** Class-aware wrapper for `::fz_begin_tile_id()`. */
- FZ_FUNCTION int fz_begin_tile_id(const FzDevice& dev, const FzRect& area, const FzRect& view, float xstep, float ystep, const FzMatrix& ctm, int id);
- /** Class-aware wrapper for `::fz_begin_tile_tid()`. */
- FZ_FUNCTION int fz_begin_tile_tid(const FzDevice& dev, const FzRect& area, const FzRect& view, float xstep, float ystep, const FzMatrix& ctm, int id, int doc_id);
- /** Class-aware wrapper for `::fz_bidi_fragment_text()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_bidi_fragment_text(const uint32_t *text, size_t textlen, ::fz_bidi_fragment_fn *callback, void *arg, int flags)` => ::fz_bidi_direction baseDir
- */
- /**
- Partitions the given Unicode sequence into one or more
- unidirectional fragments and invokes the given callback
- function for each fragment.
-
- For example, if directionality of text is:
- 0123456789
- rrlllrrrrr,
- we'll invoke callback with:
- &text[0], length == 2
- &text[2], length == 3
- &text[5], length == 5
-
- @param[in] text start of Unicode sequence
- @param[in] textlen number of Unicodes to analyse
- @param[in] baseDir direction of paragraph (specify FZ_BIDI_NEUTRAL to force auto-detection)
- @param[in] callback function to be called for each fragment
- @param[in] arg data to be passed to the callback function
- @param[in] flags flags to control operation (see fz_bidi_flags above)
- */
- FZ_FUNCTION void fz_bidi_fragment_text(const uint32_t *text, size_t textlen, ::fz_bidi_direction *baseDir, ::fz_bidi_fragment_fn *callback, void *arg, int flags);
- /** Class-aware wrapper for `::fz_bitmap_details()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_bitmap_details(::fz_bitmap *bitmap)` => `(int w, int h, int n, int stride)`
- */
- /**
- Retrieve details of a given bitmap.
-
- bitmap: The bitmap to query.
-
- w: Pointer to storage to retrieve width (or NULL).
-
- h: Pointer to storage to retrieve height (or NULL).
-
- n: Pointer to storage to retrieve number of color components (or
- NULL).
-
- stride: Pointer to storage to retrieve bitmap stride (or NULL).
- */
- FZ_FUNCTION void fz_bitmap_details(const FzBitmap& bitmap, int *w, int *h, int *n, int *stride);
- /** Class-aware wrapper for `::fz_blendmode_name()`. */
- /**
- Map from enumeration to blend mode string.
-
- The string is static, with arbitrary lifespan.
- */
- FZ_FUNCTION const char *fz_blendmode_name(int blendmode);
- /** Class-aware wrapper for `::fz_bound_display_list()`. */
- /**
- Return the bounding box of the page recorded in a display list.
- */
- FZ_FUNCTION FzRect fz_bound_display_list(const FzDisplayList& list);
- /** Class-aware wrapper for `::fz_bound_glyph()`. */
- /**
- Return a bbox for a given glyph in a font.
-
- font: The font to look for the glyph in.
-
- gid: The glyph to bound.
-
- trm: The matrix to apply to the glyph before bounding.
-
- Returns rectangle by value containing the bounds of the given
- glyph.
- */
- FZ_FUNCTION FzRect fz_bound_glyph(const FzFont& font, int gid, const FzMatrix& trm);
- /** Class-aware wrapper for `::fz_bound_page()`. */
- /**
- Determine the size of a page at 72 dpi.
- */
- FZ_FUNCTION FzRect fz_bound_page(const FzPage& page);
- /** Class-aware wrapper for `::fz_bound_page_box()`. */
- FZ_FUNCTION FzRect fz_bound_page_box(const FzPage& page, ::fz_box_type box);
- /** Class-aware wrapper for `::fz_bound_path()`. */
- /**
- Return a bounding rectangle for a path.
-
- path: The path to bound.
-
- stroke: If NULL, the bounding rectangle given is for
- the filled path. If non-NULL the bounding rectangle
- given is for the path stroked with the given attributes.
-
- ctm: The matrix to apply to the path during stroking.
-
- r: Pointer to a fz_rect which will be used to hold
- the result.
-
- Returns r, updated to contain the bounding rectangle.
- */
- FZ_FUNCTION FzRect fz_bound_path(const FzPath& path, const FzStrokeState& stroke, const FzMatrix& ctm);
- /** Class-aware wrapper for `::fz_bound_shade()`. */
- /**
- Bound a given shading.
-
- shade: The shade to bound.
-
- ctm: The transform to apply to the shade before bounding.
-
- r: Pointer to storage to put the bounds in.
-
- Returns r, updated to contain the bounds for the shading.
- */
- FZ_FUNCTION FzRect fz_bound_shade(const FzShade& shade, const FzMatrix& ctm);
- /** Class-aware wrapper for `::fz_bound_text()`. */
- /**
- Find the bounds of a given text object.
-
- text: The text object to find the bounds of.
-
- stroke: Pointer to the stroke attributes (for stroked
- text), or NULL (for filled text).
-
- ctm: The matrix in use.
-
- r: pointer to storage for the bounds.
-
- Returns a pointer to r, which is updated to contain the
- bounding box for the text object.
- */
- FZ_FUNCTION FzRect fz_bound_text(const FzText& text, const FzStrokeState& stroke, const FzMatrix& ctm);
- /** Class-aware wrapper for `::fz_box_type_from_string()`. */
- FZ_FUNCTION ::fz_box_type fz_box_type_from_string(const char *name);
- /** Class-aware wrapper for `::fz_brotli_bound()`. */
- /**
- Returns the upper bound on the
- size of brotli compressed data of length size.
- */
- FZ_FUNCTION size_t fz_brotli_bound(size_t size);
- /** Class-aware wrapper for `::fz_buffer_extract()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_buffer_extract(::fz_buffer *buf)` => `(size_t, unsigned char *data)`
- */
- /**
- Take ownership of buffer contents.
-
- Performs the same task as fz_buffer_storage, but ownership of
- the data buffer returns with this call. The buffer is left
- empty.
-
- Note: Bad things may happen if this is called on a buffer with
- multiple references that is being used from multiple threads.
-
- data: Pointer to place to retrieve data pointer.
-
- Returns length of stream.
- */
- FZ_FUNCTION size_t fz_buffer_extract(const FzBuffer& buf, unsigned char **data);
- /** Class-aware wrapper for `::fz_buffer_storage()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_buffer_storage(::fz_buffer *buf)` => `(size_t, unsigned char *datap)`
- */
- /**
- Retrieve internal memory of buffer.
-
- datap: Output parameter that will be pointed to the data.
-
- Returns the current size of the data in bytes.
- */
- FZ_FUNCTION size_t fz_buffer_storage(const FzBuffer& buf, unsigned char **datap);
- /** Class-aware wrapper for `::fz_calculate_font_ascender_descender()`. */
- /**
- Ensure that a font has its ascender/descender values calculated
- from the actual bbox of the glyphs.
-
- Note, that we combine the declared values from the font (or the
- default values if those are not present) with the actual bbox to
- get the final result. So this can only cause ascender/descender
- to move further apart!
- */
- FZ_FUNCTION void fz_calculate_font_ascender_descender(const FzFont& font);
- /** Class-aware wrapper for `::fz_calloc()`. */
- /**
- Allocate array of memory of count entries of size bytes.
- Clears the memory to zero.
-
- Throws exception in the event of failure to allocate.
- */
- FZ_FUNCTION void *fz_calloc(size_t count, size_t size);
- /** Class-aware wrapper for `::fz_calloc_no_throw()`. */
- /**
- fz_calloc equivalent that returns NULL rather than throwing
- exceptions.
- */
- FZ_FUNCTION void *fz_calloc_no_throw(size_t count, size_t size);
- /** Class-aware wrapper for `::fz_caught()`. */
- /**
- Within an fz_catch() block, retrieve the error code for
- the current exception.
-
- This assumes no intervening use of fz_try/fz_catch.
- */
- FZ_FUNCTION int fz_caught();
- /** Class-aware wrapper for `::fz_caught_errno()`. */
- FZ_FUNCTION int fz_caught_errno();
- /** Class-aware wrapper for `::fz_caught_message()`. */
- /**
- Within an fz_catch() block, retrieve the formatted message
- string for the current exception.
-
- This assumes no intervening use of fz_try/fz_catch.
- */
- FZ_FUNCTION const char *fz_caught_message();
- /** Class-aware wrapper for `::fz_chartorune()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_chartorune(const char *str)` => `(int, int rune)`
- */
- /**
- UTF8 decode a single rune from a sequence of chars.
-
- rune: Pointer to an int to assign the decoded 'rune' to.
- (0xFFFD on error).
-
- str: Pointer to a UTF8 encoded string.
-
- Returns the number of bytes consumed.
- */
- FZ_FUNCTION int fz_chartorune(int *rune, const char *str);
- /** Class-aware wrapper for `::fz_chartorunen()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_chartorunen(const char *str, size_t n)` => `(int, int rune)`
- */
- /**
- UTF8 decode a single rune from a sequence of chars
- of given length.
-
- rune: Pointer to an int to assign the decoded 'rune' to.
- (0xFFFD on error).
-
- str: Pointer to a UTF8 encoded string.
-
- n: The number of bytes available at str.
-
- Returns the number of bytes consumed.
- */
- FZ_FUNCTION int fz_chartorunen(int *rune, const char *str, size_t n);
- /** Class-aware wrapper for `::fz_clamp()`. */
- FZ_FUNCTION float fz_clamp(float x, float min, float max);
- /** Class-aware wrapper for `::fz_clamp64()`. */
- FZ_FUNCTION int64_t fz_clamp64(int64_t x, int64_t min, int64_t max);
- /** Class-aware wrapper for `::fz_clamp_color()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_clamp_color(::fz_colorspace *cs, const float *in)` => float out
- */
- /**
- Clamp the samples in a color to the correct ranges for a
- given colorspace.
- */
- FZ_FUNCTION void fz_clamp_color(const FzColorspace& cs, const float *in, float *out);
- /** Class-aware wrapper for `::fz_clamp_location()`. */
- /**
- Clamps a location into valid chapter/page range. (First clamps
- the chapter into range, then the page into range).
- */
- FZ_FUNCTION FzLocation fz_clamp_location(const FzDocument& doc, const FzLocation& loc);
- /** Class-aware wrapper for `::fz_clampd()`. */
- FZ_FUNCTION double fz_clampd(double x, double min, double max);
- /** Class-aware wrapper for `::fz_clampi()`. */
- FZ_FUNCTION int fz_clampi(int x, int min, int max);
- /** Class-aware wrapper for `::fz_clampp()`. */
- FZ_FUNCTION void *fz_clampp(void *x, void *min, void *max);
- /** Class-aware wrapper for `::fz_classify_stext_rect()`. */
- FZ_FUNCTION void fz_classify_stext_rect(const FzStextPage& page, ::fz_structure classification, const FzRect& rect);
- /** Class-aware wrapper for `::fz_cleanname()`. */
- /**
- rewrite path to the shortest string that names the same path.
-
- Eliminates multiple and trailing slashes, interprets "." and
- "..". Overwrites the string in place.
- */
- FZ_FUNCTION char *fz_cleanname(char *name);
- /** Class-aware wrapper for `::fz_cleanname_strdup()`. */
- /**
- rewrite path to the shortest string that names the same path.
-
- Eliminates multiple and trailing slashes, interprets "." and
- "..". Allocates a new string that the caller must free.
- */
- FZ_FUNCTION char *fz_cleanname_strdup(const char *name);
- /** Class-aware wrapper for `::fz_clear_bitmap()`. */
- /**
- Set the entire bitmap to 0.
-
- Never throws exceptions.
- */
- FZ_FUNCTION void fz_clear_bitmap(const FzBitmap& bit);
- /** Class-aware wrapper for `::fz_clear_buffer()`. */
- /**
- Empties the buffer. Storage is not freed, but is held ready
- to be reused as the buffer is refilled.
-
- Never throws exceptions.
- */
- FZ_FUNCTION void fz_clear_buffer(const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_clear_pixmap()`. */
- /**
- Sets all components (including alpha) of
- all pixels in a pixmap to 0.
-
- pix: The pixmap to clear.
- */
- FZ_FUNCTION void fz_clear_pixmap(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_clear_pixmap_rect_with_value()`. */
- /**
- Clears a subrect of a pixmap with the given value.
-
- pix: The pixmap to clear.
-
- value: Values in the range 0 to 255 are valid. Each component
- sample for each pixel in the pixmap will be set to this value,
- while alpha will always be set to 255 (non-transparent).
-
- r: the rectangle.
- */
- FZ_FUNCTION void fz_clear_pixmap_rect_with_value(const FzPixmap& pix, int value, const FzIrect& r);
- /** Class-aware wrapper for `::fz_clear_pixmap_with_value()`. */
- /**
- Clears a pixmap with the given value.
-
- pix: The pixmap to clear.
-
- value: Values in the range 0 to 255 are valid. Each component
- sample for each pixel in the pixmap will be set to this value,
- while alpha will always be set to 255 (non-transparent).
-
- This function is horrible, and should be removed from the
- API and replaced with a less magic one.
- */
- FZ_FUNCTION void fz_clear_pixmap_with_value(const FzPixmap& pix, int value);
- /** Class-aware wrapper for `::fz_clip_image_mask()`. */
- FZ_FUNCTION void fz_clip_image_mask(const FzDevice& dev, const FzImage& image, const FzMatrix& ctm, const FzRect& scissor);
- /** Class-aware wrapper for `::fz_clip_path()`. */
- FZ_FUNCTION void fz_clip_path(const FzDevice& dev, const FzPath& path, int even_odd, const FzMatrix& ctm, const FzRect& scissor);
- /** Class-aware wrapper for `::fz_clip_stroke_path()`. */
- FZ_FUNCTION void fz_clip_stroke_path(const FzDevice& dev, const FzPath& path, const FzStrokeState& stroke, const FzMatrix& ctm, const FzRect& scissor);
- /** Class-aware wrapper for `::fz_clip_stroke_text()`. */
- FZ_FUNCTION void fz_clip_stroke_text(const FzDevice& dev, const FzText& text, const FzStrokeState& stroke, const FzMatrix& ctm, const FzRect& scissor);
- /** Class-aware wrapper for `::fz_clip_text()`. */
- FZ_FUNCTION void fz_clip_text(const FzDevice& dev, const FzText& text, const FzMatrix& ctm, const FzRect& scissor);
- /** Class-aware wrapper for `::fz_clone_buffer()`. */
- /**
- Make a new buffer, containing a copy of the data used in
- the original.
- */
- FZ_FUNCTION FzBuffer fz_clone_buffer(const FzBuffer& buf);
- /* Class-aware wrapper for `fz_clone_context()`
- is not available because returned wrapper class for `fz_context`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_clone_default_colorspaces()`. */
- /**
- Returns a reference to a newly cloned default colorspaces
- structure.
-
- The new clone may safely be altered without fear of race
- conditions as the caller is the only reference holder.
- */
- FZ_FUNCTION FzDefaultColorspaces fz_clone_default_colorspaces(const FzDefaultColorspaces& base);
- /** Class-aware wrapper for `::fz_clone_path()`. */
- /**
- Clone the data for a path.
-
- This is used in preference to fz_keep_path when a whole
- new copy of a path is required, rather than just a shared
- pointer. This probably indicates that the path is about to
- be modified.
-
- path: path to clone.
-
- Throws exceptions on failure to allocate.
- */
- FZ_FUNCTION FzPath fz_clone_path(const FzPath& path);
- /** Class-aware wrapper for `::fz_clone_pixmap()`. */
- /**
- Clone a pixmap, copying the pixels and associated data to new
- storage.
-
- The reference count of 'old' is unchanged.
- */
- FZ_FUNCTION FzPixmap fz_clone_pixmap(const FzPixmap& old);
- /** Class-aware wrapper for `::fz_clone_pixmap_area_with_different_seps()`. */
- FZ_FUNCTION FzPixmap fz_clone_pixmap_area_with_different_seps(const FzPixmap& src, FzIrect& bbox, const FzColorspace& dcs, const FzSeparations& seps, const FzColorParams& color_params, const FzDefaultColorspaces& default_cs);
- /** Class-aware wrapper for `::fz_clone_separations_for_overprint()`. */
- /**
- Return a separations object with all the spots in the input
- separations object that are set to composite, reset to be
- enabled. If there ARE no spots in the object, this returns
- NULL. If the object already has all its spots enabled, then
- just returns another handle on the same object.
- */
- FZ_FUNCTION FzSeparations fz_clone_separations_for_overprint(const FzSeparations& seps);
- /** Class-aware wrapper for `::fz_clone_stroke_state()`. */
- /**
- Create an identical stroke_state structure and return a
- reference to it.
-
- stroke: The stroke state reference to clone.
-
- Exceptions may be thrown in the event of a failure to
- allocate.
- */
- FZ_FUNCTION FzStrokeState fz_clone_stroke_state(const FzStrokeState& stroke);
- /** Class-aware wrapper for `::fz_close_band_writer()`. */
- /**
- Finishes up the output and closes the band writer. After this
- call no more headers or bands may be written.
- */
- FZ_FUNCTION void fz_close_band_writer(const FzBandWriter& writer);
- /** Class-aware wrapper for `::fz_close_device()`. */
- /**
- Signal the end of input, and flush any buffered output.
- This is NOT called implicitly on fz_drop_device. This
- may throw exceptions.
- */
- FZ_FUNCTION void fz_close_device(const FzDevice& dev);
- /** Class-aware wrapper for `::fz_close_document_writer()`. */
- /**
- Called to end the process of writing
- pages to a document.
-
- This writes any file level trailers required. After this
- completes successfully the file is up to date and complete.
- */
- FZ_FUNCTION void fz_close_document_writer(const FzDocumentWriter& wri);
- /** Class-aware wrapper for `::fz_close_output()`. */
- /**
- Flush pending output and close an output stream.
- */
- FZ_FUNCTION void fz_close_output(const FzOutput& arg_0);
- /** Class-aware wrapper for `::fz_close_zip_writer()`. */
- /**
- Close the zip file for writing.
-
- This flushes any pending data to the file. This can throw
- exceptions.
- */
- FZ_FUNCTION void fz_close_zip_writer(const FzZipWriter& zip);
- /** Class-aware wrapper for `::fz_closepath()`. */
- /**
- Close the current subpath.
-
- path: The path to modify.
-
- Throws exceptions on failure to allocate, attempting to modify
- a packed path, and illegal path closes (i.e. closing a non open
- path).
- */
- FZ_FUNCTION void fz_closepath(const FzPath& path);
- /** Class-aware wrapper for `::fz_colorspace_colorant()`. */
- /**
- Retrieve a the name for a colorant.
-
- Returns a pointer with the same lifespan as the colorspace.
- */
- FZ_FUNCTION const char *fz_colorspace_colorant(const FzColorspace& cs, int n);
- /** Class-aware wrapper for `::fz_colorspace_device_n_has_cmyk()`. */
- /**
- True if DeviceN color space has cyan magenta yellow or black as
- one of its colorants.
- */
- FZ_FUNCTION int fz_colorspace_device_n_has_cmyk(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_device_n_has_only_cmyk()`. */
- /**
- True if DeviceN color space has only colorants from the CMYK set.
- */
- FZ_FUNCTION int fz_colorspace_device_n_has_only_cmyk(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_digest()`. */
- /**
- Get checksum of underlying ICC profile.
- */
- FZ_FUNCTION void fz_colorspace_digest(const FzColorspace& cs, unsigned char digest[16]);
- /** Class-aware wrapper for `::fz_colorspace_is_cmyk()`. */
- FZ_FUNCTION int fz_colorspace_is_cmyk(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_is_device()`. */
- FZ_FUNCTION int fz_colorspace_is_device(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_is_device_cmyk()`. */
- FZ_FUNCTION int fz_colorspace_is_device_cmyk(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_is_device_gray()`. */
- FZ_FUNCTION int fz_colorspace_is_device_gray(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_is_device_n()`. */
- FZ_FUNCTION int fz_colorspace_is_device_n(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_is_gray()`. */
- /**
- Tests for particular types of colorspaces
- */
- FZ_FUNCTION int fz_colorspace_is_gray(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_is_icc()`. */
- FZ_FUNCTION int fz_colorspace_is_icc(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_is_indexed()`. */
- FZ_FUNCTION int fz_colorspace_is_indexed(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_is_lab()`. */
- FZ_FUNCTION int fz_colorspace_is_lab(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_is_lab_icc()`. */
- FZ_FUNCTION int fz_colorspace_is_lab_icc(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_is_rgb()`. */
- FZ_FUNCTION int fz_colorspace_is_rgb(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_is_subtractive()`. */
- /**
- True for CMYK, Separation and DeviceN colorspaces.
- */
- FZ_FUNCTION int fz_colorspace_is_subtractive(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_n()`. */
- /**
- Query the number of colorants in a colorspace.
- */
- FZ_FUNCTION int fz_colorspace_n(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_name()`. */
- /**
- Query the name of a colorspace.
-
- The returned string has the same lifespan as the colorspace
- does. Caller should not free it.
- */
- FZ_FUNCTION const char *fz_colorspace_name(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_colorspace_name_colorant()`. */
- /**
- Assign a name for a given colorant in a colorspace.
-
- Used while initially setting up a colorspace. The string is
- copied into local storage, so need not be retained by the
- caller.
- */
- FZ_FUNCTION void fz_colorspace_name_colorant(const FzColorspace& cs, int n, const char *name);
- /** Class-aware wrapper for `::fz_colorspace_type()`. */
- /**
- Query the type of colorspace.
- */
- FZ_FUNCTION enum fz_colorspace_type fz_colorspace_type(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_compare_separations()`. */
- /**
- Compare 2 separations structures (or NULLs).
-
- Return 0 if identical, non-zero if not identical.
- */
- FZ_FUNCTION int fz_compare_separations(const FzSeparations& sep1, const FzSeparations& sep2);
- /** Class-aware wrapper for `::fz_compress_brotli()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_compress_brotli(unsigned char *dest, const unsigned char *source, size_t source_length, ::fz_brotli_level level)` => size_t compressed_length
- */
- /**
- Compress source_length bytes of data starting
- at source, into a buffer of length *destLen, starting at dest.
- *compressed_length will be updated on exit to contain the size
- actually used.
- */
- FZ_FUNCTION void fz_compress_brotli(unsigned char *dest, size_t *compressed_length, const unsigned char *source, size_t source_length, ::fz_brotli_level level);
- /** Class-aware wrapper for `::fz_compress_ccitt_fax_g3()`. */
- /**
- Compress bitmap data as CCITT Group 3 1D fax image.
- Creates a stream assuming the default PDF parameters,
- except the number of columns.
- */
- FZ_FUNCTION FzBuffer fz_compress_ccitt_fax_g3(const unsigned char *data, int columns, int rows, ptrdiff_t stride);
- /** Class-aware wrapper for `::fz_compress_ccitt_fax_g4()`. */
- /**
- Compress bitmap data as CCITT Group 4 2D fax image.
- Creates a stream assuming the default PDF parameters, except
- K=-1 and the number of columns.
- */
- FZ_FUNCTION FzBuffer fz_compress_ccitt_fax_g4(const unsigned char *data, int columns, int rows, ptrdiff_t stride);
- /** Class-aware wrapper for `::fz_compressed_buffer_size()`. */
- /**
- Return the storage size used for a buffer and its data.
- Used in implementing store handling.
-
- Never throws exceptions.
- */
- FZ_FUNCTION size_t fz_compressed_buffer_size(const FzCompressedBuffer& buffer);
- /** Class-aware wrapper for `::fz_compressed_image_buffer()`. */
- /**
- Retrieve the underlying compressed data for an image.
-
- Returns a pointer to the underlying data buffer for an image,
- or NULL if this image is not based upon a compressed data
- buffer.
-
- This is not a reference counted structure, so no reference is
- returned. Lifespan is limited to that of the image itself.
- */
- FZ_FUNCTION FzCompressedBuffer fz_compressed_image_buffer(const FzImage& image);
- /** Class-aware wrapper for `::fz_compressed_image_type()`. */
- /**
- Return the type of a compressed image.
-
- Any non-compressed image will have the type returned as UNKNOWN.
- */
- FZ_FUNCTION int fz_compressed_image_type(const FzImage& image);
- /** Class-aware wrapper for `::fz_concat()`. */
- /**
- Multiply two matrices.
-
- The order of the two matrices are important since matrix
- multiplication is not commutative.
-
- Returns result.
- */
- FZ_FUNCTION FzMatrix fz_concat(const FzMatrix& left, const FzMatrix& right);
- /** Class-aware wrapper for `::fz_contains_rect()`. */
- /**
- Test rectangle inclusion.
-
- Return true if a entirely contains b.
- */
- FZ_FUNCTION int fz_contains_rect(const FzRect& a, const FzRect& b);
- /** Class-aware wrapper for `::fz_convert_color()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_convert_color(::fz_colorspace *ss, const float *sv, ::fz_colorspace *ds, ::fz_colorspace *is, ::fz_color_params params)` => float dv
- */
- /**
- Convert color values sv from colorspace ss into colorvalues dv
- for colorspace ds, via an optional intervening space is,
- respecting the given color_params.
- */
- FZ_FUNCTION void fz_convert_color(const FzColorspace& ss, const float *sv, const FzColorspace& ds, float *dv, const FzColorspace& is, const FzColorParams& params);
- /** Class-aware wrapper for `::fz_convert_error()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_convert_error()` => `(const char *, int code)`
- */
- FZ_FUNCTION const char *fz_convert_error(int *code);
- /** Class-aware wrapper for `::fz_convert_indexed_pixmap_to_base()`. */
- /**
- Convert pixmap from indexed to base colorspace.
-
- This creates a new bitmap containing the converted pixmap data.
- */
- FZ_FUNCTION FzPixmap fz_convert_indexed_pixmap_to_base(const FzPixmap& src);
- /** Class-aware wrapper for `::fz_convert_pixmap()`. */
- /**
- Convert an existing pixmap to a desired
- colorspace. Other properties of the pixmap, such as resolution
- and position are copied to the converted pixmap.
-
- pix: The pixmap to convert.
-
- default_cs: If NULL pix->colorspace is used. It is possible that
- the data may need to be interpreted as one of the color spaces
- in default_cs.
-
- cs_des: Desired colorspace, may be NULL to denote alpha-only.
-
- prf: Proofing color space through which we need to convert.
-
- color_params: Parameters that may be used in conversion (e.g.
- ri).
-
- keep_alpha: If 0 any alpha component is removed, otherwise
- alpha is kept if present in the pixmap.
- */
- FZ_FUNCTION FzPixmap fz_convert_pixmap(const FzPixmap& pix, const FzColorspace& cs_des, const FzColorspace& prf, const FzDefaultColorspaces& default_cs, const FzColorParams& color_params, int keep_alpha);
- /** Class-aware wrapper for `::fz_convert_separation_colors()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_convert_separation_colors(::fz_colorspace *src_cs, const float *src_color, ::fz_separations *dst_seps, ::fz_colorspace *dst_cs, ::fz_color_params color_params)` => float dst_color
- */
- /**
- Convert a color given in terms of one colorspace,
- to a color in terms of another colorspace/separations.
- */
- FZ_FUNCTION void fz_convert_separation_colors(const FzColorspace& src_cs, const float *src_color, const FzSeparations& dst_seps, const FzColorspace& dst_cs, float *dst_color, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_convert_separation_pixmap_to_base()`. */
- /**
- Convert pixmap from DeviceN/Separation to base colorspace.
-
- This creates a new bitmap containing the converted pixmap data.
- */
- FZ_FUNCTION FzPixmap fz_convert_separation_pixmap_to_base(const FzPixmap& src);
- /** Class-aware wrapper for `::fz_copy_option()`. */
- /**
- Copy an option (val) into a destination buffer (dest), of maxlen
- bytes.
-
- Returns the number of bytes (including terminator) that did not
- fit. If val is maxlen or greater bytes in size, it will be left
- unterminated.
- */
- FZ_FUNCTION size_t fz_copy_option(const char *val, char *dest, size_t maxlen);
- /** Class-aware wrapper for `::fz_copy_pixmap_rect()`. */
- FZ_FUNCTION void fz_copy_pixmap_rect(const FzPixmap& dest, const FzPixmap& src, const FzIrect& r, const FzDefaultColorspaces& default_cs);
- /** Class-aware wrapper for `::fz_copy_rectangle()`. */
- /**
- Return a newly allocated UTF-8 string with the text for a given
- selection rectangle.
-
- crlf: If true, write "\r\n" style line endings (otherwise "\n"
- only).
- */
- FZ_FUNCTION char *fz_copy_rectangle(const FzStextPage& page, const FzRect& area, int crlf);
- /** Class-aware wrapper for `::fz_copy_selection()`. */
- /**
- Return a newly allocated UTF-8 string with the text for a given
- selection.
-
- crlf: If true, write "\r\n" style line endings (otherwise "\n"
- only).
- */
- FZ_FUNCTION char *fz_copy_selection(const FzStextPage& page, const FzPoint& a, const FzPoint& b, int crlf);
- /** Class-aware wrapper for `::fz_count_active_separations()`. */
- /**
- Return the number of active separations.
- */
- FZ_FUNCTION int fz_count_active_separations(const FzSeparations& seps);
- /** Class-aware wrapper for `::fz_count_archive_entries()`. */
- /**
- Number of entries in archive.
-
- Will always return a value >= 0.
-
- May throw an exception if this type of archive cannot count the
- entries (such as a directory).
- */
- FZ_FUNCTION int fz_count_archive_entries(const FzArchive& arch);
- /** Class-aware wrapper for `::fz_count_chapter_pages()`. */
- /**
- Return the number of pages in a chapter.
- May return 0.
- */
- FZ_FUNCTION int fz_count_chapter_pages(const FzDocument& doc, int chapter);
- /** Class-aware wrapper for `::fz_count_chapters()`. */
- /**
- Return the number of chapters in the document.
- At least 1.
- */
- FZ_FUNCTION int fz_count_chapters(const FzDocument& doc);
- /** Class-aware wrapper for `::fz_count_pages()`. */
- /**
- Return the number of pages in document
-
- May return 0 for documents with no pages.
- */
- FZ_FUNCTION int fz_count_pages(const FzDocument& doc);
- /** Class-aware wrapper for `::fz_count_separations()`. */
- FZ_FUNCTION int fz_count_separations(const FzSeparations& sep);
- /** Class-aware wrapper for `::fz_create_link()`. */
- /**
- Create a new link on a page.
- */
- FZ_FUNCTION FzLink fz_create_link(const FzPage& page, const FzRect& bbox, const char *uri);
- /** Class-aware wrapper for `::fz_currentpoint()`. */
- /**
- Return the current point that a path has
- reached or (0,0) if empty.
-
- path: path to return the current point of.
- */
- FZ_FUNCTION FzPoint fz_currentpoint(const FzPath& path);
- /** Class-aware wrapper for `::fz_curveto()`. */
- /**
- Append a 'curveto' command to an open path. (For a
- cubic bezier).
-
- path: The path to modify.
-
- x0, y0: The coordinates of the first control point for the
- curve.
-
- x1, y1: The coordinates of the second control point for the
- curve.
-
- x2, y2: The end coordinates for the curve.
-
- Throws exceptions on failure to allocate, or attempting to
- modify a packed path.
- */
- FZ_FUNCTION void fz_curveto(const FzPath& path, float x0, float y0, float x1, float y1, float x2, float y2);
- /** Class-aware wrapper for `::fz_curvetov()`. */
- /**
- Append a 'curvetov' command to an open path. (For a
- cubic bezier with the first control coordinate equal to
- the start point).
-
- path: The path to modify.
-
- x1, y1: The coordinates of the second control point for the
- curve.
-
- x2, y2: The end coordinates for the curve.
-
- Throws exceptions on failure to allocate, or attempting to
- modify a packed path.
- */
- FZ_FUNCTION void fz_curvetov(const FzPath& path, float x1, float y1, float x2, float y2);
- /** Class-aware wrapper for `::fz_curvetoy()`. */
- /**
- Append a 'curvetoy' command to an open path. (For a
- cubic bezier with the second control coordinate equal to
- the end point).
-
- path: The path to modify.
-
- x0, y0: The coordinates of the first control point for the
- curve.
-
- x2, y2: The end coordinates for the curve (and the second
- control coordinate).
-
- Throws exceptions on failure to allocate, or attempting to
- modify a packed path.
- */
- FZ_FUNCTION void fz_curvetoy(const FzPath& path, float x0, float y0, float x2, float y2);
- /** Class-aware wrapper for `::fz_debug_store()`. */
- /**
- Output debugging information for the current state of the store
- to the given output channel.
- */
- FZ_FUNCTION void fz_debug_store(const FzOutput& out);
- /** Class-aware wrapper for `::fz_debug_xml()`. */
- /**
- Pretty-print an XML tree to stdout. (Deprecated, use
- fz_output_xml in preference).
- */
- FZ_FUNCTION void fz_debug_xml(const FzXml& item, int level);
- /** Class-aware wrapper for `::fz_decode_barcode_from_display_list()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_decode_barcode_from_display_list(::fz_display_list *list, ::fz_rect subarea, int rotate)` => `(char *, ::fz_barcode_type type)`
- */
- /**
- Decode a barcode from a display list.
-
- type: NULL, or a pointer to recieve the barcode type decoded.
- list: The display list to render to get the barcode.
- subarea: subarea of the page to decode.
- rotate: 0, 90, 180, or 270.
-
- returns the decoded value.
- */
- FZ_FUNCTION char *fz_decode_barcode_from_display_list(::fz_barcode_type *type, const FzDisplayList& list, const FzRect& subarea, int rotate);
- /** Class-aware wrapper for `::fz_decode_barcode_from_display_list2()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_decode_barcode_from_display_list2(::fz_display_list *list, ::fz_rect subarea, int rotate)` => `(std::string, ::fz_barcode_type type)`
- */
- /** SWIG-friendly wrapper for fz_decode_barcode_from_display_list(),
- avoiding leak of the returned string. */
- FZ_FUNCTION std::string fz_decode_barcode_from_display_list2(::fz_barcode_type *type, const FzDisplayList& list, const FzRect& subarea, int rotate);
- /** Class-aware wrapper for `::fz_decode_barcode_from_page()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_decode_barcode_from_page(::fz_page *page, ::fz_rect subarea, int rotate)` => `(char *, ::fz_barcode_type type)`
- */
- /**
- Decode a barcode from a page.
-
- type: NULL, or a pointer to recieve the barcode type decoded.
- page: The page to decode.
- subarea: subarea of the page to decode.
- rotate: 0, 90, 180, or 270.
-
- returns the decoded value.
- */
- FZ_FUNCTION char *fz_decode_barcode_from_page(::fz_barcode_type *type, const FzPage& page, const FzRect& subarea, int rotate);
- /** Class-aware wrapper for `::fz_decode_barcode_from_page2()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_decode_barcode_from_page2(::fz_page *page, ::fz_rect subarea, int rotate)` => `(std::string, ::fz_barcode_type type)`
- */
- /** SWIG-friendly wrapper for fz_decode_barcode_from_page(), avoiding
- leak of the returned string. */
- FZ_FUNCTION std::string fz_decode_barcode_from_page2(::fz_barcode_type *type, const FzPage& page, const FzRect& subarea, int rotate);
- /** Class-aware wrapper for `::fz_decode_barcode_from_pixmap()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_decode_barcode_from_pixmap(::fz_pixmap *pix, int rotate)` => `(char *, ::fz_barcode_type type)`
- */
- /**
- Decode a barcode from a pixmap.
-
- type: NULL, or a pointer to recieve the barcode type decoded.
- pix: The pixmap to decode.
- rotate: 0, 90, 180, or 270.
-
- returns the decoded value as an fz_malloced block. Should
- be fz_free'd by the caller.
- */
- FZ_FUNCTION char *fz_decode_barcode_from_pixmap(::fz_barcode_type *type, const FzPixmap& pix, int rotate);
- /** Class-aware wrapper for `::fz_decode_barcode_from_pixmap2()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_decode_barcode_from_pixmap2(::fz_pixmap *pix, int rotate)` => `(std::string, ::fz_barcode_type type)`
- */
- /** SWIG-friendly wrapper for fz_decode_barcode_from_pixmap(), avoiding
- leak of the returned string. */
- FZ_FUNCTION std::string fz_decode_barcode_from_pixmap2(::fz_barcode_type *type, const FzPixmap& pix, int rotate);
- /** Class-aware wrapper for `::fz_decode_tile()`. */
- FZ_FUNCTION void fz_decode_tile(const FzPixmap& pix, const float *decode);
- /** Class-aware wrapper for `::fz_decode_uri()`. */
- /**
- * Return a new string representing the unencoded version of the given URI.
- * This decodes all escape sequences except those that would result in a reserved
- * character that are part of the URI syntax (; / ? : @ & = + $ , #).
- */
- FZ_FUNCTION char *fz_decode_uri(const char *s);
- /** Class-aware wrapper for `::fz_decode_uri_component()`. */
- /**
- * Return a new string representing the unencoded version of the given URI component.
- * This decodes all escape sequences!
- */
- FZ_FUNCTION char *fz_decode_uri_component(const char *s);
- /** Class-aware wrapper for `::fz_decomp_image_from_stream()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_decomp_image_from_stream(::fz_stream *stm, ::fz_compressed_image *image, ::fz_irect *subarea, int indexed, int l2factor)` => `(fz_pixmap *, int l2extra)`
- */
- /**
- Decode a subarea of a compressed image. l2factor is the amount
- of subsampling inbuilt to the stream (i.e. performed by the
- decoder). If non NULL, l2extra is the extra amount of
- subsampling that should be performed by this routine. This will
- be updated on exit to the amount of subsampling that is still
- required to be done.
-
- Returns a kept reference.
- */
- FZ_FUNCTION FzPixmap fz_decomp_image_from_stream(const FzStream& stm, const FzCompressedImage& image, FzIrect& subarea, int indexed, int l2factor, int *l2extra);
- /** Class-aware wrapper for `::fz_decouple_type3_font()`. */
- FZ_FUNCTION void fz_decouple_type3_font(const FzFont& font, void *t3doc);
- /** Class-aware wrapper for `::fz_default_cmyk()`. */
- FZ_FUNCTION FzColorspace fz_default_cmyk(const FzDefaultColorspaces& default_cs);
- /** Class-aware wrapper for `::fz_default_error_callback()`. */
- /**
- FIXME: Better not to expose fz_default_error_callback, and
- fz_default_warning callback and to allow 'NULL' to be used
- int fz_set_xxxx_callback to mean "defaults".
-
- FIXME: Do we need/want functions like
- fz_error_callback(ctx, message) to allow callers to inject
- stuff into the error/warning streams?
- */
- /**
- The default error callback. Declared publicly just so that the
- error callback can be set back to this after it has been
- overridden.
- */
- FZ_FUNCTION void fz_default_error_callback(void *user, const char *message);
- /** Class-aware wrapper for `::fz_default_gray()`. */
- /**
- Retrieve default colorspaces (typically page local).
-
- If default_cs is non NULL, the default is retrieved from there,
- otherwise the global default is retrieved.
-
- These return borrowed references that should not be dropped,
- unless they are kept first.
- */
- FZ_FUNCTION FzColorspace fz_default_gray(const FzDefaultColorspaces& default_cs);
- /** Class-aware wrapper for `::fz_default_halftone()`. */
- /**
- Create a 'default' halftone structure
- for the given number of components.
-
- num_comps: The number of components to use.
-
- Returns a simple default halftone. The default halftone uses
- the same halftone tile for each plane, which may not be ideal
- for all purposes.
- */
- FZ_FUNCTION FzHalftone fz_default_halftone(int num_comps);
- /** Class-aware wrapper for `::fz_default_output_intent()`. */
- FZ_FUNCTION FzColorspace fz_default_output_intent(const FzDefaultColorspaces& default_cs);
- /** Class-aware wrapper for `::fz_default_rgb()`. */
- FZ_FUNCTION FzColorspace fz_default_rgb(const FzDefaultColorspaces& default_cs);
- /** Class-aware wrapper for `::fz_default_warning_callback()`. */
- /**
- The default warning callback. Declared publicly just so that
- the warning callback can be set back to this after it has been
- overridden.
- */
- FZ_FUNCTION void fz_default_warning_callback(void *user, const char *message);
- /** Class-aware wrapper for `::fz_defer_reap_end()`. */
- /**
- Decrement the defer reap count.
-
- If the defer reap count returns to 0, and the store
- has reapable objects in, a reap pass will begin.
-
- Call this at the end of a process during which you
- potentially might drop many reapable objects.
-
- It is vital that every fz_defer_reap_start is matched
- by a fz_defer_reap_end call.
- */
- FZ_FUNCTION void fz_defer_reap_end();
- /** Class-aware wrapper for `::fz_defer_reap_start()`. */
- /**
- Increment the defer reap count.
-
- No reap operations will take place (except for those
- triggered by an immediate failed malloc) until the
- defer reap count returns to 0.
-
- Call this at the start of a process during which you
- potentially might drop many reapable objects.
-
- It is vital that every fz_defer_reap_start is matched
- by a fz_defer_reap_end call.
- */
- FZ_FUNCTION void fz_defer_reap_start();
- /** Class-aware wrapper for `::fz_deflate()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_deflate(unsigned char *dest, const unsigned char *source, size_t source_length, ::fz_deflate_level level)` => size_t compressed_length
- */
- /**
- Compress source_length bytes of data starting
- at source, into a buffer of length *compressed_length, starting at
- dest. *compressed_length will be updated on exit to contain the size
- actually used.
- */
- FZ_FUNCTION void fz_deflate(unsigned char *dest, size_t *compressed_length, const unsigned char *source, size_t source_length, ::fz_deflate_level level);
- /** Class-aware wrapper for `::fz_deflate_bound()`. */
- /**
- Returns the upper bound on the
- size of flated data of length size.
- */
- FZ_FUNCTION size_t fz_deflate_bound(size_t size);
- /** Class-aware wrapper for `::fz_delete_link()`. */
- /**
- Delete an existing link on a page.
- */
- FZ_FUNCTION void fz_delete_link(const FzPage& page, const FzLink& link);
- /** Class-aware wrapper for `::fz_deskew_pixmap()`. */
- FZ_FUNCTION FzPixmap fz_deskew_pixmap(const FzPixmap& src, double degrees, int border);
- /** Class-aware wrapper for `::fz_detach_xml()`. */
- /**
- Detach a node from the tree, unlinking it from its parent,
- and setting the document root to the node.
- */
- FZ_FUNCTION void fz_detach_xml(const FzXml& node);
- /** Class-aware wrapper for `::fz_detect_document()`. */
- FZ_FUNCTION int fz_detect_document(FzQuad& points, const FzPixmap& src);
- /** Class-aware wrapper for `::fz_detect_skew()`. */
- FZ_FUNCTION double fz_detect_skew(const FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_device_bgr()`. */
- FZ_FUNCTION FzColorspace fz_device_bgr();
- /** Class-aware wrapper for `::fz_device_cmyk()`. */
- FZ_FUNCTION FzColorspace fz_device_cmyk();
- /** Class-aware wrapper for `::fz_device_current_scissor()`. */
- /**
- Find current scissor region as tracked by the device.
- */
- FZ_FUNCTION FzRect fz_device_current_scissor(const FzDevice& dev);
- /** Class-aware wrapper for `::fz_device_gray()`. */
- /**
- Retrieve global default colorspaces.
-
- These return borrowed references that should not be dropped,
- unless they are kept first.
- */
- FZ_FUNCTION FzColorspace fz_device_gray();
- /** Class-aware wrapper for `::fz_device_lab()`. */
- FZ_FUNCTION FzColorspace fz_device_lab();
- /** Class-aware wrapper for `::fz_device_rgb()`. */
- FZ_FUNCTION FzColorspace fz_device_rgb();
- /** Class-aware wrapper for `::fz_dirname()`. */
- /**
- extract the directory component from a path.
- */
- FZ_FUNCTION void fz_dirname(char *dir, const char *path, size_t dirsize);
- /** Class-aware wrapper for `::fz_disable_device_hints()`. */
- /**
- Disable (clear) hint bits within the hint bitfield for a device.
- */
- FZ_FUNCTION void fz_disable_device_hints(const FzDevice& dev, int hints);
- /** Class-aware wrapper for `::fz_disable_icc()`. */
- /**
- Disable icc profile based operation.
- */
- FZ_FUNCTION void fz_disable_icc();
- /** Class-aware wrapper for `::fz_display_list_is_empty()`. */
- /**
- Check for a display list being empty
-
- list: The list to check.
-
- Returns true if empty, false otherwise.
- */
- FZ_FUNCTION int fz_display_list_is_empty(const FzDisplayList& list);
- /** Class-aware wrapper for `::fz_div255()`. */
- /**
- Undo alpha premultiplication.
- */
- FZ_FUNCTION int fz_div255(int c, int a);
- /** Class-aware wrapper for `::fz_do_always()`. */
- FZ_FUNCTION int fz_do_always();
- /** Class-aware wrapper for `::fz_do_catch()`. */
- FZ_FUNCTION int fz_do_catch();
- /** Class-aware wrapper for `::fz_do_try()`. */
- FZ_FUNCTION int fz_do_try();
- /** Class-aware wrapper for `::fz_document_handler_open()`. */
- /** Helper for calling `fz_document_handler::open` function pointer via
- Swig from Python/C#. */
- FZ_FUNCTION FzDocument fz_document_handler_open(const FzDocumentHandler& handler, const FzStream& stream, const FzStream& accel, const FzArchive& dir, void *recognize_state);
- /** Class-aware wrapper for `::fz_document_handler_recognize()`. */
- /** Helper for calling a `fz_document_handler::recognize` function
- pointer via Swig from Python/C#. */
- FZ_FUNCTION int fz_document_handler_recognize(const FzDocumentHandler& handler, const char *magic);
- /** Class-aware wrapper for `::fz_document_output_intent()`. */
- /**
- Find the output intent colorspace if the document has defined
- one.
-
- Returns a borrowed reference that should not be dropped, unless
- it is kept first.
- */
- FZ_FUNCTION FzColorspace fz_document_output_intent(const FzDocument& doc);
- /** Class-aware wrapper for `::fz_document_supports_accelerator()`. */
- /**
- Query if the document supports the saving of accelerator data.
- */
- FZ_FUNCTION int fz_document_supports_accelerator(const FzDocument& doc);
- /** Class-aware wrapper for `::fz_dom_add_attribute()`. */
- /**
- Add an attribute to an element.
-
- Ownership of att and value remain with the caller.
- */
- FZ_FUNCTION void fz_dom_add_attribute(const FzXml& elt, const char *att, const char *value);
- /** Class-aware wrapper for `::fz_dom_append_child()`. */
- /**
- Insert an element as the last child of a parent, unlinking the
- child from its current position if required.
- */
- FZ_FUNCTION void fz_dom_append_child(const FzXml& parent, const FzXml& child);
- /** Class-aware wrapper for `::fz_dom_attribute()`. */
- /**
- Retrieve the value of a given attribute from a given element.
-
- Returns a borrowed pointer to the value or NULL if not found.
- */
- FZ_FUNCTION const char *fz_dom_attribute(const FzXml& elt, const char *att);
- /** Class-aware wrapper for `::fz_dom_body()`. */
- /**
- Return a borrowed reference for the 'body' element of
- the given DOM.
- */
- FZ_FUNCTION FzXml fz_dom_body(const FzXml& dom);
- /** Class-aware wrapper for `::fz_dom_clone()`. */
- /**
- Clone an element (and its children).
-
- A borrowed reference to the clone is returned. The clone is not
- yet linked into the DOM.
- */
- FZ_FUNCTION FzXml fz_dom_clone(const FzXml& elt);
- /** Class-aware wrapper for `::fz_dom_create_element()`. */
- /**
- Create an element of a given tag type for the given DOM.
-
- The element is not linked into the DOM yet.
- */
- FZ_FUNCTION FzXml fz_dom_create_element(const FzXml& dom, const char *tag);
- /** Class-aware wrapper for `::fz_dom_create_text_node()`. */
- /**
- Create a text node for the given DOM.
-
- The element is not linked into the DOM yet.
- */
- FZ_FUNCTION FzXml fz_dom_create_text_node(const FzXml& dom, const char *text);
- /** Class-aware wrapper for `::fz_dom_document_element()`. */
- /**
- Return a borrowed reference for the document (the top
- level element) of the DOM.
- */
- FZ_FUNCTION FzXml fz_dom_document_element(const FzXml& dom);
- /** Class-aware wrapper for `::fz_dom_find()`. */
- /**
- Find the first element matching the requirements in a depth first traversal from elt.
-
- The tagname must match tag, unless tag is NULL, when all tag names are considered to match.
-
- If att is NULL, then all tags match.
- Otherwise:
- If match is NULL, then only nodes that have an att attribute match.
- If match is non-NULL, then only nodes that have an att attribute that matches match match.
-
- Returns NULL (if no match found), or a borrowed reference to the first matching element.
- */
- FZ_FUNCTION FzXml fz_dom_find(const FzXml& elt, const char *tag, const char *att, const char *match);
- /** Class-aware wrapper for `::fz_dom_find_next()`. */
- /**
- Find the next element matching the requirements.
- */
- FZ_FUNCTION FzXml fz_dom_find_next(const FzXml& elt, const char *tag, const char *att, const char *match);
- /** Class-aware wrapper for `::fz_dom_first_child()`. */
- /**
- Return a borrowed reference to the first child of a node,
- or NULL if there isn't one.
- */
- FZ_FUNCTION FzXml fz_dom_first_child(const FzXml& elt);
- /** Class-aware wrapper for `::fz_dom_get_attribute()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_dom_get_attribute(::fz_xml *elt, int i)` => `(const char *, const char *att)`
- */
- /**
- Enumerate through the attributes of an element.
-
- Call with i=0,1,2,3... to enumerate attributes.
-
- On return *att and the return value will be NULL if there are not
- that many attributes to read. Otherwise, *att will be filled in
- with a borrowed pointer to the attribute name, and the return
- value will be a borrowed pointer to the value.
- */
- FZ_FUNCTION const char *fz_dom_get_attribute(const FzXml& elt, int i, const char **att);
- /** Class-aware wrapper for `::fz_dom_insert_after()`. */
- /**
- Insert an element (new_elt), after another element (node),
- unlinking the new_elt from its current position if required.
- */
- FZ_FUNCTION void fz_dom_insert_after(const FzXml& node, const FzXml& new_elt);
- /** Class-aware wrapper for `::fz_dom_insert_before()`. */
- /**
- Insert an element (new_elt), before another element (node),
- unlinking the new_elt from its current position if required.
- */
- FZ_FUNCTION void fz_dom_insert_before(const FzXml& node, const FzXml& new_elt);
- /** Class-aware wrapper for `::fz_dom_next()`. */
- /**
- Return a borrowed reference to the next sibling of a node,
- or NULL if there isn't one.
- */
- FZ_FUNCTION FzXml fz_dom_next(const FzXml& elt);
- /** Class-aware wrapper for `::fz_dom_parent()`. */
- /**
- Return a borrowed reference to the parent of a node,
- or NULL if there isn't one.
- */
- FZ_FUNCTION FzXml fz_dom_parent(const FzXml& elt);
- /** Class-aware wrapper for `::fz_dom_previous()`. */
- /**
- Return a borrowed reference to the previous sibling of a node,
- or NULL if there isn't one.
- */
- FZ_FUNCTION FzXml fz_dom_previous(const FzXml& elt);
- /** Class-aware wrapper for `::fz_dom_remove()`. */
- /**
- Remove an element from the DOM. The element can be added back elsewhere
- if required.
-
- No reference counting changes for the element.
- */
- FZ_FUNCTION void fz_dom_remove(const FzXml& elt);
- /** Class-aware wrapper for `::fz_dom_remove_attribute()`. */
- /**
- Remove an attribute from an element.
- */
- FZ_FUNCTION void fz_dom_remove_attribute(const FzXml& elt, const char *att);
- /** Class-aware wrapper for `::fz_draw_story()`. */
- FZ_FUNCTION void fz_draw_story(const FzStory& story, const FzDevice& dev, const FzMatrix& ctm);
- /** Class-aware wrapper for `::fz_dump_glyph_cache_stats()`. */
- /**
- Dump debug statistics for the glyph cache.
- */
- FZ_FUNCTION void fz_dump_glyph_cache_stats(const FzOutput& out);
- /** Class-aware wrapper for `::fz_duplicate_glyph_names_from_unicode()`. */
- FZ_FUNCTION const char **fz_duplicate_glyph_names_from_unicode(int unicode);
- /** Class-aware wrapper for `::fz_empty_store()`. */
- /**
- Evict every item from the store.
- */
- FZ_FUNCTION void fz_empty_store();
- /** Class-aware wrapper for `::fz_enable_device_hints()`. */
- /**
- Enable (set) hint bits within the hint bitfield for a device.
- */
- FZ_FUNCTION void fz_enable_device_hints(const FzDevice& dev, int hints);
- /** Class-aware wrapper for `::fz_enable_icc()`. */
- /**
- Enable icc profile based operation.
- */
- FZ_FUNCTION void fz_enable_icc();
- /** Class-aware wrapper for `::fz_encode_character()`. */
- /**
- Find the glyph id for a given unicode
- character within a font.
-
- font: The font to look for the unicode character in.
-
- unicode: The unicode character to encode.
-
- Returns the glyph id for the given unicode value, or 0 if
- unknown.
- */
- FZ_FUNCTION int fz_encode_character(const FzFont& font, int unicode);
- /** Class-aware wrapper for `::fz_encode_character_by_glyph_name()`. */
- /**
- Encode character.
-
- Either by direct lookup of glyphname within a font, or, failing
- that, by mapping glyphname to unicode and thence to the glyph
- index within the given font.
-
- Returns zero for type3 fonts.
- */
- FZ_FUNCTION int fz_encode_character_by_glyph_name(const FzFont& font, const char *glyphname);
- /** Class-aware wrapper for `::fz_encode_character_sc()`. */
- /**
- Encode character, preferring small-caps variant if available.
-
- font: The font to look for the unicode character in.
-
- unicode: The unicode character to encode.
-
- Returns the glyph id for the given unicode value, or 0 if
- unknown.
- */
- FZ_FUNCTION int fz_encode_character_sc(const FzFont& font, int unicode);
- /** Class-aware wrapper for `::fz_encode_character_with_fallback()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_encode_character_with_fallback(::fz_font *font, int unicode, int script, int language, ::fz_font **out_font)` => `(int)`
- */
- /**
- Find the glyph id for
- a given unicode character within a font, falling back to
- an alternative if not found.
-
- font: The font to look for the unicode character in.
-
- unicode: The unicode character to encode.
-
- script: The script in use.
-
- language: The language in use.
-
- out_font: The font handle in which the given glyph represents
- the requested unicode character. The caller does not own the
- reference it is passed, so should call fz_keep_font if it is
- not simply to be used immediately.
-
- Returns the glyph id for the given unicode value in the supplied
- font (and sets *out_font to font) if it is present. Otherwise
- an alternative fallback font (based on script/language) is
- searched for. If the glyph is found therein, *out_font is set
- to this reference, and the glyph reference is returned. If it
- cannot be found anywhere, the function returns 0.
- */
- FZ_FUNCTION int fz_encode_character_with_fallback(const FzFont& font, int unicode, int script, int language, FzFont& out_font);
- /** Class-aware wrapper for `::fz_encode_uri()`. */
- /**
- * Return a new string representing the provided string encoded as a URI.
- */
- FZ_FUNCTION char *fz_encode_uri(const char *s);
- /** Class-aware wrapper for `::fz_encode_uri_component()`. */
- /**
- * Return a new string representing the provided string encoded as an URI component.
- * This also encodes the special reserved characters (; / ? : @ & = + $ , #).
- */
- FZ_FUNCTION char *fz_encode_uri_component(const char *s);
- /** Class-aware wrapper for `::fz_encode_uri_pathname()`. */
- /**
- * Return a new string representing the provided string encoded as an URI path name.
- * This also encodes the special reserved characters except /.
- */
- FZ_FUNCTION char *fz_encode_uri_pathname(const char *s);
- /** Class-aware wrapper for `::fz_end_group()`. */
- FZ_FUNCTION void fz_end_group(const FzDevice& dev);
- /** Class-aware wrapper for `::fz_end_layer()`. */
- FZ_FUNCTION void fz_end_layer(const FzDevice& dev);
- /** Class-aware wrapper for `::fz_end_mask()`. */
- FZ_FUNCTION void fz_end_mask(const FzDevice& dev);
- /** Class-aware wrapper for `::fz_end_mask_tr()`. */
- FZ_FUNCTION void fz_end_mask_tr(const FzDevice& dev, const FzFunction& fn);
- /** Class-aware wrapper for `::fz_end_metatext()`. */
- FZ_FUNCTION void fz_end_metatext(const FzDevice& dev);
- /** Class-aware wrapper for `::fz_end_page()`. */
- /**
- Called to end the process of writing a page to a
- document.
- */
- FZ_FUNCTION void fz_end_page(const FzDocumentWriter& wri);
- /** Class-aware wrapper for `::fz_end_structure()`. */
- FZ_FUNCTION void fz_end_structure(const FzDevice& dev);
- /** Class-aware wrapper for `::fz_end_throw_on_repair()`. */
- FZ_FUNCTION void fz_end_throw_on_repair();
- /** Class-aware wrapper for `::fz_end_tile()`. */
- FZ_FUNCTION void fz_end_tile(const FzDevice& dev);
- /** Class-aware wrapper for `::fz_enumerate_font_cmap()`. */
- /**
- Enumerate a cmap using a callback.
- */
- FZ_FUNCTION void fz_enumerate_font_cmap(const FzFont& font, ::fz_cmap_callback *cb, void *opaque);
- /** Class-aware wrapper for `::fz_enumerate_font_cmap2()`. */
- /** SWIG-friendly wrapper for fz_enumerate_font_cmap(). */
- FZ_FUNCTION std::vector<fz_font_ucs_gid> fz_enumerate_font_cmap2(const FzFont& font);
- /** Class-aware wrapper for `::fz_error_callback()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_error_callback()` => `(fz_error_cb *, void *user)`
- */
- /**
- Retrieve the currently set error callback, or NULL if none
- has been set. Optionally, if user is non-NULL, the user pointer
- given when the warning callback was set is also passed back to
- the caller.
- */
- FZ_FUNCTION ::fz_error_cb *fz_error_callback(void **user);
- /** Class-aware wrapper for `::fz_eval_function()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_eval_function(::fz_function *func, const float *in, int inlen, int outlen)` => float out
- */
- FZ_FUNCTION void fz_eval_function(const FzFunction& func, const float *in, int inlen, float *out, int outlen);
- /** Class-aware wrapper for `::fz_expand_irect()`. */
- FZ_FUNCTION FzIrect fz_expand_irect(const FzIrect& a, int expand);
- /** Class-aware wrapper for `::fz_expand_rect()`. */
- /**
- Expand a bbox by a given amount in all directions.
- */
- FZ_FUNCTION FzRect fz_expand_rect(const FzRect& b, float expand);
- /** Class-aware wrapper for `::fz_extract_ttf_from_ttc()`. */
- FZ_FUNCTION FzBuffer fz_extract_ttf_from_ttc(const FzFont& font);
- /** Class-aware wrapper for `::fz_file_exists()`. */
- /**
- Return true if the named file exists and is readable.
- */
- FZ_FUNCTION int fz_file_exists(const char *path);
- /** Class-aware wrapper for `::fz_fill_image()`. */
- FZ_FUNCTION void fz_fill_image(const FzDevice& dev, const FzImage& image, const FzMatrix& ctm, float alpha, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_fill_image_mask()`. */
- FZ_FUNCTION void fz_fill_image_mask(const FzDevice& dev, const FzImage& image, const FzMatrix& ctm, const FzColorspace& colorspace, const float *color, float alpha, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_fill_path()`. */
- /**
- Device calls; graphics primitives and containers.
- */
- FZ_FUNCTION void fz_fill_path(const FzDevice& dev, const FzPath& path, int even_odd, const FzMatrix& ctm, const FzColorspace& colorspace, const float *color, float alpha, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_fill_pixmap_from_display_list()`. */
- FZ_FUNCTION FzPixmap fz_fill_pixmap_from_display_list(const FzDisplayList& list, const FzMatrix& ctm, const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_fill_pixmap_with_color()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_fill_pixmap_with_color(::fz_pixmap *pix, ::fz_colorspace *colorspace, ::fz_color_params color_params)` => float color
- */
- /**
- Fill pixmap with solid color.
- */
- FZ_FUNCTION void fz_fill_pixmap_with_color(const FzPixmap& pix, const FzColorspace& colorspace, float *color, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_fill_shade()`. */
- FZ_FUNCTION void fz_fill_shade(const FzDevice& dev, const FzShade& shade, const FzMatrix& ctm, float alpha, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_fill_text()`. */
- FZ_FUNCTION void fz_fill_text(const FzDevice& dev, const FzText& text, const FzMatrix& ctm, const FzColorspace& colorspace, const float *color, float alpha, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_filter_store()`. */
- /**
- Filter every element in the store with a matching type with the
- given function.
-
- If the function returns 1 for an element, drop the element.
- */
- FZ_FUNCTION void fz_filter_store(::fz_store_filter_fn *fn, void *arg, const FzStoreType& type);
- /** Class-aware wrapper for `::fz_find_item()`. */
- /**
- Find an item within the store.
-
- drop: The function used to free the value (to ensure we get a
- value of the correct type).
-
- key: The key used to index the item.
-
- type: Functions used to manipulate the key.
-
- Returns NULL for not found, otherwise returns a pointer to the
- value indexed by key to which a reference has been taken.
- */
- FZ_FUNCTION void *fz_find_item(::fz_store_drop_fn *drop, void *key, const FzStoreType& type);
- /** Class-aware wrapper for `::fz_find_table_within_bounds()`. */
- /**
- Interpret the bounded contents of a given stext page as
- a table.
-
- The page contents will be rewritten to contain a Table
- structure with the identified content in it.
-
- This uses the same logic as for fz_table_hunt, without the
- actual hunting. fz_table_hunt hunts to find possible bounds
- for multiple tables on the page; this routine just finds a
- single table contained within the given rectangle.
-
- Returns the stext_block list that contains the content of
- the table.
- */
- FZ_FUNCTION FzStextBlock fz_find_table_within_bounds(const FzStextPage& page, const FzRect& bounds);
- /** Class-aware wrapper for `::fz_flush_output()`. */
- /**
- Flush unwritten data.
- */
- FZ_FUNCTION void fz_flush_output(const FzOutput& out);
- /** Class-aware wrapper for `::fz_flush_warnings()`. */
- /**
- Flush any repeated warnings.
-
- Repeated warnings are buffered, counted and eventually printed
- along with the number of repetitions. Call fz_flush_warnings
- to force printing of the latest buffered warning and the
- number of repetitions, for example to make sure that all
- warnings are printed before exiting an application.
- */
- FZ_FUNCTION void fz_flush_warnings();
- /** Class-aware wrapper for `::fz_font_ascender()`. */
- /**
- Retrieve font ascender in ems.
- */
- FZ_FUNCTION float fz_font_ascender(const FzFont& font);
- /** Class-aware wrapper for `::fz_font_bbox()`. */
- /**
- Retrieve the font bbox.
-
- font: The font to query.
-
- Returns the font bbox by value; it is valid only if
- fz_font_flags(font)->invalid_bbox is zero.
- */
- FZ_FUNCTION FzRect fz_font_bbox(const FzFont& font);
- /** Class-aware wrapper for `::fz_font_descender()`. */
- /**
- Retrieve font descender in ems.
- */
- FZ_FUNCTION float fz_font_descender(const FzFont& font);
- /** Class-aware wrapper for `::fz_font_digest()`. */
- /**
- Retrieve the MD5 digest for the font's data.
- */
- FZ_FUNCTION void fz_font_digest(const FzFont& font, unsigned char digest[16]);
- /* Class-aware wrapper for `fz_font_flags()`
- is not available because returned wrapper class for `fz_font_flags_t`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_font_ft_face()`. */
- /**
- Retrieve the FT_Face handle
- for the font.
-
- font: The font to query
-
- Returns the FT_Face handle for the font, or NULL
- if not a freetype handled font. (Cast to void *
- to avoid nasty header exposure).
- */
- FZ_FUNCTION void *fz_font_ft_face(const FzFont& font);
- /** Class-aware wrapper for `::fz_font_is_bold()`. */
- /**
- Query whether the font flags say that this font is bold.
- */
- FZ_FUNCTION int fz_font_is_bold(const FzFont& font);
- /** Class-aware wrapper for `::fz_font_is_italic()`. */
- /**
- Query whether the font flags say that this font is italic.
- */
- FZ_FUNCTION int fz_font_is_italic(const FzFont& font);
- /** Class-aware wrapper for `::fz_font_is_monospaced()`. */
- /**
- Query whether the font flags say that this font is monospaced.
- */
- FZ_FUNCTION int fz_font_is_monospaced(const FzFont& font);
- /** Class-aware wrapper for `::fz_font_is_serif()`. */
- /**
- Query whether the font flags say that this font is serif.
- */
- FZ_FUNCTION int fz_font_is_serif(const FzFont& font);
- /** Class-aware wrapper for `::fz_font_name()`. */
- /**
- Retrieve a pointer to the name of the font.
-
- font: The font to query.
-
- Returns a pointer to an internal copy of the font name.
- Will never be NULL, but may be the empty string.
- */
- FZ_FUNCTION const char *fz_font_name(const FzFont& font);
- /* Class-aware wrapper for `fz_font_shaper_data()`
- is not available because returned wrapper class for `fz_shaper_data_t`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_font_t3_procs()`. */
- /**
- Retrieve the Type3 procs
- for a font.
-
- font: The font to query
-
- Returns the t3_procs pointer. Will be NULL for a
- non type-3 font.
- */
- FZ_FUNCTION ::fz_buffer **fz_font_t3_procs(const FzFont& font);
- /** Class-aware wrapper for `::fz_format_double()`. */
- /** Swig-friendly and typesafe way to do fz_snprintf(fmt, value). `fmt`
- must end with one of 'efg' otherwise we throw an exception. */
- FZ_FUNCTION std::string fz_format_double(const char *fmt, double value);
- /** Class-aware wrapper for `::fz_format_link_uri()`. */
- /**
- Format an internal link to a page number, location, and possible viewing parameters,
- suitable for use with fz_create_link.
-
- Returns a newly allocated string that the caller must free.
- */
- FZ_FUNCTION char *fz_format_link_uri(const FzDocument& doc, const FzLinkDest& dest);
- /** Class-aware wrapper for `::fz_format_output_path()`. */
- /**
- create output file name using a template.
-
- If the path contains %[0-9]*d, the first such pattern will be
- replaced with the page number. If the template does not contain
- such a pattern, the page number will be inserted before the
- filename extension. If the template does not have a filename
- extension, the page number will be added to the end.
- */
- FZ_FUNCTION void fz_format_output_path(char *path, size_t size, const char *fmt, int page);
- /** Class-aware wrapper for `::fz_format_string()`. */
- /**
- Our customised 'printf'-like string formatter.
- Takes %c, %d, %s, %u, %x, %X as usual.
- The only modifiers supported are:
- 1) zero-padding ints (e.g. %02d, %03u, %04x, etc).
- 2) ' to indicate that ' should be inserted into
- integers as thousands separators.
- 3) , to indicate that , should be inserted into
- integers as thousands separators.
- 4) _ to indicate that , should be inserted into
- integers as thousands separators.
- Posix chooses the thousand separator in a locale
- specific way - we do not. We always apply it every
- 3 characters for the positive part of integers, so
- other styles, such as Indian (123,456,78) are not
- supported.
-
- %g output in "as short as possible hopefully lossless
- non-exponent" form, see fz_ftoa for specifics.
- %f and %e output as usual.
- %C outputs a utf8 encoded int.
- %M outputs a fz_matrix*.
- %R outputs a fz_rect*.
- %P outputs a fz_point*.
- %n outputs a PDF name (with appropriate escaping).
- %q and %( output escaped strings in C/PDF syntax.
- %l{d,u,x,X} indicates that the values are int64_t.
- %z{d,u,x,X} indicates that the value is a size_t.
- %< outputs a quoted (utf8) string (for XML).
- %> outputs a hex string for a zero terminated string of bytes.
-
- user: An opaque pointer that is passed to the emit function.
-
- emit: A function pointer called to emit output bytes as the
- string is being formatted.
- */
- FZ_FUNCTION void fz_format_string(void *user, void (*emit)(::fz_context *, void *, int ), const char *fmt, va_list args);
- /** Class-aware wrapper for `::fz_free()`. */
- /**
- Free a previously allocated block of memory.
-
- fz_free(ctx, NULL) does nothing.
-
- Never throws exceptions.
- */
- FZ_FUNCTION void fz_free(void *p);
- /** Class-aware wrapper for `::fz_free_aligned()`. */
- /**
- fz_free equivalent, for blocks allocated via fz_malloc_aligned.
- */
- FZ_FUNCTION void fz_free_aligned(void *p);
- /** Class-aware wrapper for `::fz_ft_lock()`. */
- FZ_FUNCTION void fz_ft_lock();
- /** Class-aware wrapper for `::fz_ft_lock_held()`. */
- FZ_FUNCTION int fz_ft_lock_held();
- /** Class-aware wrapper for `::fz_ft_unlock()`. */
- FZ_FUNCTION void fz_ft_unlock();
- /** Class-aware wrapper for `::fz_function_size()`. */
- FZ_FUNCTION size_t fz_function_size(const FzFunction& func);
- /** Class-aware wrapper for `::fz_gamma_pixmap()`. */
- /**
- Apply gamma correction to a pixmap. All components
- of all pixels are modified (except alpha, which is unchanged).
-
- gamma: The gamma value to apply; 1.0 for no change.
- */
- FZ_FUNCTION void fz_gamma_pixmap(const FzPixmap& pix, float gamma);
- /** Class-aware wrapper for `::fz_generate_transition()`. */
- /**
- Generate a frame of a transition.
-
- tpix: Target pixmap
- opix: Old pixmap
- npix: New pixmap
- time: Position within the transition (0 to 256)
- trans: Transition details
-
- Returns 1 if successfully generated a frame.
-
- Note: Pixmaps must include alpha.
- */
- FZ_FUNCTION int fz_generate_transition(const FzPixmap& tpix, const FzPixmap& opix, const FzPixmap& npix, int time, FzTransition& trans);
- /** Class-aware wrapper for `::fz_get_glyph_name()`. */
- /**
- Find the name of a glyph
-
- font: The font to look for the glyph in.
-
- glyph: The glyph id to look for.
-
- buf: Pointer to a buffer for the name to be inserted into.
-
- size: The size of the buffer.
-
- If a font contains a name table, then the name of the glyph
- will be returned in the supplied buffer. Otherwise a name
- is synthesised. The name will be truncated to fit in
- the buffer.
- */
- FZ_FUNCTION void fz_get_glyph_name(const FzFont& font, int glyph, char *buf, int size);
- /** Class-aware wrapper for `::fz_get_glyph_name2()`. */
- /**
- C++ alternative to fz_get_glyph_name() that returns information in a std::string.
- */
- FZ_FUNCTION std::string fz_get_glyph_name2(const FzFont& font, int glyph);
- /** Class-aware wrapper for `::fz_get_pixmap_from_image()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_get_pixmap_from_image(::fz_image *image, const ::fz_irect *subarea, ::fz_matrix *ctm)` => `(fz_pixmap *, int w, int h)`
- */
- /**
- Called to get a handle to a pixmap from an image.
-
- image: The image to retrieve a pixmap from.
-
- subarea: The subarea of the image that we actually care about
- (or NULL to indicate the whole image).
-
- ctm: Optional, unless subarea is given. If given, then on
- entry this is the transform that will be applied to the complete
- image. It should be updated on exit to the transform to apply to
- the given subarea of the image. This is used to calculate the
- desired width/height for subsampling.
-
- w: If non-NULL, a pointer to an int to be updated on exit to the
- width (in pixels) that the scaled output will cover.
-
- h: If non-NULL, a pointer to an int to be updated on exit to the
- height (in pixels) that the scaled output will cover.
-
- Returns a non NULL kept pixmap pointer. May throw exceptions.
- */
- FZ_FUNCTION FzPixmap fz_get_pixmap_from_image(const FzImage& image, FzIrect& subarea, FzMatrix& ctm, int *w, int *h);
- /** Class-aware wrapper for `::fz_get_unscaled_pixmap_from_image()`. */
- /**
- Calls fz_get_pixmap_from_image() with ctm, subarea, w and h all set to NULL.
- */
- FZ_FUNCTION FzPixmap fz_get_unscaled_pixmap_from_image(const FzImage& image);
- /** Class-aware wrapper for `::fz_getopt()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_getopt(int nargc, const char *ostr)` => `(int, char *nargv)`
- */
- /**
- Identical to fz_getopt_long, but with a NULL longopts field, signifying no long
- options.
- */
- FZ_FUNCTION int fz_getopt(int nargc, char **nargv, const char *ostr);
- /** Class-aware wrapper for `::fz_getopt_long()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_getopt_long(int nargc, const char *ostr, const ::fz_getopt_long_options *longopts)` => `(int, char *nargv)`
- */
- /**
- Simple functions/variables for use in tools.
-
- ostr = option string. Comprises single letter options, followed by : if there
- is an argument to the option.
-
- longopts: NULL (indicating no long options), or a pointer to an array of
- longoptions, terminated by an entry with option == NULL.
-
- In the event of matching a single char option, this function will normally
- return the char. The exception to this is when the option requires an
- argument and none is supplied; in this case we return ':'.
-
- In the event of matching a long option, this function returns 0, with fz_optlong
- set to point to the matching option.
-
- A long option entry may be followed with : to indicate there is an argument to the
- option. If the need for an argument is specified in this way, and no argument is
- given, an error will be displayed and argument processing will stop. If an argument
- is given, and the long option record contains a non-null flag pointer, then the code
- will decode the argument and fill in that flag pointer. Specifically,
- case-insensitive matches to 'yes', 'no', 'true' and 'false' will cause a value of 0
- or 1 as appropriate to be written; failing this the arg will be interpreted as a
- decimal integer using atoi.
-
- A long option entry may be followed by an list of options (e.g. myoption=foo|bar|baz)
- and the option will be passed to fz_opt_from_list. The return value of that will be
- placed in fz_optitem. If the return value of that function is -1, then an error will
- be displayed and argument processing will stop.
-
- In the event of reaching the end of the arg list or '--', this function returns EOF.
-
- In the event of failing to match anything, an error is printed, and we return '?'.
-
- If an argument is expected for the option, then fz_optarg will be returned pointing
- at the start of the argument. Examples of supported argument formats: '-r500', '-r 500',
- '--resolution 500', '--resolution=500'.
- */
- FZ_FUNCTION int fz_getopt_long(int nargc, char **nargv, const char *ostr, const FzGetoptLongOptions& longopts);
- /** Class-aware wrapper for `::fz_glyph_bbox()`. */
- /**
- Return the bounding box of the glyph in pixels.
- */
- FZ_FUNCTION FzIrect fz_glyph_bbox(const FzGlyph& glyph);
- /** Class-aware wrapper for `::fz_glyph_bbox_no_ctx()`. */
- FZ_FUNCTION FzIrect fz_glyph_bbox_no_ctx(const FzGlyph& src);
- /** Class-aware wrapper for `::fz_glyph_cacheable()`. */
- /**
- Determine if a given glyph in a font
- is cacheable. Certain glyphs in a type 3 font cannot safely
- be cached, as their appearance depends on the enclosing
- graphic state.
-
- font: The font to look for the glyph in.
-
- gif: The glyph to query.
-
- Returns non-zero if cacheable, 0 if not.
- */
- FZ_FUNCTION int fz_glyph_cacheable(const FzFont& font, int gid);
- /** Class-aware wrapper for `::fz_glyph_height()`. */
- /**
- Return the height of the glyph in pixels.
- */
- FZ_FUNCTION int fz_glyph_height(const FzGlyph& glyph);
- /** Class-aware wrapper for `::fz_glyph_name_from_unicode_sc()`. */
- FZ_FUNCTION const char *fz_glyph_name_from_unicode_sc(int unicode);
- /** Class-aware wrapper for `::fz_glyph_width()`. */
- /**
- Return the width of the glyph in pixels.
- */
- FZ_FUNCTION int fz_glyph_width(const FzGlyph& glyph);
- /** Class-aware wrapper for `::fz_graphics_aa_level()`. */
- /**
- Get the number of bits of antialiasing we are
- using for graphics. Between 0 and 8.
- */
- FZ_FUNCTION int fz_graphics_aa_level();
- /** Class-aware wrapper for `::fz_graphics_min_line_width()`. */
- /**
- Get the minimum line width to be
- used for stroked lines.
-
- min_line_width: The minimum line width to use (in pixels).
- */
- FZ_FUNCTION float fz_graphics_min_line_width();
- /** Class-aware wrapper for `::fz_gridfit_matrix()`. */
- /**
- Grid fit a matrix.
-
- as_tiled = 0 => adjust the matrix so that the image of the unit
- square completely covers any pixel that was touched by the
- image of the unit square under the original matrix.
-
- as_tiled = 1 => adjust the matrix so that the corners of the
- image of the unit square align with the closest integer corner
- of the image of the unit square under the original matrix.
- */
- FZ_FUNCTION FzMatrix fz_gridfit_matrix(int as_tiled, const FzMatrix& m);
- /** Class-aware wrapper for `::fz_grisu()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_grisu(float f, char *s)` => `(int, int exp)`
- */
- FZ_FUNCTION int fz_grisu(float f, char *s, int *exp);
- /** Class-aware wrapper for `::fz_grow_buffer()`. */
- /**
- Make some space within a buffer (i.e. ensure that
- capacity > size).
- */
- FZ_FUNCTION void fz_grow_buffer(const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_has_archive_entry()`. */
- /**
- Check if entry by given name exists.
-
- If named entry does not exist 0 will be returned, if it does
- exist 1 is returned.
-
- name: Entry name to look for, this must be an exact match to
- the entry name in the archive.
- */
- FZ_FUNCTION int fz_has_archive_entry(const FzArchive& arch, const char *name);
- /** Class-aware wrapper for `::fz_has_option()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_has_option(const char *opts, const char *key)` => `(int, const char *val)`
- */
- /**
- Look for a given option (key) in the opts string. Return 1 if
- it has it, and update *val to point to the value within opts.
- */
- FZ_FUNCTION int fz_has_option(const char *opts, const char *key, const char **val);
- /** Class-aware wrapper for `::fz_has_permission()`. */
- /**
- Check permission flags on document.
- */
- FZ_FUNCTION int fz_has_permission(const FzDocument& doc, ::fz_permission p);
- /** Class-aware wrapper for `::fz_hash_filter()`. */
- /**
- Iterate over the entries in a hash table, removing all the ones where callback returns true.
- Does NOT free the value of the entry, so the caller is expected to take care of this.
- */
- FZ_FUNCTION void fz_hash_filter(const FzHashTable& table, void *state, ::fz_hash_table_filter_fn *callback);
- /** Class-aware wrapper for `::fz_hash_find()`. */
- /**
- Search for a matching hash within the table, and return the
- associated value.
- */
- FZ_FUNCTION void *fz_hash_find(const FzHashTable& table, const void *key);
- /** Class-aware wrapper for `::fz_hash_for_each()`. */
- /**
- Iterate over the entries in a hash table.
- */
- FZ_FUNCTION void fz_hash_for_each(const FzHashTable& table, void *state, ::fz_hash_table_for_each_fn *callback);
- /** Class-aware wrapper for `::fz_hash_insert()`. */
- /**
- Insert a new key/value pair into the hash table.
-
- If an existing entry with the same key is found, no change is
- made to the hash table, and a pointer to the existing value is
- returned.
-
- If no existing entry with the same key is found, ownership of
- val passes in, key is copied, and NULL is returned.
- */
- FZ_FUNCTION void *fz_hash_insert(const FzHashTable& table, const void *key, void *val);
- /** Class-aware wrapper for `::fz_hash_remove()`. */
- /**
- Remove the entry for a given key.
-
- The value is NOT freed, so the caller is expected to take care
- of this.
- */
- FZ_FUNCTION void fz_hash_remove(const FzHashTable& table, const void *key);
- /** Class-aware wrapper for `::fz_hb_lock()`. */
- /**
- Lock against Harfbuzz being called
- simultaneously in several threads. This reuses
- FZ_LOCK_FREETYPE.
- */
- FZ_FUNCTION void fz_hb_lock();
- /** Class-aware wrapper for `::fz_hb_unlock()`. */
- /**
- Unlock after a Harfbuzz call. This reuses
- FZ_LOCK_FREETYPE.
- */
- FZ_FUNCTION void fz_hb_unlock();
- /** Class-aware wrapper for `::fz_highlight_selection()`. */
- /**
- Return a list of quads to highlight lines inside the selection
- points.
- */
- FZ_FUNCTION int fz_highlight_selection(const FzStextPage& page, const FzPoint& a, const FzPoint& b, FzQuad& quads, int max_quads);
- /** Class-aware wrapper for `::fz_highlight_selection2()`. */
- /**
- C++ alternative to fz_highlight_selection() that returns quads in a
- std::vector.
- */
- FZ_FUNCTION std::vector<fz_quad> fz_highlight_selection2(const FzStextPage& page, const FzPoint& a, const FzPoint& b, int max_quads);
- /** Class-aware wrapper for `::fz_ignore_error()`. */
- FZ_FUNCTION void fz_ignore_error();
- /** Class-aware wrapper for `::fz_ignore_text()`. */
- FZ_FUNCTION void fz_ignore_text(const FzDevice& dev, const FzText& text, const FzMatrix& ctm);
- /** Class-aware wrapper for `::fz_image_orientation()`. */
- /**
- Request the natural orientation of an image.
-
- This is for images (such as JPEG) that can contain internal
- specifications of rotation/flips. This is ignored by all the
- internal decode/rendering routines, but can be used by callers
- (such as the image document handler) to respect such
- specifications.
-
- The values used by MuPDF are as follows, with the equivalent
- Exif specifications given for information:
-
- 0: Undefined
- 1: 0 degree ccw rotation. (Exif = 1)
- 2: 90 degree ccw rotation. (Exif = 8)
- 3: 180 degree ccw rotation. (Exif = 3)
- 4: 270 degree ccw rotation. (Exif = 6)
- 5: flip on X. (Exif = 2)
- 6: flip on X, then rotate ccw by 90 degrees. (Exif = 5)
- 7: flip on X, then rotate ccw by 180 degrees. (Exif = 4)
- 8: flip on X, then rotate ccw by 270 degrees. (Exif = 7)
- */
- FZ_FUNCTION uint8_t fz_image_orientation(const FzImage& image);
- /** Class-aware wrapper for `::fz_image_orientation_matrix()`. */
- FZ_FUNCTION FzMatrix fz_image_orientation_matrix(const FzImage& image);
- /** Class-aware wrapper for `::fz_image_resolution()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_image_resolution(::fz_image *image)` => `(int xres, int yres)`
- */
- /**
- Request the natural resolution
- of an image.
-
- xres, yres: Pointers to ints to be updated with the
- natural resolution of an image (or a sensible default
- if not encoded).
- */
- FZ_FUNCTION void fz_image_resolution(const FzImage& image, int *xres, int *yres);
- /** Class-aware wrapper for `::fz_image_size()`. */
- /**
- Return the size of the storage used by an image.
- */
- FZ_FUNCTION size_t fz_image_size(const FzImage& im);
- /** Class-aware wrapper for `::fz_image_type_name()`. */
- /**
- Map from FZ_IMAGE_* value to string.
-
- The returned string is static and therefore must not be freed.
- */
- FZ_FUNCTION const char *fz_image_type_name(int type);
- /** Class-aware wrapper for `::fz_include_point_in_rect()`. */
- /**
- Expand a bbox to include a given point.
- To create a rectangle that encompasses a sequence of points, the
- rectangle must first be set to be the empty rectangle at one of
- the points before including the others.
- */
- FZ_FUNCTION FzRect fz_include_point_in_rect(const FzRect& r, const FzPoint& p);
- /** Class-aware wrapper for `::fz_init_text_decoder()`. */
- FZ_FUNCTION void fz_init_text_decoder(const FzTextDecoder& dec, const char *encoding);
- /** Class-aware wrapper for `::fz_install_load_system_font_funcs()`. */
- /**
- Install functions to allow MuPDF to request fonts from the
- system.
-
- Only one set of hooks can be in use at a time.
- */
- FZ_FUNCTION void fz_install_load_system_font_funcs(::fz_load_system_font_fn *f, ::fz_load_system_cjk_font_fn *f_cjk, ::fz_load_system_fallback_font_fn *f_fallback);
- /** Class-aware wrapper for `::fz_install_load_system_font_funcs2()`. */
- /**
- Alternative to fz_install_load_system_font_funcs() that takes args in a
- struct, to allow use from Python/C# via Swig Directors.
- */
- FZ_FUNCTION void fz_install_load_system_font_funcs2(FzInstallLoadSystemFontFuncsArgs& args);
- /** Class-aware wrapper for `::fz_int2_heap_debug()`. */
- FZ_FUNCTION void fz_int2_heap_debug(const FzInt2Heap& heap);
- /** Class-aware wrapper for `::fz_int2_heap_dump()`. */
- FZ_FUNCTION void fz_int2_heap_dump(const FzOutput& out, const FzInt2Heap& heap);
- /** Class-aware wrapper for `::fz_int2_heap_insert()`. */
- FZ_FUNCTION void fz_int2_heap_insert(const FzInt2Heap& heap, const FzInt2& v);
- /** Class-aware wrapper for `::fz_int2_heap_sort()`. */
- FZ_FUNCTION void fz_int2_heap_sort(const FzInt2Heap& heap);
- /** Class-aware wrapper for `::fz_int2_heap_uniq()`. */
- FZ_FUNCTION void fz_int2_heap_uniq(const FzInt2Heap& heap);
- /** Class-aware wrapper for `::fz_int_heap_debug()`. */
- FZ_FUNCTION void fz_int_heap_debug(const FzIntHeap& heap);
- /** Class-aware wrapper for `::fz_int_heap_dump()`. */
- FZ_FUNCTION void fz_int_heap_dump(const FzOutput& out, const FzIntHeap& heap);
- /** Class-aware wrapper for `::fz_int_heap_insert()`. */
- FZ_FUNCTION void fz_int_heap_insert(const FzIntHeap& heap, int v);
- /** Class-aware wrapper for `::fz_int_heap_sort()`. */
- FZ_FUNCTION void fz_int_heap_sort(const FzIntHeap& heap);
- /** Class-aware wrapper for `::fz_int_heap_uniq()`. */
- FZ_FUNCTION void fz_int_heap_uniq(const FzIntHeap& heap);
- /** Class-aware wrapper for `::fz_intersect_irect()`. */
- /**
- Compute intersection of two bounding boxes.
-
- Similar to fz_intersect_rect but operates on two bounding
- boxes instead of two rectangles.
- */
- FZ_FUNCTION FzIrect fz_intersect_irect(const FzIrect& a, const FzIrect& b);
- /** Class-aware wrapper for `::fz_intersect_rect()`. */
- /**
- Compute intersection of two rectangles.
-
- Given two rectangles, update the first to be the smallest
- axis-aligned rectangle that covers the area covered by both
- given rectangles. If either rectangle is empty then the
- intersection is also empty. If either rectangle is infinite
- then the intersection is simply the non-infinite rectangle.
- Should both rectangles be infinite, then the intersection is
- also infinite.
- */
- FZ_FUNCTION FzRect fz_intersect_rect(const FzRect& a, const FzRect& b);
- /** Class-aware wrapper for `::fz_intptr_heap_debug()`. */
- FZ_FUNCTION void fz_intptr_heap_debug(const FzIntptrHeap& heap);
- /** Class-aware wrapper for `::fz_intptr_heap_dump()`. */
- FZ_FUNCTION void fz_intptr_heap_dump(const FzOutput& out, const FzIntptrHeap& heap);
- /** Class-aware wrapper for `::fz_intptr_heap_insert()`. */
- FZ_FUNCTION void fz_intptr_heap_insert(const FzIntptrHeap& heap, const FzIntptr& v);
- /** Class-aware wrapper for `::fz_intptr_heap_sort()`. */
- FZ_FUNCTION void fz_intptr_heap_sort(const FzIntptrHeap& heap);
- /** Class-aware wrapper for `::fz_intptr_heap_uniq()`. */
- FZ_FUNCTION void fz_intptr_heap_uniq(const FzIntptrHeap& heap);
- /** Class-aware wrapper for `::fz_invert_bitmap()`. */
- /**
- Invert bitmap.
-
- Never throws exceptions.
- */
- FZ_FUNCTION void fz_invert_bitmap(const FzBitmap& bmp);
- /** Class-aware wrapper for `::fz_invert_matrix()`. */
- /**
- Create an inverse matrix.
-
- matrix: Matrix to invert. A degenerate matrix, where the
- determinant is equal to zero, can not be inverted and the
- original matrix is returned instead.
-
- Returns inverse.
- */
- FZ_FUNCTION FzMatrix fz_invert_matrix(const FzMatrix& matrix);
- /** Class-aware wrapper for `::fz_invert_pixmap()`. */
- /**
- Invert all the pixels in a pixmap. All components (process and
- spots) of all pixels are inverted (except alpha, which is
- unchanged).
- */
- FZ_FUNCTION void fz_invert_pixmap(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_invert_pixmap_alpha()`. */
- /**
- Invert the alpha of all the pixels in a pixmap.
- */
- FZ_FUNCTION void fz_invert_pixmap_alpha(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_invert_pixmap_luminance()`. */
- /**
- Transform the pixels in a pixmap so that luminance of each
- pixel is inverted, and the chrominance remains unchanged (as
- much as accuracy allows).
-
- All components of all pixels are inverted (except alpha, which
- is unchanged). Only supports Grey and RGB bitmaps.
- */
- FZ_FUNCTION void fz_invert_pixmap_luminance(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_invert_pixmap_raw()`. */
- /**
- Invert all the pixels in a non-premultiplied pixmap in a
- very naive manner.
- */
- FZ_FUNCTION void fz_invert_pixmap_raw(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_invert_pixmap_rect()`. */
- /**
- Invert all the pixels in a given rectangle of a (premultiplied)
- pixmap. All components of all pixels in the rectangle are
- inverted (except alpha, which is unchanged).
- */
- FZ_FUNCTION void fz_invert_pixmap_rect(const FzPixmap& image, const FzIrect& rect);
- /** Class-aware wrapper for `::fz_irect_from_rect()`. */
- /**
- Convert a rect into the minimal bounding box
- that covers the rectangle.
-
- Coordinates in a bounding box are integers, so rounding of the
- rects coordinates takes place. The top left corner is rounded
- upwards and left while the bottom right corner is rounded
- downwards and to the right.
- */
- FZ_FUNCTION FzIrect fz_irect_from_rect(const FzRect& rect);
- /** Class-aware wrapper for `::fz_irect_height()`. */
- /**
- Return the height of an irect. Invalid irects return 0.
- */
- FZ_FUNCTION int fz_irect_height(const FzIrect& r);
- /** Class-aware wrapper for `::fz_irect_width()`. */
- /**
- Return the width of an irect. Invalid irects return 0.
- */
- FZ_FUNCTION unsigned int fz_irect_width(const FzIrect& r);
- /** Class-aware wrapper for `::fz_is_cfb_archive()`. */
- /**
- Detect if stream object is a cfb archive.
-
- Assumes that the stream object is seekable.
- */
- FZ_FUNCTION int fz_is_cfb_archive(const FzStream& file);
- /** Class-aware wrapper for `::fz_is_directory()`. */
- /**
- Determine if a given path is a directory.
-
- In the case of the path not existing, or having no access
- we will return 0.
- */
- FZ_FUNCTION int fz_is_directory(const char *path);
- /** Class-aware wrapper for `::fz_is_document_reflowable()`. */
- /**
- Is the document reflowable.
-
- Returns 1 to indicate reflowable documents, otherwise 0.
- */
- FZ_FUNCTION int fz_is_document_reflowable(const FzDocument& doc);
- /** Class-aware wrapper for `::fz_is_empty_irect()`. */
- FZ_FUNCTION int fz_is_empty_irect(const FzIrect& r);
- /** Class-aware wrapper for `::fz_is_empty_quad()`. */
- /**
- Is a quad empty?
- */
- FZ_FUNCTION int fz_is_empty_quad(const FzQuad& q);
- /** Class-aware wrapper for `::fz_is_empty_rect()`. */
- /**
- Check if rectangle is empty.
-
- An empty rectangle is defined as one whose area is zero.
- All invalid rectangles are empty.
- */
- FZ_FUNCTION int fz_is_empty_rect(const FzRect& r);
- /** Class-aware wrapper for `::fz_is_eof()`. */
- /**
- Query if the stream has reached EOF (during normal bytewise
- reading).
-
- See fz_is_eof_bits for the equivalent function for bitwise
- reading.
- */
- FZ_FUNCTION int fz_is_eof(const FzStream& stm);
- /** Class-aware wrapper for `::fz_is_eof_bits()`. */
- /**
- Query if the stream has reached EOF (during bitwise
- reading).
-
- See fz_is_eof for the equivalent function for bytewise
- reading.
- */
- FZ_FUNCTION int fz_is_eof_bits(const FzStream& stm);
- /** Class-aware wrapper for `::fz_is_external_link()`. */
- /**
- Query whether a link is external to a document (determined by
- uri containing a ':', intended to match with '://' which
- separates the scheme from the scheme specific parts in URIs).
- */
- FZ_FUNCTION int fz_is_external_link(const char *uri);
- /** Class-aware wrapper for `::fz_is_identity()`. */
- FZ_FUNCTION int fz_is_identity(const FzMatrix& m);
- /** Class-aware wrapper for `::fz_is_infinite_irect()`. */
- /**
- Check if an integer rectangle
- is infinite.
- */
- FZ_FUNCTION int fz_is_infinite_irect(const FzIrect& r);
- /** Class-aware wrapper for `::fz_is_infinite_quad()`. */
- /**
- Is a quad infinite?
- */
- FZ_FUNCTION int fz_is_infinite_quad(const FzQuad& q);
- /** Class-aware wrapper for `::fz_is_infinite_rect()`. */
- /**
- Check if rectangle is infinite.
- */
- FZ_FUNCTION int fz_is_infinite_rect(const FzRect& r);
- /** Class-aware wrapper for `::fz_is_irect_inside_irect()`. */
- /**
- Inclusion test for irects.
-
- rects are assumed to be both open or both closed.
-
- No invalid rect can include any other rect.
- No invalid rect can be included by any rect.
- Empty (point) rects can include themselves.
- Empty (line) rects can include many (subline) rects.
- */
- FZ_FUNCTION int fz_is_irect_inside_irect(const FzIrect& inner, const FzIrect& outer);
- /** Class-aware wrapper for `::fz_is_libarchive_archive()`. */
- /**
- Detect if stream object is an archive supported by libarchive.
-
- Assumes that the stream object is seekable.
- */
- FZ_FUNCTION int fz_is_libarchive_archive(const FzStream& file);
- /** Class-aware wrapper for `::fz_is_lossy_image()`. */
- FZ_FUNCTION int fz_is_lossy_image(const FzImage& image);
- /** Class-aware wrapper for `::fz_is_page_range()`. */
- /**
- Check and parse string into page ranges:
- /,?(-?\d+|N)(-(-?\d+|N))?/
- */
- FZ_FUNCTION int fz_is_page_range(const char *s);
- /** Class-aware wrapper for `::fz_is_pixmap_monochrome()`. */
- /**
- Check if the pixmap is a 1-channel image containing samples with
- only values 0 and 255
- */
- FZ_FUNCTION int fz_is_pixmap_monochrome(const FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_is_point_inside_irect()`. */
- /**
- Inclusion test for irects. (Rect is assumed to be open, i.e.
- top right corner is not included).
- */
- FZ_FUNCTION int fz_is_point_inside_irect(int x, int y, const FzIrect& r);
- /** Class-aware wrapper for `::fz_is_point_inside_quad()`. */
- /**
- Inclusion test for quads.
- */
- FZ_FUNCTION int fz_is_point_inside_quad(const FzPoint& p, const FzQuad& q);
- /** Class-aware wrapper for `::fz_is_point_inside_rect()`. */
- /**
- Inclusion test for rects. (Rect is assumed to be open, i.e.
- top right corner is not included).
- */
- FZ_FUNCTION int fz_is_point_inside_rect(const FzPoint& p, const FzRect& r);
- /** Class-aware wrapper for `::fz_is_pow2()`. */
- FZ_FUNCTION int fz_is_pow2(int a);
- /** Class-aware wrapper for `::fz_is_quad_inside_quad()`. */
- /**
- Inclusion test for quad in quad.
-
- This may break down if quads are not 'well formed'.
- */
- FZ_FUNCTION int fz_is_quad_inside_quad(const FzQuad& needle, const FzQuad& haystack);
- /** Class-aware wrapper for `::fz_is_quad_intersecting_quad()`. */
- /**
- Intersection test for quads.
-
- This may break down if quads are not 'well formed'.
- */
- FZ_FUNCTION int fz_is_quad_intersecting_quad(const FzQuad& a, const FzQuad& b);
- /** Class-aware wrapper for `::fz_is_rect_inside_rect()`. */
- /**
- Inclusion test for rects.
-
- rects are assumed to be both open or both closed.
-
- No invalid rect can include any other rect.
- No invalid rect can be included by any rect.
- Empty (point) rects can include themselves.
- Empty (line) rects can include many (subline) rects.
- */
- FZ_FUNCTION int fz_is_rect_inside_rect(const FzRect& inner, const FzRect& outer);
- /** Class-aware wrapper for `::fz_is_rectilinear()`. */
- /**
- Check if a transformation is rectilinear.
-
- Rectilinear means that no shearing is present and that any
- rotations present are a multiple of 90 degrees. Usually this
- is used to make sure that axis-aligned rectangles before the
- transformation are still axis-aligned rectangles afterwards.
- */
- FZ_FUNCTION int fz_is_rectilinear(const FzMatrix& m);
- /** Class-aware wrapper for `::fz_is_tar_archive()`. */
- /**
- Detect if stream object is a tar archive.
-
- Assumes that the stream object is seekable.
- */
- FZ_FUNCTION int fz_is_tar_archive(const FzStream& file);
- /** Class-aware wrapper for `::fz_is_valid_blend_colorspace()`. */
- /**
- Check to see that a colorspace is appropriate to be used as
- a blending space (i.e. only grey, rgb or cmyk).
- */
- FZ_FUNCTION int fz_is_valid_blend_colorspace(const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_is_valid_irect()`. */
- /**
- Check if an integer rectangle is valid.
- */
- FZ_FUNCTION int fz_is_valid_irect(const FzIrect& r);
- /** Class-aware wrapper for `::fz_is_valid_quad()`. */
- /**
- Is a quad valid?
- */
- FZ_FUNCTION int fz_is_valid_quad(const FzQuad& q);
- /** Class-aware wrapper for `::fz_is_valid_rect()`. */
- /**
- Check if rectangle is valid.
- */
- FZ_FUNCTION int fz_is_valid_rect(const FzRect& r);
- /** Class-aware wrapper for `::fz_is_valid_xml_char()`. */
- FZ_FUNCTION int fz_is_valid_xml_char(int c);
- /** Class-aware wrapper for `::fz_is_valid_xml_string()`. */
- FZ_FUNCTION int fz_is_valid_xml_string(const char *s);
- /** Class-aware wrapper for `::fz_is_zip_archive()`. */
- /**
- Detect if stream object is a zip archive.
-
- Assumes that the stream object is seekable.
- */
- FZ_FUNCTION int fz_is_zip_archive(const FzStream& file);
- /** Class-aware wrapper for `::fz_iso8859_1_from_unicode()`. */
- FZ_FUNCTION int fz_iso8859_1_from_unicode(int u);
- /** Class-aware wrapper for `::fz_iso8859_7_from_unicode()`. */
- FZ_FUNCTION int fz_iso8859_7_from_unicode(int u);
- /** Class-aware wrapper for `::fz_jbig2_globals_data()`. */
- /**
- Return buffer containing jbig2 globals data stream.
- */
- FZ_FUNCTION FzBuffer fz_jbig2_globals_data(const FzJbig2Globals& globals);
- /* Class-aware wrapper for `fz_json_array_get()`
- is not available because returned wrapper class for `fz_json`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_json_array_length()`. */
- FZ_FUNCTION int fz_json_array_length(const FzJson& array);
- /** Class-aware wrapper for `::fz_json_array_push()`. */
- FZ_FUNCTION void fz_json_array_push(const FzPool& pool, const FzJson& array, const FzJson& item);
- /** Class-aware wrapper for `::fz_json_is_array()`. */
- FZ_FUNCTION int fz_json_is_array(const FzJson& json);
- /** Class-aware wrapper for `::fz_json_is_boolean()`. */
- FZ_FUNCTION int fz_json_is_boolean(const FzJson& json);
- /** Class-aware wrapper for `::fz_json_is_null()`. */
- FZ_FUNCTION int fz_json_is_null(const FzJson& json);
- /** Class-aware wrapper for `::fz_json_is_number()`. */
- FZ_FUNCTION int fz_json_is_number(const FzJson& json);
- /** Class-aware wrapper for `::fz_json_is_object()`. */
- FZ_FUNCTION int fz_json_is_object(const FzJson& json);
- /** Class-aware wrapper for `::fz_json_is_string()`. */
- FZ_FUNCTION int fz_json_is_string(const FzJson& json);
- /* Class-aware wrapper for `fz_json_new_array()`
- is not available because returned wrapper class for `fz_json`
- is non-copyable. */
- /* Class-aware wrapper for `fz_json_new_boolean()`
- is not available because returned wrapper class for `fz_json`
- is non-copyable. */
- /* Class-aware wrapper for `fz_json_new_null()`
- is not available because returned wrapper class for `fz_json`
- is non-copyable. */
- /* Class-aware wrapper for `fz_json_new_number()`
- is not available because returned wrapper class for `fz_json`
- is non-copyable. */
- /* Class-aware wrapper for `fz_json_new_object()`
- is not available because returned wrapper class for `fz_json`
- is non-copyable. */
- /* Class-aware wrapper for `fz_json_new_string()`
- is not available because returned wrapper class for `fz_json`
- is non-copyable. */
- /* Class-aware wrapper for `fz_json_object_get()`
- is not available because returned wrapper class for `fz_json`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_json_object_set()`. */
- FZ_FUNCTION void fz_json_object_set(const FzPool& pool, const FzJson& object, const char *key, const FzJson& item);
- /** Class-aware wrapper for `::fz_json_to_boolean()`. */
- FZ_FUNCTION int fz_json_to_boolean(const FzJson& json);
- /** Class-aware wrapper for `::fz_json_to_number()`. */
- FZ_FUNCTION double fz_json_to_number(const FzJson& json);
- /** Class-aware wrapper for `::fz_json_to_string()`. */
- FZ_FUNCTION const char *fz_json_to_string(const FzJson& json);
- /** Class-aware wrapper for `::fz_koi8u_from_unicode()`. */
- FZ_FUNCTION int fz_koi8u_from_unicode(int u);
- /** Class-aware wrapper for `::fz_last_page()`. */
- /**
- Function to get the location for the last page in the document.
- Using this can be far more efficient in some cases than calling
- fz_count_pages and using the page number.
- */
- FZ_FUNCTION FzLocation fz_last_page(const FzDocument& doc);
- /** Class-aware wrapper for `::fz_layout_document()`. */
- /**
- Layout reflowable document types.
-
- w, h: Page size in points.
- em: Default font size in points.
- */
- FZ_FUNCTION void fz_layout_document(const FzDocument& doc, float w, float h, float em);
- /** Class-aware wrapper for `::fz_linecap_from_string()`. */
- FZ_FUNCTION ::fz_linecap fz_linecap_from_string(const char *s);
- /** Class-aware wrapper for `::fz_linejoin_from_string()`. */
- FZ_FUNCTION ::fz_linejoin fz_linejoin_from_string(const char *s);
- /** Class-aware wrapper for `::fz_lineto()`. */
- /**
- Append a 'lineto' command to an open path.
-
- path: The path to modify.
-
- x, y: The coordinate to line to.
-
- Throws exceptions on failure to allocate, or attempting to
- modify a packed path.
- */
- FZ_FUNCTION void fz_lineto(const FzPath& path, float x, float y);
- /** Class-aware wrapper for `::fz_list_archive_entry()`. */
- /**
- Get listed name of entry position idx.
-
- idx: Must be a value >= 0 < return value from
- fz_count_archive_entries. If not in range NULL will be
- returned.
-
- May throw an exception if this type of archive cannot list the
- entries (such as a directory).
- */
- FZ_FUNCTION const char *fz_list_archive_entry(const FzArchive& arch, int idx);
- /** Class-aware wrapper for `::fz_load_bmp_subimage()`. */
- FZ_FUNCTION FzPixmap fz_load_bmp_subimage(const unsigned char *buf, size_t len, int subimage);
- /** Class-aware wrapper for `::fz_load_bmp_subimage_count()`. */
- FZ_FUNCTION int fz_load_bmp_subimage_count(const unsigned char *buf, size_t len);
- /** Class-aware wrapper for `::fz_load_chapter_page()`. */
- /**
- Load a page.
-
- After fz_load_page is it possible to retrieve the size of the
- page using fz_bound_page, or to render the page using
- fz_run_page_*. Free the page by calling fz_drop_page.
-
- chapter: chapter number, 0 is the first chapter of the document.
- number: page number, 0 is the first page of the chapter.
- */
- FZ_FUNCTION FzPage fz_load_chapter_page(const FzDocument& doc, int chapter, int page);
- /** Class-aware wrapper for `::fz_load_fallback_font()`. */
- /**
- Try to load a fallback font for the
- given combination of font attributes. Whether a font is
- present or not will depend on the configuration in which
- MuPDF is built.
-
- script: The script desired (e.g. UCDN_SCRIPT_KATAKANA).
-
- language: The language desired (e.g. FZ_LANG_ja).
-
- serif: 1 if serif desired, 0 otherwise.
-
- bold: 1 if bold desired, 0 otherwise.
-
- italic: 1 if italic desired, 0 otherwise.
-
- Returns a new font handle, or NULL if not available.
- */
- FZ_FUNCTION FzFont fz_load_fallback_font(int script, int language, int serif, int bold, int italic);
- /** Class-aware wrapper for `::fz_load_jbig2_globals()`. */
- /**
- Create a jbig2 globals record from a buffer.
-
- Immutable once created.
- */
- FZ_FUNCTION FzJbig2Globals fz_load_jbig2_globals(const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_load_jbig2_subimage()`. */
- FZ_FUNCTION FzPixmap fz_load_jbig2_subimage(const unsigned char *buf, size_t len, int subimage);
- /** Class-aware wrapper for `::fz_load_jbig2_subimage_count()`. */
- FZ_FUNCTION int fz_load_jbig2_subimage_count(const unsigned char *buf, size_t len);
- /** Class-aware wrapper for `::fz_load_jpx()`. */
- /**
- Exposed for PDF.
- */
- FZ_FUNCTION FzPixmap fz_load_jpx(const unsigned char *data, size_t size, const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_load_links()`. */
- /**
- Load the list of links for a page.
-
- Returns a linked list of all the links on the page, each with
- its clickable region and link destination. Each link is
- reference counted so drop and free the list of links by
- calling fz_drop_link on the pointer return from fz_load_links.
-
- page: Page obtained from fz_load_page.
- */
- FZ_FUNCTION FzLink fz_load_links(const FzPage& page);
- /** Class-aware wrapper for `::fz_load_outline()`. */
- /**
- Load the hierarchical document outline.
-
- Should be freed by fz_drop_outline.
- */
- FZ_FUNCTION FzOutline fz_load_outline(const FzDocument& doc);
- /** Class-aware wrapper for `::fz_load_outline_from_iterator()`. */
- /**
- Routine to implement the old Structure based API from an iterator.
- */
- FZ_FUNCTION FzOutline fz_load_outline_from_iterator(const FzOutlineIterator& iter);
- /** Class-aware wrapper for `::fz_load_page()`. */
- /**
- Load a given page number from a document. This may be much less
- efficient than loading by location (chapter+page) for some
- document types.
- */
- FZ_FUNCTION FzPage fz_load_page(const FzDocument& doc, int number);
- /** Class-aware wrapper for `::fz_load_pnm_subimage()`. */
- FZ_FUNCTION FzPixmap fz_load_pnm_subimage(const unsigned char *buf, size_t len, int subimage);
- /** Class-aware wrapper for `::fz_load_pnm_subimage_count()`. */
- FZ_FUNCTION int fz_load_pnm_subimage_count(const unsigned char *buf, size_t len);
- /** Class-aware wrapper for `::fz_load_system_cjk_font()`. */
- /**
- Attempt to load a given font from
- the system.
-
- name: The name of the desired font.
-
- ordering: The ordering to load the font from (e.g. FZ_ADOBE_KOREA)
-
- serif: 1 if serif desired, 0 otherwise.
-
- Returns a new font handle, or NULL if no matching font was found
- (or on error).
- */
- FZ_FUNCTION FzFont fz_load_system_cjk_font(const char *name, int ordering, int serif);
- /** Class-aware wrapper for `::fz_load_system_font()`. */
- /**
- Attempt to load a given font from the system.
-
- name: The name of the desired font.
-
- bold: 1 if bold desired, 0 otherwise.
-
- italic: 1 if italic desired, 0 otherwise.
-
- needs_exact_metrics: 1 if an exact metrical match is required,
- 0 otherwise.
-
- Returns a new font handle, or NULL if no matching font was found
- (or on error).
- */
- FZ_FUNCTION FzFont fz_load_system_font(const char *name, int bold, int italic, int needs_exact_metrics);
- /** Class-aware wrapper for `::fz_load_tiff_subimage()`. */
- FZ_FUNCTION FzPixmap fz_load_tiff_subimage(const unsigned char *buf, size_t len, int subimage);
- /** Class-aware wrapper for `::fz_load_tiff_subimage_count()`. */
- /**
- Exposed for CBZ.
- */
- FZ_FUNCTION int fz_load_tiff_subimage_count(const unsigned char *buf, size_t len);
- /** Class-aware wrapper for `::fz_load_user_css()`. */
- /**
- Set the user stylesheet by loading the source from a file.
- If the file is missing, do nothing.
- */
- FZ_FUNCTION void fz_load_user_css(const char *filename);
- /** Class-aware wrapper for `::fz_location_from_page_number()`. */
- /**
- Converts from page number to chapter+page. This may cause many
- chapters to be laid out in order to calculate the number of
- pages within those chapters.
- */
- FZ_FUNCTION FzLocation fz_location_from_page_number(const FzDocument& doc, int number);
- /** Class-aware wrapper for `::fz_lock()`. */
- /**
- Lock one of the user supplied mutexes.
- */
- FZ_FUNCTION void fz_lock(int lock);
- /** Class-aware wrapper for `::fz_log_error()`. */
- /**
- Log a (preformatted) string to the registered
- error stream (stderr by default).
- */
- FZ_FUNCTION void fz_log_error(const char *str);
- /** Class-aware wrapper for `::fz_lookup_base14_font()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_lookup_base14_font(const char *name)` => `(const unsigned char *, int len)`
- */
- /**
- Search the builtin base14 fonts for a match.
- Whether a given font is present or not will depend on the
- configuration in which MuPDF is built.
-
- name: The name of the font desired.
-
- len: Pointer to a place to receive the length of the discovered
- font buffer.
-
- Returns a pointer to the font file data, or NULL if not present.
- */
- FZ_FUNCTION const unsigned char *fz_lookup_base14_font(const char *name, int *len);
- /** Class-aware wrapper for `::fz_lookup_blendmode()`. */
- /**
- Map from (case sensitive) blend mode string to enumeration.
- */
- FZ_FUNCTION int fz_lookup_blendmode(const char *name);
- /** Class-aware wrapper for `::fz_lookup_bookmark()`. */
- /**
- Find a bookmark and return its page number.
- */
- FZ_FUNCTION FzLocation fz_lookup_bookmark(const FzDocument& doc, ::fz_bookmark mark);
- /** Class-aware wrapper for `::fz_lookup_builtin_font()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_lookup_builtin_font(const char *name, int bold, int italic)` => `(const unsigned char *, int len)`
- */
- /**
- Search the builtin fonts for a match.
- Whether a given font is present or not will depend on the
- configuration in which MuPDF is built.
-
- name: The name of the font desired.
-
- bold: 1 if bold desired, 0 otherwise.
-
- italic: 1 if italic desired, 0 otherwise.
-
- len: Pointer to a place to receive the length of the discovered
- font buffer.
-
- Returns a pointer to the font file data, or NULL if not present.
- */
- FZ_FUNCTION const unsigned char *fz_lookup_builtin_font(const char *name, int bold, int italic, int *len);
- /** Class-aware wrapper for `::fz_lookup_cjk_font()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_lookup_cjk_font(int ordering)` => `(const unsigned char *, int len, int index)`
- */
- /**
- Search the builtin cjk fonts for a match.
- Whether a font is present or not will depend on the
- configuration in which MuPDF is built.
-
- ordering: The desired ordering of the font (e.g. FZ_ADOBE_KOREA).
-
- len: Pointer to a place to receive the length of the discovered
- font buffer.
-
- Returns a pointer to the font file data, or NULL if not present.
- */
- FZ_FUNCTION const unsigned char *fz_lookup_cjk_font(int ordering, int *len, int *index);
- /** Class-aware wrapper for `::fz_lookup_cjk_font_by_language()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_lookup_cjk_font_by_language(const char *lang)` => `(const unsigned char *, int len, int subfont)`
- */
- /**
- Search the builtin cjk fonts for a match for a given language.
- Whether a font is present or not will depend on the
- configuration in which MuPDF is built.
-
- lang: Pointer to a (case sensitive) language string (e.g.
- "ja", "ko", "zh-Hant" etc).
-
- len: Pointer to a place to receive the length of the discovered
- font buffer.
-
- subfont: Pointer to a place to store the subfont index of the
- discovered font.
-
- Returns a pointer to the font file data, or NULL if not present.
- */
- FZ_FUNCTION const unsigned char *fz_lookup_cjk_font_by_language(const char *lang, int *len, int *subfont);
- /** Class-aware wrapper for `::fz_lookup_cjk_ordering_by_language()`. */
- /**
- Return the matching FZ_ADOBE_* ordering
- for the given language tag, such as "zh-Hant", "zh-Hans", "ja", or "ko".
- */
- FZ_FUNCTION int fz_lookup_cjk_ordering_by_language(const char *name);
- /** Class-aware wrapper for `::fz_lookup_image_type()`. */
- /**
- Map from (case sensitive) image type string to FZ_IMAGE_*
- type value.
- */
- FZ_FUNCTION int fz_lookup_image_type(const char *type);
- /** Class-aware wrapper for `::fz_lookup_metadata()`. */
- /**
- Retrieve document meta data strings.
-
- doc: The document to query.
-
- key: Which meta data key to retrieve...
-
- Basic information:
- 'format' -- Document format and version.
- 'encryption' -- Description of the encryption used.
-
- From the document information dictionary:
- 'info:Title'
- 'info:Author'
- 'info:Subject'
- 'info:Keywords'
- 'info:Creator'
- 'info:Producer'
- 'info:CreationDate'
- 'info:ModDate'
-
- buf: The buffer to hold the results (a nul-terminated UTF-8
- string).
-
- size: Size of 'buf'.
-
- Returns the number of bytes need to store the string plus terminator
- (will be larger than 'size' if the output was truncated), or -1 if the
- key is not recognized or found.
- */
- FZ_FUNCTION int fz_lookup_metadata(const FzDocument& doc, const char *key, char *buf, size_t size);
- /** Class-aware wrapper for `::fz_lookup_metadata2()`. */
- /**
- C++ alternative to `fz_lookup_metadata()` that returns a `std::string`
- or calls `fz_throw()` if not found.
- */
- FZ_FUNCTION std::string fz_lookup_metadata2(const FzDocument& doc, const char *key);
- /** Class-aware wrapper for `::fz_lookup_noto_boxes_font()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_lookup_noto_boxes_font()` => `(const unsigned char *, int len)`
- */
- FZ_FUNCTION const unsigned char *fz_lookup_noto_boxes_font(int *len);
- /** Class-aware wrapper for `::fz_lookup_noto_emoji_font()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_lookup_noto_emoji_font()` => `(const unsigned char *, int len)`
- */
- FZ_FUNCTION const unsigned char *fz_lookup_noto_emoji_font(int *len);
- /** Class-aware wrapper for `::fz_lookup_noto_font()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_lookup_noto_font(int script, int lang)` => `(const unsigned char *, int len, int subfont)`
- */
- /**
- Search the builtin noto fonts for a match.
- Whether a font is present or not will depend on the
- configuration in which MuPDF is built.
-
- script: The script desired (e.g. UCDN_SCRIPT_KATAKANA).
-
- lang: The language desired (e.g. FZ_LANG_ja).
-
- len: Pointer to a place to receive the length of the discovered
- font buffer.
-
- Returns a pointer to the font file data, or NULL if not present.
- */
- FZ_FUNCTION const unsigned char *fz_lookup_noto_font(int script, int lang, int *len, int *subfont);
- /** Class-aware wrapper for `::fz_lookup_noto_math_font()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_lookup_noto_math_font()` => `(const unsigned char *, int len)`
- */
- /**
- Search the builtin noto fonts specific symbol fonts.
- Whether a font is present or not will depend on the
- configuration in which MuPDF is built.
- */
- FZ_FUNCTION const unsigned char *fz_lookup_noto_math_font(int *len);
- /** Class-aware wrapper for `::fz_lookup_noto_music_font()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_lookup_noto_music_font()` => `(const unsigned char *, int len)`
- */
- FZ_FUNCTION const unsigned char *fz_lookup_noto_music_font(int *len);
- /** Class-aware wrapper for `::fz_lookup_noto_stem_from_script()`. */
- /**
- Look up the Noto font file name for a given script.
- From the returned font stem, you can look for Noto fonts on the system in the form:
- Noto(Sans|Serif)${STEM}-Regular.(otf|ttf)
- */
- FZ_FUNCTION const char *fz_lookup_noto_stem_from_script(int script, int language);
- /** Class-aware wrapper for `::fz_lookup_noto_symbol1_font()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_lookup_noto_symbol1_font()` => `(const unsigned char *, int len)`
- */
- FZ_FUNCTION const unsigned char *fz_lookup_noto_symbol1_font(int *len);
- /** Class-aware wrapper for `::fz_lookup_noto_symbol2_font()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_lookup_noto_symbol2_font()` => `(const unsigned char *, int len)`
- */
- FZ_FUNCTION const unsigned char *fz_lookup_noto_symbol2_font(int *len);
- /** Class-aware wrapper for `::fz_lookup_rendering_intent()`. */
- /**
- Map from (case sensitive) rendering intent string to enumeration
- value.
- */
- FZ_FUNCTION int fz_lookup_rendering_intent(const char *name);
- /** Class-aware wrapper for `::fz_lookup_script_name()`. */
- FZ_FUNCTION const char *fz_lookup_script_name(int script, int language);
- /** Class-aware wrapper for `::fz_make_bookmark()`. */
- /**
- Create a bookmark for the given page, which can be used to find
- the same location after the document has been laid out with
- different parameters.
- */
- FZ_FUNCTION ::fz_bookmark fz_make_bookmark(const FzDocument& doc, const FzLocation& loc);
- /** Class-aware wrapper for `::fz_make_irect()`. */
- FZ_FUNCTION FzIrect fz_make_irect(int x0, int y0, int x1, int y1);
- /* Class-aware wrapper for `fz_make_link_dest_none()`
- is not available because returned wrapper class for `fz_link_dest`
- is non-copyable. */
- /* Class-aware wrapper for `fz_make_link_dest_xyz()`
- is not available because returned wrapper class for `fz_link_dest`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_make_location()`. */
- /**
- Simple constructor for fz_locations.
- */
- FZ_FUNCTION FzLocation fz_make_location(int chapter, int page);
- /** Class-aware wrapper for `::fz_make_matrix()`. */
- FZ_FUNCTION FzMatrix fz_make_matrix(float a, float b, float c, float d, float e, float f);
- /** Class-aware wrapper for `::fz_make_point()`. */
- FZ_FUNCTION FzPoint fz_make_point(float x, float y);
- /** Class-aware wrapper for `::fz_make_quad()`. */
- /**
- Inline convenience construction function.
- */
- FZ_FUNCTION FzQuad fz_make_quad(float ul_x, float ul_y, float ur_x, float ur_y, float ll_x, float ll_y, float lr_x, float lr_y);
- /** Class-aware wrapper for `::fz_make_rect()`. */
- FZ_FUNCTION FzRect fz_make_rect(float x0, float y0, float x1, float y1);
- /** Class-aware wrapper for `::fz_malloc()`. */
- /**
- Allocate uninitialized memory of a given size.
- Does NOT clear the memory!
-
- May return NULL for size = 0.
-
- Throws exception in the event of failure to allocate.
- */
- FZ_FUNCTION void *fz_malloc(size_t size);
- /** Class-aware wrapper for `::fz_malloc_aligned()`. */
- /**
- fz_malloc equivalent, except that the block is guaranteed aligned.
- Block must be freed later using fz_free_aligned.
- */
- FZ_FUNCTION void *fz_malloc_aligned(size_t size, int align);
- /** Class-aware wrapper for `::fz_malloc_no_throw()`. */
- /**
- fz_malloc equivalent that returns NULL rather than throwing
- exceptions.
- */
- FZ_FUNCTION void *fz_malloc_no_throw(size_t size);
- /** Class-aware wrapper for `::fz_matrix_expansion()`. */
- /**
- Calculate average scaling factor of matrix.
- */
- FZ_FUNCTION float fz_matrix_expansion(const FzMatrix& m);
- /** Class-aware wrapper for `::fz_matrix_max_expansion()`. */
- /**
- Find the largest expansion performed by this matrix.
- (i.e. max(abs(m.a),abs(m.b),abs(m.c),abs(m.d))
- */
- FZ_FUNCTION float fz_matrix_max_expansion(const FzMatrix& m);
- /** Class-aware wrapper for `::fz_max()`. */
- FZ_FUNCTION float fz_max(float a, float b);
- /** Class-aware wrapper for `::fz_maxi()`. */
- FZ_FUNCTION int fz_maxi(int a, int b);
- /** Class-aware wrapper for `::fz_maxi64()`. */
- FZ_FUNCTION int64_t fz_maxi64(int64_t a, int64_t b);
- /** Class-aware wrapper for `::fz_maxz()`. */
- FZ_FUNCTION size_t fz_maxz(size_t a, size_t b);
- /** Class-aware wrapper for `::fz_md5_buffer()`. */
- /**
- Create an MD5 digest from buffer contents.
-
- Never throws exceptions.
- */
- FZ_FUNCTION void fz_md5_buffer(const FzBuffer& buffer, unsigned char digest[16]);
- /** Class-aware wrapper for `::fz_md5_final()`. */
- /**
- MD5 finalization. Ends an MD5 message-digest operation, writing
- the message digest and zeroizing the context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_md5_final(FzMd5& state, unsigned char digest[16]);
- /** Class-aware wrapper for `::fz_md5_final2()`. */
- /**
- C++ alternative to fz_md5_final() that returns the digest by value.
- */
- FZ_FUNCTION std::vector<unsigned char> fz_md5_final2(FzMd5& md5);
- /** Class-aware wrapper for `::fz_md5_init()`. */
- /**
- MD5 initialization. Begins an MD5 operation, writing a new
- context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_md5_init(FzMd5& state);
- /** Class-aware wrapper for `::fz_md5_pixmap()`. */
- FZ_FUNCTION void fz_md5_pixmap(const FzPixmap& pixmap, unsigned char digest[16]);
- /** Class-aware wrapper for `::fz_md5_pixmap2()`. */
- /**
- C++ alternative to `fz_md5_pixmap()` that returns the digest by value.
- */
- FZ_FUNCTION std::vector<unsigned char> fz_md5_pixmap2(const FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_md5_update()`. */
- /**
- MD5 block update operation. Continues an MD5 message-digest
- operation, processing another message block, and updating the
- context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_md5_update(FzMd5& state, const unsigned char *input, size_t inlen);
- /** Class-aware wrapper for `::fz_md5_update_int64()`. */
- /**
- MD5 block update operation. Continues an MD5 message-digest
- operation, processing an int64, and updating the context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_md5_update_int64(FzMd5& state, int64_t i);
- /** Class-aware wrapper for `::fz_measure_string()`. */
- /**
- Measure the advance width of a UTF8 string should it be added to a text object.
-
- This uses the same layout algorithms as fz_show_string, and can be used
- to calculate text alignment adjustments.
- */
- FZ_FUNCTION FzMatrix fz_measure_string(const FzFont& user_font, const FzMatrix& trm, const char *s, int wmode, int bidi_level, ::fz_bidi_direction markup_dir, ::fz_text_language language);
- /** Class-aware wrapper for `::fz_memmem()`. */
- /**
- Find the start of the first occurrence of the substring needle in haystack.
- */
- FZ_FUNCTION void *fz_memmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen);
- /** Class-aware wrapper for `::fz_memrnd()`. */
- /**
- Fill block with len bytes of pseudo-randomness.
- */
- FZ_FUNCTION void fz_memrnd(uint8_t *block, int len);
- /** Class-aware wrapper for `::fz_min()`. */
- FZ_FUNCTION float fz_min(float a, float b);
- /** Class-aware wrapper for `::fz_mini()`. */
- FZ_FUNCTION int fz_mini(int a, int b);
- /** Class-aware wrapper for `::fz_mini64()`. */
- FZ_FUNCTION int64_t fz_mini64(int64_t a, int64_t b);
- /** Class-aware wrapper for `::fz_minz()`. */
- FZ_FUNCTION size_t fz_minz(size_t a, size_t b);
- /** Class-aware wrapper for `::fz_mkdir()`. */
- FZ_FUNCTION int fz_mkdir(char *path);
- /** Class-aware wrapper for `::fz_morph_error()`. */
- /**
- Called within a catch block this modifies the current
- exception's code. If it's of type 'fromcode' it is
- modified to 'tocode'. Typically used for 'downgrading'
- exception severity.
- */
- FZ_FUNCTION void fz_morph_error(int fromcode, int tocode);
- /** Class-aware wrapper for `::fz_mount_multi_archive()`. */
- /**
- Add an archive to the set of archives handled by a multi
- archive.
-
- If path is NULL, then the archive contents will appear at the
- top level, otherwise, the archives contents will appear prefixed
- by path.
- */
- FZ_FUNCTION void fz_mount_multi_archive(const FzArchive& arch_, const FzArchive& sub, const char *path);
- /** Class-aware wrapper for `::fz_moveto()`. */
- /**
- Append a 'moveto' command to a path.
- This 'opens' a path.
-
- path: The path to modify.
-
- x, y: The coordinate to move to.
-
- Throws exceptions on failure to allocate, or attempting to
- modify a packed path.
- */
- FZ_FUNCTION void fz_moveto(const FzPath& path, float x, float y);
- /** Class-aware wrapper for `::fz_mul255()`. */
- /**
- Multiply scaled two integers in the 0..255 range
- */
- FZ_FUNCTION int fz_mul255(int a, int b);
- /** Class-aware wrapper for `::fz_needs_password()`. */
- /**
- Check if a document is encrypted with a
- non-blank password.
- */
- FZ_FUNCTION int fz_needs_password(const FzDocument& doc);
- /* Class-aware wrapper for `fz_new_arc4_output()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_archive_of_size()`. */
- FZ_FUNCTION FzArchive fz_new_archive_of_size(const FzStream& file, int size);
- /* Class-aware wrapper for `fz_new_ascii85_output()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_asciihex_output()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_band_writer_of_size()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_barcode_image()`. */
- /**
- Create an fz_image from a barcode definition.
-
- type: The type of barcode to create.
- value: The value of the barcode.
- size: The size of the barcode.
- ec_level: error correction level 0-8.
- quiet: whether to include quiet zones (0 or 1).
- hrt: whether to include human readable text below the barcode (0 or 1).
-
- returns a created fz_image.
- */
- FZ_FUNCTION FzImage fz_new_barcode_image(::fz_barcode_type type, const char *value, int size, int ec_level, int quiet, int hrt);
- /** Class-aware wrapper for `::fz_new_barcode_pixmap()`. */
- /**
- Create an fz_pixmap from a barcode definition.
-
- type: The type of barcode to create.
- value: The value of the barcode.
- size: The size of the barcode.
- ec_level: error correction level 0-8.
- quiet: whether to include quiet zones (0 or 1).
- hrt: whether to include human readable text below the barcode (0 or 1).
-
- returns a created fz_pixmap.
- */
- FZ_FUNCTION FzPixmap fz_new_barcode_pixmap(::fz_barcode_type type, const char *value, int size, int ec_level, int quiet, int hrt);
- /** Class-aware wrapper for `::fz_new_base14_font()`. */
- /**
- Create a new font from one of the built-in fonts.
- */
- FZ_FUNCTION FzFont fz_new_base14_font(const char *name);
- /** Class-aware wrapper for `::fz_new_bbox_device()`. */
- /**
- Create a device to compute the bounding
- box of all marks on a page.
-
- The returned bounding box will be the union of all bounding
- boxes of all objects on a page.
- */
- FZ_FUNCTION FzDevice fz_new_bbox_device(FzRect& rectp);
- /** Class-aware wrapper for `::fz_new_bitmap()`. */
- /**
- Create a new bitmap.
-
- w, h: Width and Height for the bitmap
-
- n: Number of color components (assumed to be a divisor of 8)
-
- xres, yres: X and Y resolutions (in pixels per inch).
-
- Returns pointer to created bitmap structure. The bitmap
- data is uninitialised.
- */
- FZ_FUNCTION FzBitmap fz_new_bitmap(int w, int h, int n, int xres, int yres);
- /** Class-aware wrapper for `::fz_new_bitmap_from_image()`. */
- /**
- Make a bitmap from a pixmap and a halftone.
-
- img: The image to generate from. Currently must be a single
- color component with no alpha.
-
- ht: The halftone to use. NULL implies the default halftone.
-
- Returns the resultant bitmap. Throws exceptions in the case of
- failure to allocate.
- */
- FZ_FUNCTION FzBitmap fz_new_bitmap_from_image(const FzImage& img, const FzHalftone& ht);
- /** Class-aware wrapper for `::fz_new_bitmap_from_pixmap()`. */
- /**
- Make a bitmap from a pixmap and a halftone.
-
- pix: The pixmap to generate from. Currently must be a single
- color component with no alpha.
-
- ht: The halftone to use. NULL implies the default halftone.
-
- Returns the resultant bitmap. Throws exceptions in the case of
- failure to allocate.
- */
- FZ_FUNCTION FzBitmap fz_new_bitmap_from_pixmap(const FzPixmap& pix, const FzHalftone& ht);
- /** Class-aware wrapper for `::fz_new_bitmap_from_pixmap_band()`. */
- /**
- Make a bitmap from a pixmap and a
- halftone, allowing for the position of the pixmap within an
- overall banded rendering.
-
- pix: The pixmap to generate from. Currently must be a single
- color component with no alpha.
-
- ht: The halftone to use. NULL implies the default halftone.
-
- band_start: Vertical offset within the overall banded rendering
- (in pixels)
-
- Returns the resultant bitmap. Throws exceptions in the case of
- failure to allocate.
- */
- FZ_FUNCTION FzBitmap fz_new_bitmap_from_pixmap_band(const FzPixmap& pix, const FzHalftone& ht, int band_start);
- /** Class-aware wrapper for `::fz_new_brotli_data()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_new_brotli_data(const unsigned char *source, size_t source_length, ::fz_brotli_level level)` => `(unsigned char *, size_t compressed_length)`
- */
- /**
- Compress source_length bytes of data starting
- at source, into a new memory block malloced for that purpose.
- *compressed_length is updated on exit to contain the size used.
- Ownership of the block is returned from this function, and the
- caller is therefore responsible for freeing it. The block may be
- considerably larger than is actually required. The caller is
- free to fz_realloc it down if it wants to.
- */
- FZ_FUNCTION unsigned char *fz_new_brotli_data(size_t *compressed_length, const unsigned char *source, size_t source_length, ::fz_brotli_level level);
- /** Class-aware wrapper for `::fz_new_brotli_data_from_buffer()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_new_brotli_data_from_buffer(::fz_buffer *buffer, ::fz_brotli_level level)` => `(unsigned char *, size_t compressed_length)`
- */
- /**
- Compress the contents of a fz_buffer into a
- new block malloced for that purpose. *compressed_length is
- updated on exit to contain the size used. Ownership of the block
- is returned from this function, and the caller is therefore
- responsible for freeing it. The block may be considerably larger
- than is actually required. The caller is free to fz_realloc it
- down if it wants to.
- */
- FZ_FUNCTION unsigned char *fz_new_brotli_data_from_buffer(size_t *compressed_length, const FzBuffer& buffer, ::fz_brotli_level level);
- /** Class-aware wrapper for `::fz_new_buffer()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer(size_t capacity);
- /** Class-aware wrapper for `::fz_new_buffer_from_base64()`. */
- /**
- Create a new buffer with data decoded from a base64 input string.
- */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_base64(const char *data, size_t size);
- /** Class-aware wrapper for `::fz_new_buffer_from_copied_data()`. */
- /**
- Create a new buffer containing a copy of the passed data.
- */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_copied_data(const unsigned char *data, size_t size);
- /** Class-aware wrapper for `::fz_new_buffer_from_data()`. */
- /**
- Create a new buffer with existing data.
-
- data: Pointer to existing data.
- size: Size of existing data.
-
- Takes ownership of data. Does not make a copy. Calls fz_free on
- the data when the buffer is deallocated. Do not use 'data' after
- passing to this function.
-
- Returns pointer to new buffer. Throws exception on allocation
- failure.
- */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_data(unsigned char *data, size_t size);
- /** Class-aware wrapper for `::fz_new_buffer_from_display_list()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_display_list(const FzDisplayList& list, FzStextOptions& options);
- /** Class-aware wrapper for `::fz_new_buffer_from_image_as_jpeg()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_image_as_jpeg(const FzImage& image, const FzColorParams& color_params, int quality, int invert_cmyk);
- /** Class-aware wrapper for `::fz_new_buffer_from_image_as_jpx()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_image_as_jpx(const FzImage& image, const FzColorParams& color_params, int quality);
- /** Class-aware wrapper for `::fz_new_buffer_from_image_as_pam()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_image_as_pam(const FzImage& image, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_image_as_pbm()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_image_as_pbm(const FzImage& image, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_image_as_pkm()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_image_as_pkm(const FzImage& image, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_image_as_png()`. */
- /**
- Re-encode a given image as a PNG into a buffer.
-
- Ownership of the buffer is returned.
- */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_image_as_png(const FzImage& image, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_image_as_pnm()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_image_as_pnm(const FzImage& image, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_image_as_psd()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_image_as_psd(const FzImage& image, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_page()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_page(const FzPage& page, FzStextOptions& options);
- /** Class-aware wrapper for `::fz_new_buffer_from_page_number()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_page_number(const FzDocument& doc, int number, FzStextOptions& options);
- /** Class-aware wrapper for `::fz_new_buffer_from_page_with_format()`. */
- /**
- Returns an fz_buffer containing a page after conversion to specified format.
-
- page: The page to convert.
- format, options: Passed to fz_new_document_writer_with_output() internally.
- transform, cookie: Passed to fz_run_page() internally.
- */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_page_with_format(const FzPage& page, const char *format, const char *options, const FzMatrix& transform, FzCookie& cookie);
- /** Class-aware wrapper for `::fz_new_buffer_from_pixmap_as_jpeg()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_pixmap_as_jpeg(const FzPixmap& pixmap, const FzColorParams& color_params, int quality, int invert_cmyk);
- /** Class-aware wrapper for `::fz_new_buffer_from_pixmap_as_jpx()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_pixmap_as_jpx(const FzPixmap& pix, const FzColorParams& color_params, int quality);
- /** Class-aware wrapper for `::fz_new_buffer_from_pixmap_as_pam()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_pixmap_as_pam(const FzPixmap& pixmap, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_pixmap_as_pbm()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_pixmap_as_pbm(const FzPixmap& pixmap, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_pixmap_as_pkm()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_pixmap_as_pkm(const FzPixmap& pixmap, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_pixmap_as_png()`. */
- /**
- Re-encode a given pixmap as a PNG into a buffer.
-
- Ownership of the buffer is returned.
- */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_pixmap_as_png(const FzPixmap& pixmap, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_pixmap_as_pnm()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_pixmap_as_pnm(const FzPixmap& pixmap, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_pixmap_as_psd()`. */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_pixmap_as_psd(const FzPixmap& pix, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_new_buffer_from_shared_data()`. */
- /**
- Like fz_new_buffer, but does not take ownership.
- */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_shared_data(const unsigned char *data, size_t size);
- /** Class-aware wrapper for `::fz_new_buffer_from_stext_page()`. */
- /**
- Convert structured text into plain text.
- */
- FZ_FUNCTION FzBuffer fz_new_buffer_from_stext_page(const FzStextPage& text);
- /** Class-aware wrapper for `::fz_new_builtin_font()`. */
- FZ_FUNCTION FzFont fz_new_builtin_font(const char *name, int is_bold, int is_italic);
- /** Class-aware wrapper for `::fz_new_cal_gray_colorspace()`. */
- /**
- Create a calibrated gray colorspace.
-
- The returned reference should be dropped when it is finished
- with.
-
- Colorspaces are immutable once created.
- */
- FZ_FUNCTION FzColorspace fz_new_cal_gray_colorspace(float wp[3], float bp[3], float gamma);
- /** Class-aware wrapper for `::fz_new_cal_rgb_colorspace()`. */
- /**
- Create a calibrated rgb colorspace.
-
- The returned reference should be dropped when it is finished
- with.
-
- Colorspaces are immutable once created.
- */
- FZ_FUNCTION FzColorspace fz_new_cal_rgb_colorspace(float wp[3], float bp[3], float gamma[3], float matrix[9]);
- /* Class-aware wrapper for `fz_new_cbz_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_cbz_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_cjk_font()`. */
- FZ_FUNCTION FzFont fz_new_cjk_font(int ordering);
- /* Class-aware wrapper for `fz_new_color_pcl_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_colorspace()`. */
- /**
- Creates a new colorspace instance and returns a reference.
-
- No internal checking is done that the colorspace type (e.g.
- CMYK) matches with the flags (e.g. FZ_COLORSPACE_HAS_CMYK) or
- colorant count (n) or name.
-
- The reference should be dropped when it is finished with.
-
- Colorspaces are immutable once created (with the exception of
- setting up colorant names for separation spaces).
- */
- FZ_FUNCTION FzColorspace fz_new_colorspace(enum fz_colorspace_type type, int flags, int n, const char *name);
- /** Class-aware wrapper for `::fz_new_compressed_buffer()`. */
- /**
- Create a new, UNKNOWN format, compressed_buffer.
- */
- FZ_FUNCTION FzCompressedBuffer fz_new_compressed_buffer();
- /* Class-aware wrapper for `fz_new_context_imp()`
- is not available because returned wrapper class for `fz_context`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_csv_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_csv_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_default_colorspaces()`. */
- /**
- Create a new default colorspace structure with values inherited
- from the context, and return a reference to it.
-
- These can be overridden using fz_set_default_xxxx.
-
- These should not be overridden while more than one caller has
- the reference for fear of race conditions.
-
- The caller should drop this reference once finished with it.
- */
- FZ_FUNCTION FzDefaultColorspaces fz_new_default_colorspaces();
- /* Class-aware wrapper for `fz_new_deflate_output()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_deflated_data()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_new_deflated_data(const unsigned char *source, size_t source_length, ::fz_deflate_level level)` => `(unsigned char *, size_t compressed_length)`
- */
- /**
- Compress source_length bytes of data starting
- at source, into a new memory block malloced for that purpose.
- *compressed_length is updated on exit to contain the size used.
- Ownership of the block is returned from this function, and the
- caller is therefore responsible for freeing it. The block may be
- considerably larger than is actually required. The caller is
- free to fz_realloc it down if it wants to.
- */
- FZ_FUNCTION unsigned char *fz_new_deflated_data(size_t *compressed_length, const unsigned char *source, size_t source_length, ::fz_deflate_level level);
- /** Class-aware wrapper for `::fz_new_deflated_data_from_buffer()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_new_deflated_data_from_buffer(::fz_buffer *buffer, ::fz_deflate_level level)` => `(unsigned char *, size_t compressed_length)`
- */
- /**
- Compress the contents of a fz_buffer into a
- new block malloced for that purpose. *compressed_length is
- updated on exit to contain the size used. Ownership of the block
- is returned from this function, and the caller is therefore
- responsible for freeing it. The block may be considerably larger
- than is actually required. The caller is free to fz_realloc it
- down if it wants to.
- */
- FZ_FUNCTION unsigned char *fz_new_deflated_data_from_buffer(size_t *compressed_length, const FzBuffer& buffer, ::fz_deflate_level level);
- /** Class-aware wrapper for `::fz_new_device_of_size()`. */
- /**
- Devices are created by calls to device implementations, for
- instance: foo_new_device(). These will be implemented by calling
- fz_new_derived_device(ctx, foo_device) where foo_device is a
- structure "derived from" fz_device, for instance
- typedef struct { fz_device base; ...extras...} foo_device;
- */
- FZ_FUNCTION FzDevice fz_new_device_of_size(int size);
- /** Class-aware wrapper for `::fz_new_display_list()`. */
- /**
- Create an empty display list.
-
- A display list contains drawing commands (text, images, etc.).
- Use fz_new_list_device for populating the list.
-
- mediabox: Bounds of the page (in points) represented by the
- display list.
- */
- FZ_FUNCTION FzDisplayList fz_new_display_list(const FzRect& mediabox);
- /** Class-aware wrapper for `::fz_new_display_list_from_page()`. */
- /**
- Create a display list.
-
- Ownership of the display list is returned to the caller.
- */
- FZ_FUNCTION FzDisplayList fz_new_display_list_from_page(const FzPage& page);
- /** Class-aware wrapper for `::fz_new_display_list_from_page_contents()`. */
- /**
- Create a display list from page contents (no annotations).
-
- Ownership of the display list is returned to the caller.
- */
- FZ_FUNCTION FzDisplayList fz_new_display_list_from_page_contents(const FzPage& page);
- /** Class-aware wrapper for `::fz_new_display_list_from_page_number()`. */
- FZ_FUNCTION FzDisplayList fz_new_display_list_from_page_number(const FzDocument& doc, int number);
- /** Class-aware wrapper for `::fz_new_display_list_from_svg()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_new_display_list_from_svg(::fz_buffer *buf, const char *base_uri, ::fz_archive *dir)` => `(fz_display_list *, float w, float h)`
- */
- /**
- Parse an SVG document into a display-list.
- */
- FZ_FUNCTION FzDisplayList fz_new_display_list_from_svg(const FzBuffer& buf, const char *base_uri, const FzArchive& dir, float *w, float *h);
- /** Class-aware wrapper for `::fz_new_display_list_from_svg_xml()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_new_display_list_from_svg_xml(::fz_xml_doc *xmldoc, ::fz_xml *xml, const char *base_uri, ::fz_archive *dir)` => `(fz_display_list *, float w, float h)`
- */
- /**
- Parse an SVG document into a display-list.
- */
- FZ_FUNCTION FzDisplayList fz_new_display_list_from_svg_xml(const FzXml& xmldoc, const FzXml& xml, const char *base_uri, const FzArchive& dir, float *w, float *h);
- /** Class-aware wrapper for `::fz_new_document_of_size()`. */
- /**
- New documents are typically created by calls like
- foo_new_document(fz_context *ctx, ...). These work by
- deriving a new document type from fz_document, for instance:
- typedef struct { fz_document base; ...extras... } foo_document;
- These are allocated by calling
- fz_new_derived_document(ctx, foo_document)
- */
- FZ_FUNCTION void *fz_new_document_of_size(int size);
- /* Class-aware wrapper for `fz_new_document_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_document_writer_of_size()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_document_writer_with_buffer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_document_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_docx_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_docx_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_dom()`. */
- /**
- Make new xml dom root element.
- */
- FZ_FUNCTION FzXml fz_new_dom(const char *tag);
- /** Class-aware wrapper for `::fz_new_dom_node()`. */
- /**
- Create a new dom node.
-
- This will NOT be linked in yet.
- */
- FZ_FUNCTION FzXml fz_new_dom_node(const FzXml& dom, const char *tag);
- /** Class-aware wrapper for `::fz_new_dom_text_node()`. */
- /**
- Create a new dom text node.
-
- This will NOT be linked in yet.
- */
- FZ_FUNCTION FzXml fz_new_dom_text_node(const FzXml& dom, const char *text);
- /** Class-aware wrapper for `::fz_new_draw_device()`. */
- /**
- Create a device to draw on a pixmap.
-
- dest: Target pixmap for the draw device. See fz_new_pixmap*
- for how to obtain a pixmap. The pixmap is not cleared by the
- draw device, see fz_clear_pixmap* for how to clear it prior to
- calling fz_new_draw_device. Free the device by calling
- fz_drop_device.
-
- transform: Transform from user space in points to device space
- in pixels.
- */
- FZ_FUNCTION FzDevice fz_new_draw_device(const FzMatrix& transform, const FzPixmap& dest);
- /** Class-aware wrapper for `::fz_new_draw_device_type3()`. */
- FZ_FUNCTION FzDevice fz_new_draw_device_type3(const FzMatrix& transform, const FzPixmap& dest);
- /** Class-aware wrapper for `::fz_new_draw_device_with_bbox()`. */
- /**
- Create a device to draw on a pixmap.
-
- dest: Target pixmap for the draw device. See fz_new_pixmap*
- for how to obtain a pixmap. The pixmap is not cleared by the
- draw device, see fz_clear_pixmap* for how to clear it prior to
- calling fz_new_draw_device. Free the device by calling
- fz_drop_device.
-
- transform: Transform from user space in points to device space
- in pixels.
-
- clip: Bounding box to restrict any marking operations of the
- draw device.
- */
- FZ_FUNCTION FzDevice fz_new_draw_device_with_bbox(const FzMatrix& transform, const FzPixmap& dest, FzIrect& clip);
- /** Class-aware wrapper for `::fz_new_draw_device_with_bbox_proof()`. */
- /**
- Create a device to draw on a pixmap.
-
- dest: Target pixmap for the draw device. See fz_new_pixmap*
- for how to obtain a pixmap. The pixmap is not cleared by the
- draw device, see fz_clear_pixmap* for how to clear it prior to
- calling fz_new_draw_device. Free the device by calling
- fz_drop_device.
-
- transform: Transform from user space in points to device space
- in pixels.
-
- clip: Bounding box to restrict any marking operations of the
- draw device.
-
- proof_cs: Color space to render to prior to mapping to color
- space defined by pixmap.
- */
- FZ_FUNCTION FzDevice fz_new_draw_device_with_bbox_proof(const FzMatrix& transform, const FzPixmap& dest, FzIrect& clip, const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_new_draw_device_with_options()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_new_draw_device_with_options(const ::fz_draw_options *options, ::fz_rect mediabox, ::fz_pixmap **pixmap)` => `(fz_device *)`
- */
- /**
- Create a new pixmap and draw device, using the specified options.
-
- options: Options to configure the draw device, and choose the
- resolution and colorspace.
-
- mediabox: The bounds of the page in points.
-
- pixmap: An out parameter containing the newly created pixmap.
- */
- FZ_FUNCTION FzDevice fz_new_draw_device_with_options(FzDrawOptions& options, const FzRect& mediabox, FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_new_draw_device_with_proof()`. */
- /**
- Create a device to draw on a pixmap.
-
- dest: Target pixmap for the draw device. See fz_new_pixmap*
- for how to obtain a pixmap. The pixmap is not cleared by the
- draw device, see fz_clear_pixmap* for how to clear it prior to
- calling fz_new_draw_device. Free the device by calling
- fz_drop_device.
-
- transform: Transform from user space in points to device space
- in pixels.
-
- proof_cs: Intermediate color space to map though when mapping to
- color space defined by pixmap.
- */
- FZ_FUNCTION FzDevice fz_new_draw_device_with_proof(const FzMatrix& transform, const FzPixmap& dest, const FzColorspace& proof_cs);
- /** Class-aware wrapper for `::fz_new_font_from_buffer()`. */
- /**
- Create a new font from a font file in a fz_buffer.
-
- Fonts created in this way, will be eligible for embedding by default.
-
- name: Name of font (leave NULL to use name from font).
-
- buffer: Buffer to load from.
-
- index: Which font from the file to load (0 for default).
-
- use_glyph_box: 1 if we should use the glyph bbox, 0 otherwise.
-
- Returns new font handle, or throws exception on error.
- */
- FZ_FUNCTION FzFont fz_new_font_from_buffer(const char *name, const FzBuffer& buffer, int index, int use_glyph_bbox);
- /** Class-aware wrapper for `::fz_new_font_from_file()`. */
- /**
- Create a new font from a font file.
-
- Fonts created in this way, will be eligible for embedding by default.
-
- name: Name of font (leave NULL to use name from font).
-
- path: File path to load from.
-
- index: Which font from the file to load (0 for default).
-
- use_glyph_box: 1 if we should use the glyph bbox, 0 otherwise.
-
- Returns new font handle, or throws exception on error.
- */
- FZ_FUNCTION FzFont fz_new_font_from_file(const char *name, const char *path, int index, int use_glyph_bbox);
- /** Class-aware wrapper for `::fz_new_font_from_memory()`. */
- /**
- Create a new font from a font file in memory.
-
- Fonts created in this way, will be eligible for embedding by default.
-
- name: Name of font (leave NULL to use name from font).
-
- data: Pointer to the font file data.
-
- len: Length of the font file data.
-
- index: Which font from the file to load (0 for default).
-
- use_glyph_box: 1 if we should use the glyph bbox, 0 otherwise.
-
- Returns new font handle, or throws exception on error.
- */
- FZ_FUNCTION FzFont fz_new_font_from_memory(const char *name, const unsigned char *data, int len, int index, int use_glyph_bbox);
- /** Class-aware wrapper for `::fz_new_function_of_size()`. */
- FZ_FUNCTION FzFunction fz_new_function_of_size(int size, size_t size2, int m, int n, ::fz_function_eval_fn *eval, ::fz_store_drop_fn *drop);
- /* Class-aware wrapper for `fz_new_hash_table()`
- is not available because returned wrapper class for `fz_hash_table`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_icc_colorspace()`. */
- /**
- Create a colorspace from an ICC profile supplied in buf.
-
- Limited checking is done to ensure that the colorspace type is
- appropriate for the supplied ICC profile.
-
- An additional reference is taken to buf, which will be dropped
- on destruction. Ownership is NOT passed in.
-
- The returned reference should be dropped when it is finished
- with.
-
- Colorspaces are immutable once created.
- */
- FZ_FUNCTION FzColorspace fz_new_icc_colorspace(enum fz_colorspace_type type, int flags, const char *name, const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_new_image_from_buffer()`. */
- /**
- Create a new image from a
- buffer of data, inferring its type from the format
- of the data.
- */
- FZ_FUNCTION FzImage fz_new_image_from_buffer(const FzBuffer& buffer);
- /** Class-aware wrapper for `::fz_new_image_from_compressed_buffer()`. */
- /**
- Create an image based on
- the data in the supplied compressed buffer.
-
- w,h: Width and height of the created image.
-
- bpc: Bits per component.
-
- colorspace: The colorspace (determines the number of components,
- and any color conversions required while decoding).
-
- xres, yres: The X and Y resolutions respectively.
-
- interpolate: 1 if interpolation should be used when decoding
- this image, 0 otherwise.
-
- imagemask: 1 if this is an imagemask (i.e. transparency bitmap
- mask), 0 otherwise.
-
- decode: NULL, or a pointer to to a decode array. The default
- decode array is [0 1] (repeated n times, for n color components).
-
- colorkey: NULL, or a pointer to a colorkey array. The default
- colorkey array is [0 255] (repeated n times, for n color
- components).
-
- buffer: Buffer of compressed data and compression parameters.
- Ownership of this reference is passed in.
-
- mask: NULL, or another image to use as a mask for this one.
- A new reference is taken to this image. Supplying a masked
- image as a mask to another image is illegal!
- */
- FZ_FUNCTION FzImage fz_new_image_from_compressed_buffer(int w, int h, int bpc, const FzColorspace& colorspace, int xres, int yres, int interpolate, int imagemask, const float *decode, const int *colorkey, const FzCompressedBuffer& buffer, const FzImage& mask);
- /** Class-aware wrapper for `::fz_new_image_from_compressed_buffer2()`. */
- /** Swig-friendly wrapper for fz_new_image_from_compressed_buffer(),
- uses specified `decode` and `colorkey` if they are not null (in which
- case we assert that they have size `2*fz_colorspace_n(colorspace)`). */
- FZ_FUNCTION FzImage fz_new_image_from_compressed_buffer2(int w, int h, int bpc, const FzColorspace& colorspace, int xres, int yres, int interpolate, int imagemask, const std::vector<float> &decode, const std::vector<int> &colorkey, const FzCompressedBuffer& buffer, const FzImage& mask);
- /** Class-aware wrapper for `::fz_new_image_from_display_list()`. */
- /**
- Create a new image from a display list.
-
- w, h: The conceptual width/height of the image.
-
- transform: The matrix that needs to be applied to the given
- list to make it render to the unit square.
-
- list: The display list.
- */
- FZ_FUNCTION FzImage fz_new_image_from_display_list(float w, float h, const FzDisplayList& list);
- /** Class-aware wrapper for `::fz_new_image_from_file()`. */
- /**
- Create a new image from the contents
- of a file, inferring its type from the format of the
- data.
- */
- FZ_FUNCTION FzImage fz_new_image_from_file(const char *path);
- /** Class-aware wrapper for `::fz_new_image_from_pixmap()`. */
- /**
- Create an image from the given
- pixmap.
-
- pixmap: The pixmap to base the image upon. A new reference
- to this is taken.
-
- mask: NULL, or another image to use as a mask for this one.
- A new reference is taken to this image. Supplying a masked
- image as a mask to another image is illegal!
- */
- FZ_FUNCTION FzImage fz_new_image_from_pixmap(const FzPixmap& pixmap, const FzImage& mask);
- /** Class-aware wrapper for `::fz_new_image_from_svg()`. */
- /**
- Create a scalable image from an SVG document.
- */
- FZ_FUNCTION FzImage fz_new_image_from_svg(const FzBuffer& buf, const char *base_uri, const FzArchive& dir);
- /** Class-aware wrapper for `::fz_new_image_from_svg_xml()`. */
- /**
- Create a scalable image from an SVG document.
- */
- FZ_FUNCTION FzImage fz_new_image_from_svg_xml(const FzXml& xmldoc, const FzXml& xml, const char *base_uri, const FzArchive& dir);
- /** Class-aware wrapper for `::fz_new_image_of_size()`. */
- /**
- Internal function to make a new fz_image structure
- for a derived class.
-
- w,h: Width and height of the created image.
-
- bpc: Bits per component.
-
- colorspace: The colorspace (determines the number of components,
- and any color conversions required while decoding).
-
- xres, yres: The X and Y resolutions respectively.
-
- interpolate: 1 if interpolation should be used when decoding
- this image, 0 otherwise.
-
- imagemask: 1 if this is an imagemask (i.e. transparent), 0
- otherwise.
-
- decode: NULL, or a pointer to to a decode array. The default
- decode array is [0 1] (repeated n times, for n color components).
-
- colorkey: NULL, or a pointer to a colorkey array. The default
- colorkey array is [0 255] (repeated n times, for n color
- components).
-
- mask: NULL, or another image to use as a mask for this one.
- A new reference is taken to this image. Supplying a masked
- image as a mask to another image is illegal!
-
- size: The size of the required allocated structure (the size of
- the derived structure).
-
- get: The function to be called to obtain a decoded pixmap.
-
- get_size: The function to be called to return the storage size
- used by this image.
-
- drop: The function to be called to dispose of this image once
- the last reference is dropped.
-
- Returns a pointer to an allocated structure of the required size,
- with the first sizeof(fz_image) bytes initialised as appropriate
- given the supplied parameters, and the other bytes set to zero.
- */
- FZ_FUNCTION FzImage fz_new_image_of_size(int w, int h, int bpc, const FzColorspace& colorspace, int xres, int yres, int interpolate, int imagemask, const float *decode, const int *colorkey, const FzImage& mask, size_t size, ::fz_image_get_pixmap_fn *get_pixmap, ::fz_image_get_size_fn *get_size, ::fz_drop_image_fn *drop);
- /** Class-aware wrapper for `::fz_new_indexed_colorspace()`. */
- /**
- Create an indexed colorspace.
-
- The supplied lookup table is high palette entries long. Each
- entry is n bytes long, where n is given by the number of
- colorants in the base colorspace, one byte per colorant.
-
- Ownership of lookup is passed it; it will be freed on
- destruction, so must be heap allocated.
-
- The colorspace will keep an additional reference to the base
- colorspace that will be dropped on destruction.
-
- The returned reference should be dropped when it is finished
- with.
-
- Colorspaces are immutable once created.
- */
- FZ_FUNCTION FzColorspace fz_new_indexed_colorspace(const FzColorspace& base, int high, unsigned char *lookup);
- /* Class-aware wrapper for `fz_new_jpeg_pixmap_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_layout()`
- is not available because returned wrapper class for `fz_layout_block`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_link_of_size()`. */
- /**
- Create a new link record.
-
- next is set to NULL with the expectation that the caller will
- handle the linked list setup. Internal function.
-
- Different document types will be implemented by deriving from
- fz_link. This macro allocates such derived structures, and
- initialises the base sections.
- */
- FZ_FUNCTION FzLink fz_new_link_of_size(int size, const FzRect& rect, const char *uri);
- /** Class-aware wrapper for `::fz_new_list_device()`. */
- /**
- Create a rendering device for a display list.
-
- When the device is rendering a page it will populate the
- display list with drawing commands (text, images, etc.). The
- display list can later be reused to render a page many times
- without having to re-interpret the page from the document file
- for each rendering. Once the device is no longer needed, free
- it with fz_drop_device.
-
- list: A display list that the list device takes a reference to.
- */
- FZ_FUNCTION FzDevice fz_new_list_device(const FzDisplayList& list);
- /* Class-aware wrapper for `fz_new_log_for_module()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_mono_pcl_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_mono_pwg_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_multi_archive()`. */
- /**
- Create a new multi archive (initially empty).
- */
- FZ_FUNCTION FzArchive fz_new_multi_archive();
- /** Class-aware wrapper for `::fz_new_ocr_device()`. */
- /**
- Create a device to OCR the text on the page.
-
- Renders the page internally to a bitmap that is then OCRd. Text
- is then forwarded onto the target device.
-
- target: The target device to receive the OCRd text.
-
- ctm: The transform to apply to the mediabox to get the size for
- the rendered page image. Also used to calculate the resolution
- for the page image. In general, this will be the same as the CTM
- that you pass to fz_run_page (or fz_run_display_list) to feed
- this device.
-
- mediabox: The mediabox (in points). Combined with the CTM to get
- the bounds of the pixmap used internally for the rendered page
- image.
-
- with_list: If with_list is false, then all non-text operations
- are forwarded instantly to the target device. This results in
- the target device seeing all NON-text operations, followed by
- all the text operations (derived from OCR).
-
- If with_list is true, then all the marking operations are
- collated into a display list which is then replayed to the
- target device at the end.
-
- language: NULL (for "eng"), or a pointer to a string to describe
- the languages/scripts that should be used for OCR (e.g.
- "eng,ara").
-
- datadir: NULL (for ""), or a pointer to a path string otherwise
- provided to Tesseract in the TESSDATA_PREFIX environment variable.
-
- progress: NULL, or function to be called periodically to indicate
- progress. Return 0 to continue, or 1 to cancel. progress_arg is
- returned as the void *. The int is a value between 0 and 100 to
- indicate progress.
-
- progress_arg: A void * value to be parrotted back to the progress
- function.
- */
- FZ_FUNCTION FzDevice fz_new_ocr_device(const FzDevice& target, const FzMatrix& ctm, const FzRect& mediabox, int with_list, const char *language, const char *datadir, int (*progress)(::fz_context *, void *, int ), void *progress_arg);
- /* Class-aware wrapper for `fz_new_odt_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_odt_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_outline()`. */
- /**
- Create a new outline entry with zeroed fields for the caller
- to fill in.
- */
- FZ_FUNCTION FzOutline fz_new_outline();
- /* Class-aware wrapper for `fz_new_outline_iterator()`
- is not available because returned wrapper class for `fz_outline_iterator`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_outline_iterator_of_size()`
- is not available because returned wrapper class for `fz_outline_iterator`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_output()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_output_with_buffer()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_output_with_file_ptr()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_output_with_path()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_page_of_size()`. */
- /**
- Different document types will be implemented by deriving from
- fz_page. This macro allocates such derived structures, and
- initialises the base sections.
- */
- FZ_FUNCTION FzPage fz_new_page_of_size(int size, const FzDocument& doc);
- /* Class-aware wrapper for `fz_new_pam_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pam_pixmap_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_path()`. */
- /**
- Create a new (empty) path structure.
- */
- FZ_FUNCTION FzPath fz_new_path();
- /* Class-aware wrapper for `fz_new_pbm_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pbm_pixmap_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pcl_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pcl_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pclm_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pclm_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pclm_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_pdf_document_from_fz_document()`. */
- FZ_FUNCTION PdfDocument fz_new_pdf_document_from_fz_document(const FzDocument& ptr);
- /* Class-aware wrapper for `fz_new_pdf_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pdf_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pdfocr_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pdfocr_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pdfocr_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pgm_pixmap_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_pixmap()`. */
- /**
- Create a new pixmap, with its origin at (0,0)
-
- cs: The colorspace to use for the pixmap, or NULL for an alpha
- plane/mask.
-
- w: The width of the pixmap (in pixels)
-
- h: The height of the pixmap (in pixels)
-
- seps: Details of separations.
-
- alpha: 0 for no alpha, 1 for alpha.
-
- Returns a pointer to the new pixmap. Throws exception on failure
- to allocate.
- */
- FZ_FUNCTION FzPixmap fz_new_pixmap(const FzColorspace& cs, int w, int h, const FzSeparations& seps, int alpha);
- /** Class-aware wrapper for `::fz_new_pixmap_from_alpha_channel()`. */
- FZ_FUNCTION FzPixmap fz_new_pixmap_from_alpha_channel(const FzPixmap& src);
- /** Class-aware wrapper for `::fz_new_pixmap_from_color_and_mask()`. */
- FZ_FUNCTION FzPixmap fz_new_pixmap_from_color_and_mask(const FzPixmap& color, const FzPixmap& mask);
- /** Class-aware wrapper for `::fz_new_pixmap_from_display_list()`. */
- /**
- Render the page to a pixmap using the transform and colorspace.
-
- Ownership of the pixmap is returned to the caller.
- */
- FZ_FUNCTION FzPixmap fz_new_pixmap_from_display_list(const FzDisplayList& list, const FzMatrix& ctm, const FzColorspace& cs, int alpha);
- /** Class-aware wrapper for `::fz_new_pixmap_from_display_list_with_separations()`. */
- /**
- Render the page contents with control over spot colors.
-
- Ownership of the pixmap is returned to the caller.
- */
- FZ_FUNCTION FzPixmap fz_new_pixmap_from_display_list_with_separations(const FzDisplayList& list, const FzMatrix& ctm, const FzColorspace& cs, const FzSeparations& seps, int alpha);
- /** Class-aware wrapper for `::fz_new_pixmap_from_page()`. */
- FZ_FUNCTION FzPixmap fz_new_pixmap_from_page(const FzPage& page, const FzMatrix& ctm, const FzColorspace& cs, int alpha);
- /** Class-aware wrapper for `::fz_new_pixmap_from_page_contents()`. */
- /**
- Render the page contents without annotations.
-
- Ownership of the pixmap is returned to the caller.
- */
- FZ_FUNCTION FzPixmap fz_new_pixmap_from_page_contents(const FzPage& page, const FzMatrix& ctm, const FzColorspace& cs, int alpha);
- /** Class-aware wrapper for `::fz_new_pixmap_from_page_contents_with_separations()`. */
- FZ_FUNCTION FzPixmap fz_new_pixmap_from_page_contents_with_separations(const FzPage& page, const FzMatrix& ctm, const FzColorspace& cs, const FzSeparations& seps, int alpha);
- /** Class-aware wrapper for `::fz_new_pixmap_from_page_number()`. */
- FZ_FUNCTION FzPixmap fz_new_pixmap_from_page_number(const FzDocument& doc, int number, const FzMatrix& ctm, const FzColorspace& cs, int alpha);
- /** Class-aware wrapper for `::fz_new_pixmap_from_page_number_with_separations()`. */
- FZ_FUNCTION FzPixmap fz_new_pixmap_from_page_number_with_separations(const FzDocument& doc, int number, const FzMatrix& ctm, const FzColorspace& cs, const FzSeparations& seps, int alpha);
- /** Class-aware wrapper for `::fz_new_pixmap_from_page_with_separations()`. */
- FZ_FUNCTION FzPixmap fz_new_pixmap_from_page_with_separations(const FzPage& page, const FzMatrix& ctm, const FzColorspace& cs, const FzSeparations& seps, int alpha);
- /** Class-aware wrapper for `::fz_new_pixmap_from_pixmap()`. */
- /**
- Create a new pixmap that represents a subarea of the specified
- pixmap. A reference is taken to this pixmap that will be dropped
- on destruction.
-
- The supplied rectangle must be wholly contained within the
- original pixmap.
-
- Returns a pointer to the new pixmap. Throws exception on failure
- to allocate.
- */
- FZ_FUNCTION FzPixmap fz_new_pixmap_from_pixmap(const FzPixmap& pixmap, FzIrect& rect);
- /** Class-aware wrapper for `::fz_new_pixmap_with_bbox()`. */
- /**
- Create a pixmap of a given size, location and pixel format.
-
- The bounding box specifies the size of the created pixmap and
- where it will be located. The colorspace determines the number
- of components per pixel. Alpha is always present. Pixmaps are
- reference counted, so drop references using fz_drop_pixmap.
-
- colorspace: Colorspace format used for the created pixmap. The
- pixmap will keep a reference to the colorspace.
-
- bbox: Bounding box specifying location/size of created pixmap.
-
- seps: Details of separations.
-
- alpha: 0 for no alpha, 1 for alpha.
-
- Returns a pointer to the new pixmap. Throws exception on failure
- to allocate.
- */
- FZ_FUNCTION FzPixmap fz_new_pixmap_with_bbox(const FzColorspace& colorspace, const FzIrect& bbox, const FzSeparations& seps, int alpha);
- /** Class-aware wrapper for `::fz_new_pixmap_with_bbox_and_data()`. */
- /**
- Create a pixmap of a given size, location and pixel format,
- using the supplied data block.
-
- The bounding box specifies the size of the created pixmap and
- where it will be located. The colorspace determines the number
- of components per pixel. Alpha is always present. Pixmaps are
- reference counted, so drop references using fz_drop_pixmap.
-
- colorspace: Colorspace format used for the created pixmap. The
- pixmap will keep a reference to the colorspace.
-
- rect: Bounding box specifying location/size of created pixmap.
-
- seps: Details of separations.
-
- alpha: Number of alpha planes (0 or 1).
-
- samples: The data block to keep the samples in.
-
- Returns a pointer to the new pixmap. Throws exception on failure
- to allocate.
- */
- FZ_FUNCTION FzPixmap fz_new_pixmap_with_bbox_and_data(const FzColorspace& colorspace, const FzIrect& rect, const FzSeparations& seps, int alpha, unsigned char *samples);
- /** Class-aware wrapper for `::fz_new_pixmap_with_data()`. */
- /**
- Create a new pixmap, with its origin at
- (0,0) using the supplied data block.
-
- cs: The colorspace to use for the pixmap, or NULL for an alpha
- plane/mask.
-
- w: The width of the pixmap (in pixels)
-
- h: The height of the pixmap (in pixels)
-
- seps: Details of separations.
-
- alpha: 0 for no alpha, 1 for alpha.
-
- stride: The byte offset from the pixel data in a row to the
- pixel data in the next row.
-
- samples: The data block to keep the samples in.
-
- Returns a pointer to the new pixmap. Throws exception on failure to
- allocate.
- */
- FZ_FUNCTION FzPixmap fz_new_pixmap_with_data(const FzColorspace& colorspace, int w, int h, const FzSeparations& seps, int alpha, int stride, unsigned char *samples);
- /* Class-aware wrapper for `fz_new_pixmap_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pkm_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pkm_pixmap_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_png_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_png_pixmap_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pnm_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pnm_pixmap_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pool()`
- is not available because returned wrapper class for `fz_pool`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pool_array_imp()`
- is not available because returned wrapper class for `fz_pool_array`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_ppm_pixmap_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_ps_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_ps_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_ps_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_psd_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pwg_band_writer()`
- is not available because returned wrapper class for `fz_band_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pwg_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_pwg_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_rle_output()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_separations()`. */
- /**
- Create a new separations structure (initially empty)
- */
- FZ_FUNCTION FzSeparations fz_new_separations(int controllable);
- /** Class-aware wrapper for `::fz_new_stext_device()`. */
- /**
- Create a device to extract the text on a page.
-
- Gather the text on a page into blocks and lines.
-
- The reading order is taken from the order the text is drawn in
- the source file, so may not be accurate.
-
- page: The text page to which content should be added. This will
- usually be a newly created (empty) text page, but it can be one
- containing data already (for example when merging multiple
- pages, or watermarking).
-
- options: Options to configure the stext device.
- */
- FZ_FUNCTION FzDevice fz_new_stext_device(const FzStextPage& page, FzStextOptions& options);
- /** Class-aware wrapper for `::fz_new_stext_device_for_page()`. */
- /**
- Create a device to extract the text on a page into an existing
- fz_stext_page structure.
-
- Gather the text on a page into blocks and lines.
-
- The reading order is taken from the order the text is drawn in
- the source file, so may not be accurate.
-
- stext_page: The text page to which content should be added. This will
- usually be a newly created (empty) text page, but it can be one
- containing data already (for example when merging multiple
- pages, or watermarking).
-
- options: Options to configure the stext device.
-
- The next 2 parameters are copied into the fz_stext_page structure's
- ids section, so only have to be valid if you expect to interrogate
- that section later.
-
- chapter_num: The chapter number that this page came from.
-
- page_num: The page number that this page came from.
-
- The final parameter is copied into the fz_stext_page structure's
- ids section. The mediabox for the enture fz_stext_page is unioned
- with this, so pass fz_empty_bbox if you don't care about getting
- a valid value back from the ids section, but you don't want to
- upset the value in the page->mediabox field.
-
- mediabox: The mediabox for this page.
- */
- FZ_FUNCTION FzDevice fz_new_stext_device_for_page(const FzStextPage& stext_page, FzStextOptions& opts, int chapter_num, int page_num, const FzRect& mediabox);
- /* Class-aware wrapper for `fz_new_stext_page()`
- is not available because returned wrapper class for `fz_stext_page`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_stext_page_from_chapter_page_number()`
- is not available because returned wrapper class for `fz_stext_page`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_stext_page_from_display_list()`
- is not available because returned wrapper class for `fz_stext_page`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_stext_page_from_page()`
- is not available because returned wrapper class for `fz_stext_page`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_stext_page_from_page_number()`
- is not available because returned wrapper class for `fz_stext_page`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_stext_struct()`. */
- FZ_FUNCTION FzStextBlock fz_new_stext_struct(const FzStextPage& page, ::fz_structure standard, const char *raw, int index);
- /** Class-aware wrapper for `::fz_new_store_context()`. */
- /**
- Create a new store inside the context
-
- max: The maximum size (in bytes) that the store is allowed to
- grow to. FZ_STORE_UNLIMITED means no limit.
- */
- FZ_FUNCTION void fz_new_store_context(size_t max);
- /* Class-aware wrapper for `fz_new_story()`
- is not available because returned wrapper class for `fz_story`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_stream()`. */
- /**
- Create a new stream object with the given
- internal state and function pointers.
-
- state: Internal state (opaque to everything but implementation).
-
- next: Should provide the next set of bytes (up to max) of stream
- data. Return the number of bytes read, or EOF when there is no
- more data.
-
- drop: Should clean up and free the internal state. May not
- throw exceptions.
- */
- FZ_FUNCTION FzStream fz_new_stream(void *state, ::fz_stream_next_fn *next, ::fz_stream_drop_fn *drop);
- /** Class-aware wrapper for `::fz_new_string()`. */
- FZ_FUNCTION FzString fz_new_string(const char *str);
- /** Class-aware wrapper for `::fz_new_stroke_state()`. */
- /**
- Create a new (empty) stroke state structure (with no dash
- data) and return a reference to it.
-
- Throws exception on failure to allocate.
- */
- FZ_FUNCTION FzStrokeState fz_new_stroke_state();
- /** Class-aware wrapper for `::fz_new_stroke_state_with_dash_len()`. */
- /**
- Create a new (empty) stroke state structure, with room for
- dash data of the given length, and return a reference to it.
-
- len: The number of dash elements to allow room for.
-
- Throws exception on failure to allocate.
- */
- FZ_FUNCTION FzStrokeState fz_new_stroke_state_with_dash_len(int len);
- /** Class-aware wrapper for `::fz_new_svg_device()`. */
- /**
- Create a device that outputs (single page) SVG files to
- the given output stream.
-
- Equivalent to fz_new_svg_device_with_id passing id = NULL.
- */
- FZ_FUNCTION FzDevice fz_new_svg_device(const FzOutput& out, float page_width, float page_height, int text_format, int reuse_images);
- /** Class-aware wrapper for `::fz_new_svg_device_with_id()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_new_svg_device_with_id(::fz_output *out, float page_width, float page_height, int text_format, int reuse_images)` => `(fz_device *, int id)`
- */
- /**
- Create a device that outputs (single page) SVG files to
- the given output stream.
-
- output: The output stream to send the constructed SVG page to.
-
- page_width, page_height: The page dimensions to use (in points).
-
- text_format: How to emit text. One of the following values:
- FZ_SVG_TEXT_AS_TEXT: As <text> elements with possible
- layout errors and mismatching fonts.
- FZ_SVG_TEXT_AS_PATH: As <path> elements with exact
- visual appearance.
-
- reuse_images: Share image resources using <symbol> definitions.
-
- id: ID parameter to keep generated IDs unique across SVG files.
- */
- FZ_FUNCTION FzDevice fz_new_svg_device_with_id(const FzOutput& out, float page_width, float page_height, int text_format, int reuse_images, int *id);
- /* Class-aware wrapper for `fz_new_svg_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_svg_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_test_device()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_new_test_device(float threshold, int options, ::fz_device *passthrough)` => `(fz_device *, int is_color)`
- */
- /**
- Create a device to test for features.
-
- Currently only tests for the presence of non-grayscale colors.
-
- is_color: Possible values returned:
- 0: Definitely greyscale
- 1: Probably color (all colors were grey, but there
- were images or shadings in a non grey colorspace).
- 2: Definitely color
-
- threshold: The difference from grayscale that will be tolerated.
- Typical values to use are either 0 (be exact) and 0.02 (allow an
- imperceptible amount of slop).
-
- options: A set of bitfield options, from the FZ_TEST_OPT set.
-
- passthrough: A device to pass all calls through to, or NULL.
- If set, then the test device can both test and pass through to
- an underlying device (like, say, the display list device). This
- means that a display list can be created and at the end we'll
- know if it's colored or not.
-
- In the absence of a passthrough device, the device will throw
- an exception to stop page interpretation when color is found.
- */
- FZ_FUNCTION FzDevice fz_new_test_device(int *is_color, float threshold, int options, const FzDevice& passthrough);
- /** Class-aware wrapper for `::fz_new_text()`. */
- /**
- Create a new empty fz_text object.
-
- Throws exception on failure to allocate.
- */
- FZ_FUNCTION FzText fz_new_text();
- /* Class-aware wrapper for `fz_new_text_writer()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_text_writer_with_output()`
- is not available because returned wrapper class for `fz_document_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_new_trace_device()`. */
- /**
- Create a device to print a debug trace of all device calls.
- */
- FZ_FUNCTION FzDevice fz_new_trace_device(const FzOutput& out);
- /** Class-aware wrapper for `::fz_new_tree_archive()`. */
- /**
- Create an archive that holds named buffers.
-
- tree can either be a preformed tree with fz_buffers as values,
- or it can be NULL for an empty tree.
- */
- FZ_FUNCTION FzArchive fz_new_tree_archive(const FzTree& tree);
- /** Class-aware wrapper for `::fz_new_type3_font()`. */
- /**
- Create a new (empty) type3 font.
-
- name: Name of font (or NULL).
-
- matrix: Font matrix.
-
- Returns a new font handle, or throws exception on
- allocation failure.
- */
- FZ_FUNCTION FzFont fz_new_type3_font(const char *name, const FzMatrix& matrix);
- /** Class-aware wrapper for `::fz_new_xhtml_document_from_document()`. */
- /**
- Use text extraction to convert the input document into XHTML,
- then open the result as a new document that can be reflowed.
- */
- FZ_FUNCTION FzDocument fz_new_xhtml_document_from_document(const FzDocument& old_doc, FzStextOptions& opts);
- /** Class-aware wrapper for `::fz_new_xmltext_device()`. */
- /**
- Create a device to output raw information.
- */
- FZ_FUNCTION FzDevice fz_new_xmltext_device(const FzOutput& out);
- /* Class-aware wrapper for `fz_new_zip_writer()`
- is not available because returned wrapper class for `fz_zip_writer`
- is non-copyable. */
- /* Class-aware wrapper for `fz_new_zip_writer_with_output()`
- is not available because returned wrapper class for `fz_zip_writer`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_next_page()`. */
- /**
- Function to get the location of the next page (allowing for the
- end of chapters etc). If at the end of the document, returns the
- current location.
- */
- FZ_FUNCTION FzLocation fz_next_page(const FzDocument& doc, const FzLocation& loc);
- /** Class-aware wrapper for `::fz_normalize_vector()`. */
- /**
- Normalize a vector to length one.
- */
- FZ_FUNCTION FzPoint fz_normalize_vector(const FzPoint& p);
- /** Class-aware wrapper for `::fz_open_a85d()`. */
- /**
- a85d filter performs ASCII 85 Decoding of data read
- from the chained filter.
- */
- FZ_FUNCTION FzStream fz_open_a85d(const FzStream& chain);
- /** Class-aware wrapper for `::fz_open_accelerated_document()`. */
- /**
- Open a document file and read its basic structure so pages and
- objects can be located. MuPDF will try to repair broken
- documents (without actually changing the file contents).
-
- The returned fz_document is used when calling most other
- document related functions.
-
- filename: a path to a file as it would be given to open(2).
- */
- FZ_FUNCTION FzDocument fz_open_accelerated_document(const char *filename, const char *accel);
- /** Class-aware wrapper for `::fz_open_accelerated_document_with_stream()`. */
- /**
- Open a document using the specified stream object rather than
- opening a file on disk.
-
- magic: a string used to detect document type; either a file name
- or mime-type.
-
- stream: a stream of the document contents.
-
- accel: NULL, or a stream of the 'accelerator' contents for this document.
-
- NOTE: The caller retains ownership of 'stream' and 'accel' - the document will
- take its own references if required.
- */
- FZ_FUNCTION FzDocument fz_open_accelerated_document_with_stream(const char *magic, const FzStream& stream, const FzStream& accel);
- /** Class-aware wrapper for `::fz_open_accelerated_document_with_stream_and_dir()`. */
- /**
- Open a document using the specified stream object rather than
- opening a file on disk.
-
- magic: a string used to detect document type; either a file name
- or mime-type.
-
- stream: a stream of the document contents.
-
- accel: NULL, or a stream of the 'accelerator' contents for this document.
-
- dir: NULL, or the 'directory context' for the stream contents.
-
- NOTE: The caller retains ownership of 'stream', 'accel' and 'dir' - the document will
- take its own references if required.
- */
- FZ_FUNCTION FzDocument fz_open_accelerated_document_with_stream_and_dir(const char *magic, const FzStream& stream, const FzStream& accel, const FzArchive& dir);
- /** Class-aware wrapper for `::fz_open_aesd()`. */
- /**
- aesd filter performs AES decoding of data read from the chained
- filter using the supplied key.
- */
- FZ_FUNCTION FzStream fz_open_aesd(const FzStream& chain, unsigned char *key, unsigned int keylen);
- /** Class-aware wrapper for `::fz_open_ahxd()`. */
- /**
- ahxd filter performs ASCII Hex decoding of data read
- from the chained filter.
- */
- FZ_FUNCTION FzStream fz_open_ahxd(const FzStream& chain);
- /** Class-aware wrapper for `::fz_open_arc4()`. */
- /**
- arc4 filter performs RC4 decoding of data read from the chained
- filter using the supplied key.
- */
- FZ_FUNCTION FzStream fz_open_arc4(const FzStream& chain, unsigned char *key, unsigned int keylen);
- /** Class-aware wrapper for `::fz_open_archive()`. */
- /**
- Open a zip or tar archive
-
- Open a file and identify its archive type based on the archive
- signature contained inside.
-
- filename: a path to a file as it would be given to open(2).
- */
- FZ_FUNCTION FzArchive fz_open_archive(const char *filename);
- /** Class-aware wrapper for `::fz_open_archive_entry()`. */
- /**
- Opens an archive entry as a stream.
-
- name: Entry name to look for, this must be an exact match to
- the entry name in the archive.
-
- Throws an exception if a matching entry cannot be found.
- */
- FZ_FUNCTION FzStream fz_open_archive_entry(const FzArchive& arch, const char *name);
- /** Class-aware wrapper for `::fz_open_archive_with_stream()`. */
- /**
- Open zip or tar archive stream.
-
- Open an archive using a seekable stream object rather than
- opening a file or directory on disk.
- */
- FZ_FUNCTION FzArchive fz_open_archive_with_stream(const FzStream& file);
- /** Class-aware wrapper for `::fz_open_brotlid()`. */
- /**
- brotlid filter performs Brotli decoding of data read
- from the chained filter.
- */
- FZ_FUNCTION FzStream fz_open_brotlid(const FzStream& chain);
- /** Class-aware wrapper for `::fz_open_buffer()`. */
- /**
- Open a buffer as a stream.
-
- buf: The buffer to open. Ownership of the buffer is NOT passed
- in (this function takes its own reference).
-
- Returns pointer to newly created stream. May throw exceptions on
- failure to allocate.
- */
- FZ_FUNCTION FzStream fz_open_buffer(const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_open_cfb_archive()`. */
- /**
- Open a cfb file as an archive.
-
- An exception is thrown if the file is not recognised as a cfb.
-
- filename: a path to an archive file as it would be given to
- open(2).
- */
- FZ_FUNCTION FzArchive fz_open_cfb_archive(const char *filename);
- /** Class-aware wrapper for `::fz_open_cfb_archive_with_stream()`. */
- /**
- Open a cfb file as an archive.
-
- Open an archive using a seekable stream object rather than
- opening a file or directory on disk.
-
- An exception is thrown if the file is not recognised as a chm.
- */
- FZ_FUNCTION FzArchive fz_open_cfb_archive_with_stream(const FzStream& file);
- /** Class-aware wrapper for `::fz_open_compressed_buffer()`. */
- /**
- Open a stream to read the decompressed version of a buffer.
- */
- FZ_FUNCTION FzStream fz_open_compressed_buffer(const FzCompressedBuffer& arg_0);
- /** Class-aware wrapper for `::fz_open_concat()`. */
- /**
- Concat filter concatenates several streams into one.
- */
- FZ_FUNCTION FzStream fz_open_concat(int max, int pad);
- /** Class-aware wrapper for `::fz_open_dctd()`. */
- /**
- dctd filter performs DCT (JPEG) decoding of data read
- from the chained filter.
-
- color_transform implements the PDF color_transform option
- use -1 for default behavior
- use 0 to disable YUV-RGB / YCCK-CMYK transforms
- use 1 to enable YUV-RGB / YCCK-CMYK transforms
-
- invert_cmyk implements the necessary inversion for Photoshop CMYK images
- use 0 if embedded in PDF
- use 1 if not embedded in PDF
-
- For subsampling on decode, set l2factor to the log2 of the
- reduction required (therefore 0 = full size decode).
-
- jpegtables is an optional stream from which the JPEG tables
- can be read. Use NULL if not required.
- */
- FZ_FUNCTION FzStream fz_open_dctd(const FzStream& chain, int color_transform, int invert_cmyk, int l2factor, const FzStream& jpegtables);
- /** Class-aware wrapper for `::fz_open_directory()`. */
- /**
- Open a directory as if it was an archive.
-
- A special case where a directory is opened as if it was an
- archive.
-
- Note that for directories it is not possible to retrieve the
- number of entries or list the entries. It is however possible
- to check if the archive has a particular entry.
-
- path: a path to a directory as it would be given to opendir(3).
- */
- FZ_FUNCTION FzArchive fz_open_directory(const char *path);
- /** Class-aware wrapper for `::fz_open_document()`. */
- /**
- Open a document file and read its basic structure so pages and
- objects can be located. MuPDF will try to repair broken
- documents (without actually changing the file contents).
-
- The returned fz_document is used when calling most other
- document related functions.
-
- filename: a path to a file as it would be given to open(2).
- */
- FZ_FUNCTION FzDocument fz_open_document(const char *filename);
- /** Class-aware wrapper for `::fz_open_document_with_buffer()`. */
- /**
- Open a document using a buffer rather than opening a file on disk.
- */
- FZ_FUNCTION FzDocument fz_open_document_with_buffer(const char *magic, const FzBuffer& buffer);
- /** Class-aware wrapper for `::fz_open_document_with_stream()`. */
- /**
- Open a document using the specified stream object rather than
- opening a file on disk.
-
- magic: a string used to detect document type; either a file name
- or mime-type.
-
- stream: a stream representing the contents of the document file.
-
- NOTE: The caller retains ownership of 'stream' - the document will take its
- own reference if required.
- */
- FZ_FUNCTION FzDocument fz_open_document_with_stream(const char *magic, const FzStream& stream);
- /** Class-aware wrapper for `::fz_open_document_with_stream_and_dir()`. */
- /**
- Open a document using the specified stream object rather than
- opening a file on disk.
-
- magic: a string used to detect document type; either a file name
- or mime-type.
-
- stream: a stream representing the contents of the document file.
-
- dir: a 'directory context' for those filetypes that need it.
-
- NOTE: The caller retains ownership of 'stream' and 'dir' - the document will
- take its own references if required.
- */
- FZ_FUNCTION FzDocument fz_open_document_with_stream_and_dir(const char *magic, const FzStream& stream, const FzArchive& dir);
- /** Class-aware wrapper for `::fz_open_endstream_filter()`. */
- /**
- The endstream filter reads a PDF substream, and starts to look
- for an 'endstream' token after the specified length.
- */
- FZ_FUNCTION FzStream fz_open_endstream_filter(const FzStream& chain, uint64_t len, int64_t offset);
- /** Class-aware wrapper for `::fz_open_faxd()`. */
- /**
- faxd filter performs FAX decoding of data read from
- the chained filter.
-
- k: see fax specification (fax default is 0).
-
- end_of_line: whether we expect end of line markers (fax default
- is 0).
-
- encoded_byte_align: whether we align to bytes after each line
- (fax default is 0).
-
- columns: how many columns in the image (fax default is 1728).
-
- rows: 0 for unspecified or the number of rows of data to expect.
-
- end_of_block: whether we expect end of block markers (fax
- default is 1).
-
- black_is_1: determines the polarity of the image (fax default is
- 0).
- */
- FZ_FUNCTION FzStream fz_open_faxd(const FzStream& chain, int k, int end_of_line, int encoded_byte_align, int columns, int rows, int end_of_block, int black_is_1);
- /** Class-aware wrapper for `::fz_open_file()`. */
- /**
- Open the named file and wrap it in a stream.
-
- filename: Path to a file. On non-Windows machines the filename
- should be exactly as it would be passed to fopen(2). On Windows
- machines, the path should be UTF-8 encoded so that non-ASCII
- characters can be represented. Other platforms do the encoding
- as standard anyway (and in most cases, particularly for MacOS
- and Linux, the encoding they use is UTF-8 anyway).
- */
- FZ_FUNCTION FzStream fz_open_file(const char *filename);
- /** Class-aware wrapper for `::fz_open_file_autodelete()`. */
- /**
- Do the same as fz_open_file, but delete the file upon close.
- */
- FZ_FUNCTION FzStream fz_open_file_autodelete(const char *filename);
- /** Class-aware wrapper for `::fz_open_file_ptr_no_close()`. */
- /**
- Create a stream from a FILE * that will not be closed
- when the stream is dropped.
- */
- FZ_FUNCTION FzStream fz_open_file_ptr_no_close(FILE *file);
- /** Class-aware wrapper for `::fz_open_flated()`. */
- /**
- flated filter performs LZ77 decoding (inflating) of data read
- from the chained filter.
-
- window_bits: How large a decompression window to use. Typically
- 15. A negative number, -n, means to use n bits, but to expect
- raw data with no header.
- */
- FZ_FUNCTION FzStream fz_open_flated(const FzStream& chain, int window_bits);
- /** Class-aware wrapper for `::fz_open_image_decomp_stream()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_open_image_decomp_stream(::fz_stream *arg_0, ::fz_compression_params *arg_1)` => `(fz_stream *, int l2factor)`
- */
- /**
- Open a stream to read the decompressed version of another stream
- with optional log2 subsampling.
- */
- FZ_FUNCTION FzStream fz_open_image_decomp_stream(const FzStream& arg_0, const FzCompressionParams& arg_1, int *l2factor);
- /** Class-aware wrapper for `::fz_open_image_decomp_stream_from_buffer()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_open_image_decomp_stream_from_buffer(::fz_compressed_buffer *arg_0)` => `(fz_stream *, int l2factor)`
- */
- /**
- Open a stream to read the decompressed version of a buffer,
- with optional log2 subsampling.
-
- l2factor = NULL for no subsampling, or a pointer to an integer
- containing the maximum log2 subsample factor acceptable (0 =
- none, 1 = halve dimensions, 2 = quarter dimensions etc). If
- non-NULL, then *l2factor will be updated on exit with the actual
- log2 subsample factor achieved.
- */
- FZ_FUNCTION FzStream fz_open_image_decomp_stream_from_buffer(const FzCompressedBuffer& arg_0, int *l2factor);
- /** Class-aware wrapper for `::fz_open_jbig2d()`. */
- /**
- Open a filter that performs jbig2 decompression on the chained
- stream, using the optional globals record.
- */
- FZ_FUNCTION FzStream fz_open_jbig2d(const FzStream& chain, const FzJbig2Globals& globals, int embedded);
- /** Class-aware wrapper for `::fz_open_leecher()`. */
- /**
- Attach a filter to a stream that will store any
- characters read from the stream into the supplied buffer.
-
- chain: The underlying stream to leech from.
-
- buf: The buffer into which the read data should be appended.
- The buffer will be resized as required.
-
- Returns pointer to newly created stream. May throw exceptions on
- failure to allocate.
- */
- FZ_FUNCTION FzStream fz_open_leecher(const FzStream& chain, const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_open_libarchive_archive()`. */
- /**
- Open an archive using libarchive.
-
- An exception is thrown if the file is not supported by libarchive.
-
- filename: a path to an archive file as it would be given to
- open(2).
- */
- FZ_FUNCTION FzArchive fz_open_libarchive_archive(const char *filename);
- /** Class-aware wrapper for `::fz_open_libarchive_archive_with_stream()`. */
- /**
- Open an archive using libarchive.
-
- Open an archive using a seekable stream object rather than
- opening a file or directory on disk.
-
- An exception is thrown if the stream is not supported by libarchive.
- */
- FZ_FUNCTION FzArchive fz_open_libarchive_archive_with_stream(const FzStream& file);
- /** Class-aware wrapper for `::fz_open_libarchived()`. */
- /**
- libarchived filter performs generic compressed decoding of data
- in any format understood by libarchive from the chained filter.
-
- This will throw an exception if libarchive is not built in, or
- if the compression format is not recognised.
- */
- FZ_FUNCTION FzStream fz_open_libarchived(const FzStream& chain);
- /** Class-aware wrapper for `::fz_open_lzwd()`. */
- /**
- lzwd filter performs LZW decoding of data read from the chained
- filter.
-
- early_change: (Default 1) specifies whether to change codes 1
- bit early.
-
- min_bits: (Default 9) specifies the minimum number of bits to
- use.
-
- reverse_bits: (Default 0) allows for compatibility with gif and
- old style tiffs (1).
-
- old_tiff: (Default 0) allows for different handling of the clear
- code, as found in old style tiffs.
- */
- FZ_FUNCTION FzStream fz_open_lzwd(const FzStream& chain, int early_change, int min_bits, int reverse_bits, int old_tiff);
- /** Class-aware wrapper for `::fz_open_memory()`. */
- /**
- Open a block of memory as a stream.
-
- data: Pointer to start of data block. Ownership of the data
- block is NOT passed in.
-
- len: Number of bytes in data block.
-
- Returns pointer to newly created stream. May throw exceptions on
- failure to allocate.
- */
- FZ_FUNCTION FzStream fz_open_memory(const unsigned char *data, size_t len);
- /** Class-aware wrapper for `::fz_open_null_filter()`. */
- /**
- The null filter reads a specified amount of data from the
- substream.
- */
- FZ_FUNCTION FzStream fz_open_null_filter(const FzStream& chain, uint64_t len, int64_t offset);
- /** Class-aware wrapper for `::fz_open_predict()`. */
- /**
- predict filter performs pixel prediction on data read from
- the chained filter.
-
- predictor: 1 = copy, 2 = tiff, other = inline PNG predictor
-
- columns: width of image in pixels
-
- colors: number of components.
-
- bpc: bits per component (typically 8)
- */
- FZ_FUNCTION FzStream fz_open_predict(const FzStream& chain, int predictor, int columns, int colors, int bpc);
- /** Class-aware wrapper for `::fz_open_range_filter()`. */
- /**
- The range filter copies data from specified ranges of the
- chained stream.
- */
- FZ_FUNCTION FzStream fz_open_range_filter(const FzStream& chain, const FzRange& ranges, int nranges);
- /** Class-aware wrapper for `::fz_open_reflowed_document()`. */
- FZ_FUNCTION FzDocument fz_open_reflowed_document(const FzDocument& underdoc, FzStextOptions& opts);
- /** Class-aware wrapper for `::fz_open_rld()`. */
- /**
- rld filter performs Run Length Decoding of data read
- from the chained filter.
- */
- FZ_FUNCTION FzStream fz_open_rld(const FzStream& chain);
- /** Class-aware wrapper for `::fz_open_sgilog16()`. */
- /**
- SGI Log 16bit (greyscale) decode from the chained filter.
- Decodes lines of w pixels to 8bpp greyscale.
- */
- FZ_FUNCTION FzStream fz_open_sgilog16(const FzStream& chain, int w);
- /** Class-aware wrapper for `::fz_open_sgilog24()`. */
- /**
- SGI Log 24bit (LUV) decode from the chained filter.
- Decodes lines of w pixels to 8bpc rgb.
- */
- FZ_FUNCTION FzStream fz_open_sgilog24(const FzStream& chain, int w);
- /** Class-aware wrapper for `::fz_open_sgilog32()`. */
- /**
- SGI Log 32bit (LUV) decode from the chained filter.
- Decodes lines of w pixels to 8bpc rgb.
- */
- FZ_FUNCTION FzStream fz_open_sgilog32(const FzStream& chain, int w);
- /** Class-aware wrapper for `::fz_open_tar_archive()`. */
- /**
- Open a tar archive file.
-
- An exception is thrown if the file is not a tar archive as
- indicated by the presence of a tar signature.
-
- filename: a path to a tar archive file as it would be given to
- open(2).
- */
- FZ_FUNCTION FzArchive fz_open_tar_archive(const char *filename);
- /** Class-aware wrapper for `::fz_open_tar_archive_with_stream()`. */
- /**
- Open a tar archive stream.
-
- Open an archive using a seekable stream object rather than
- opening a file or directory on disk.
-
- An exception is thrown if the stream is not a tar archive as
- indicated by the presence of a tar signature.
-
- */
- FZ_FUNCTION FzArchive fz_open_tar_archive_with_stream(const FzStream& file);
- /** Class-aware wrapper for `::fz_open_thunder()`. */
- /**
- 4bit greyscale Thunderscan decoding from the chained filter.
- Decodes lines of w pixels to 8bpp greyscale.
- */
- FZ_FUNCTION FzStream fz_open_thunder(const FzStream& chain, int w);
- /** Class-aware wrapper for `::fz_open_zip_archive()`. */
- /**
- Open a zip archive file.
-
- An exception is thrown if the file is not a zip archive as
- indicated by the presence of a zip signature.
-
- filename: a path to a zip archive file as it would be given to
- open(2).
- */
- FZ_FUNCTION FzArchive fz_open_zip_archive(const char *path);
- /** Class-aware wrapper for `::fz_open_zip_archive_with_stream()`. */
- /**
- Open a zip archive stream.
-
- Open an archive using a seekable stream object rather than
- opening a file or directory on disk.
-
- An exception is thrown if the stream is not a zip archive as
- indicated by the presence of a zip signature.
-
- */
- FZ_FUNCTION FzArchive fz_open_zip_archive_with_stream(const FzStream& file);
- /** Class-aware wrapper for `::fz_opt_from_list()`. */
- /**
- Return the index of a (case-insensitive) option within an optlist.
-
- For instance for optlist = "Foo|Bar|Baz", and opt = "bar",
- this would return 1.
-
- If the optlist ends with "|*" then that is a catch all case and
- matches all options allowing the caller to process it itself.
- fz_optarg will be set to point to the option, and the return
- value will be the index of the '*' option within that list.
-
- If an optlist entry ends with ':' (e.g. "Foo:") then that option
- may have suboptions appended to it (for example "JPG:80") and
- fz_optarg will be set to point at "80". Otherwise fz_optarg will
- be set to NULL.
-
- In the event of no-match found, prints an error and returns -1.
- */
- FZ_FUNCTION int fz_opt_from_list(char *opt, const char *optlist);
- /** Class-aware wrapper for `::fz_option_eq()`. */
- /**
- Check to see if an option, a, from a string matches a reference
- option, b.
-
- (i.e. a could be 'foo' or 'foo,bar...' etc, but b can only be
- 'foo'.)
- */
- FZ_FUNCTION int fz_option_eq(const char *a, const char *b);
- /** Class-aware wrapper for `::fz_optpath()`. */
- /**
- Convert "-" to "/dev/stdout" for use with command lines.
- Also converts "nul" and "con" on Windows.
- */
- FZ_FUNCTION char *fz_optpath(char *opt);
- /** Class-aware wrapper for `::fz_outline_glyph()`. */
- /**
- Look a glyph up from a font, and return the outline of the
- glyph using the given transform.
-
- The caller owns the returned path, and so is responsible for
- ensuring that it eventually gets dropped.
- */
- FZ_FUNCTION FzPath fz_outline_glyph(const FzFont& font, int gid, const FzMatrix& ctm);
- /** Class-aware wrapper for `::fz_outline_iterator_delete()`. */
- /**
- Delete the current item.
-
- This implicitly moves us to the 'next' item, and the return code is as for fz_outline_iterator_next.
- */
- FZ_FUNCTION int fz_outline_iterator_delete(const FzOutlineIterator& iter);
- /** Class-aware wrapper for `::fz_outline_iterator_down()`. */
- FZ_FUNCTION int fz_outline_iterator_down(const FzOutlineIterator& iter);
- /* Class-aware wrapper for `fz_outline_iterator_from_outline()`
- is not available because returned wrapper class for `fz_outline_iterator`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_outline_iterator_item()`. */
- /**
- Call to get the current outline item.
-
- Can return NULL. The item is only valid until the next call.
- */
- FZ_FUNCTION FzOutlineItem fz_outline_iterator_item(const FzOutlineIterator& iter);
- /** Class-aware wrapper for `::fz_outline_iterator_next()`. */
- /**
- Calls to move the iterator position.
-
- A negative return value means we could not move as requested. Otherwise:
- 0 = the final position has a valid item.
- 1 = not a valid item, but we can insert an item here.
- */
- FZ_FUNCTION int fz_outline_iterator_next(const FzOutlineIterator& iter);
- /** Class-aware wrapper for `::fz_outline_iterator_prev()`. */
- FZ_FUNCTION int fz_outline_iterator_prev(const FzOutlineIterator& iter);
- /** Class-aware wrapper for `::fz_outline_iterator_up()`. */
- FZ_FUNCTION int fz_outline_iterator_up(const FzOutlineIterator& iter);
- /** Class-aware wrapper for `::fz_output_accelerator()`. */
- /**
- Output accelerator data for the document to a given output
- stream.
- */
- FZ_FUNCTION void fz_output_accelerator(const FzDocument& doc, const FzOutput& accel);
- /** Class-aware wrapper for `::fz_output_supports_stream()`. */
- /**
- Query whether a given fz_output supports fz_stream_from_output.
- */
- FZ_FUNCTION int fz_output_supports_stream(const FzOutput& out);
- /** Class-aware wrapper for `::fz_output_xml()`. */
- /**
- Pretty-print an XML tree to given output.
- */
- FZ_FUNCTION void fz_output_xml(const FzOutput& out, const FzXml& item, int level);
- /** Class-aware wrapper for `::fz_overlaps_rect()`. */
- /**
- Test rectangle overlap.
-
- Returns true if the area of the overlap is
- non zero.
- */
- FZ_FUNCTION int fz_overlaps_rect(const FzRect& a, const FzRect& b);
- /** Class-aware wrapper for `::fz_pack_path()`. */
- /**
- Pack a path into the given block.
- To minimise the size of paths, this function allows them to be
- packed into a buffer with other information. Paths can be used
- interchangeably regardless of how they are packed.
-
- pack: Pointer to a block of data to pack the path into. Should
- be aligned by the caller to the same alignment as required for
- a fz_path pointer.
-
- path: The path to pack.
-
- Returns the number of bytes within the block used. Callers can
- access the packed path data by casting the value of pack on
- entry to be a fz_path *.
-
- Throws exceptions on failure to allocate.
-
- Implementation details: Paths can be 'unpacked', 'flat', or
- 'open'. Standard paths, as created are 'unpacked'. Paths
- will be packed as 'flat', unless they are too large
- (where large indicates that they exceed some private
- implementation defined limits, currently including having
- more than 256 coordinates or commands).
-
- Large paths are 'open' packed as a header into the given block,
- plus pointers to other data blocks.
-
- Users should not have to care about whether paths are 'open'
- or 'flat' packed. Simply pack a path (if required), and then
- forget about the details.
- */
- FZ_FUNCTION size_t fz_pack_path(uint8_t *pack, const FzPath& path);
- /** Class-aware wrapper for `::fz_packed_path_size()`. */
- /**
- Return the number of bytes required to pack a path.
- */
- FZ_FUNCTION int fz_packed_path_size(const FzPath& path);
- /** Class-aware wrapper for `::fz_page_label()`. */
- /**
- Get page label for a given page.
- */
- FZ_FUNCTION const char *fz_page_label(const FzPage& page, char *buf, int size);
- /** Class-aware wrapper for `::fz_page_number_from_location()`. */
- /**
- Converts from chapter+page to page number. This may cause many
- chapters to be laid out in order to calculate the number of
- pages within those chapters.
- */
- FZ_FUNCTION int fz_page_number_from_location(const FzDocument& doc, const FzLocation& loc);
- /** Class-aware wrapper for `::fz_page_presentation()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_page_presentation(::fz_page *page, ::fz_transition *transition)` => `(fz_transition *, float duration)`
- */
- /**
- Get the presentation details for a given page.
-
- transition: A pointer to a transition struct to fill out.
-
- duration: A pointer to a place to set the page duration in
- seconds. Will be set to 0 if no transition is specified for the
- page.
-
- Returns: a pointer to the transition structure, or NULL if there
- is no transition specified for the page.
- */
- FZ_FUNCTION FzTransition fz_page_presentation(const FzPage& page, FzTransition& transition, float *duration);
- /** Class-aware wrapper for `::fz_page_separations()`. */
- /**
- Get the separations details for a page.
- This will be NULL, unless the format specifically supports
- separations (such as PDF files). May be NULL even
- so, if there are no separations on a page.
-
- Returns a reference that must be dropped.
- */
- FZ_FUNCTION FzSeparations fz_page_separations(const FzPage& page);
- /** Class-aware wrapper for `::fz_page_uses_overprint()`. */
- /**
- Query if a given page requires overprint.
- */
- FZ_FUNCTION int fz_page_uses_overprint(const FzPage& page);
- /** Class-aware wrapper for `::fz_paint_shade()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_paint_shade(::fz_shade *shade, ::fz_colorspace *override_cs, ::fz_matrix ctm, ::fz_pixmap *dest, ::fz_color_params color_params, ::fz_irect bbox, const ::fz_overprint *eop, ::fz_shade_color_cache **cache)` =>
- */
- /**
- Render a shade to a given pixmap.
-
- shade: The shade to paint.
-
- override_cs: NULL, or colorspace to override the shades
- inbuilt colorspace.
-
- ctm: The transform to apply.
-
- dest: The pixmap to render into.
-
- color_params: The color rendering settings
-
- bbox: Pointer to a bounding box to limit the rendering
- of the shade.
-
- eop: NULL, or pointer to overprint bitmap.
-
- cache: *cache is used to cache color information. If *cache is NULL it
- is set to point to a new fz_shade_color_cache. If cache is NULL it is
- ignored.
- */
- FZ_FUNCTION void fz_paint_shade(const FzShade& shade, const FzColorspace& override_cs, const FzMatrix& ctm, const FzPixmap& dest, const FzColorParams& color_params, const FzIrect& bbox, const FzOverprint& eop, FzShadeColorCache& cache);
- /** Class-aware wrapper for `::fz_paragraph_break()`. */
- /**
- Attempt to break paragraphs at plausible places.
- */
- FZ_FUNCTION void fz_paragraph_break(const FzStextPage& page);
- /* Class-aware wrapper for `fz_parse_draw_options()`
- is not available because returned wrapper class for `fz_draw_options`
- is non-copyable. */
- /* Class-aware wrapper for `fz_parse_json()`
- is not available because returned wrapper class for `fz_json`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_parse_page_range()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_parse_page_range(const char *s, int n)` => `(const char *, int a, int b)`
- */
- FZ_FUNCTION const char *fz_parse_page_range(const char *s, int *a, int *b, int n);
- /* Class-aware wrapper for `fz_parse_pcl_options()`
- is not available because returned wrapper class for `fz_pcl_options`
- is non-copyable. */
- /* Class-aware wrapper for `fz_parse_pclm_options()`
- is not available because returned wrapper class for `fz_pclm_options`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_parse_pdfocr_options()`. */
- /**
- Parse PDFOCR options.
-
- Currently defined options and values are as follows:
-
- compression=none: No compression
- compression=flate: Flate compression
- strip-height=n: Strip height (default 16)
- ocr-language=<lang>: OCR Language (default eng)
- ocr-datadir=<datadir>: OCR data path (default rely on TESSDATA_PREFIX)
- */
- FZ_FUNCTION FzPdfocrOptions fz_parse_pdfocr_options(FzPdfocrOptions& opts, const char *args);
- /** Class-aware wrapper for `::fz_parse_stext_options()`. */
- /**
- Parse stext device options from a comma separated key-value
- string.
- */
- FZ_FUNCTION FzStextOptions fz_parse_stext_options(FzStextOptions& opts, const char *string);
- /** Class-aware wrapper for `::fz_parse_xml()`. */
- /**
- Parse the contents of buffer into a tree of xml nodes.
-
- preserve_white: whether to keep or delete all-whitespace nodes.
- */
- FZ_FUNCTION FzXml fz_parse_xml(const FzBuffer& buf, int preserve_white);
- /** Class-aware wrapper for `::fz_parse_xml_archive_entry()`. */
- /**
- Parse the contents of an archive entry into a tree of xml nodes.
-
- preserve_white: whether to keep or delete all-whitespace nodes.
- */
- FZ_FUNCTION FzXml fz_parse_xml_archive_entry(const FzArchive& dir, const char *filename, int preserve_white);
- /** Class-aware wrapper for `::fz_parse_xml_from_html5()`. */
- /**
- Parse the contents of a buffer into a tree of XML nodes,
- using the HTML5 parsing algorithm.
- */
- FZ_FUNCTION FzXml fz_parse_xml_from_html5(const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_parse_xml_stream()`. */
- /**
- Parse the contents of buffer into a tree of xml nodes.
-
- preserve_white: whether to keep or delete all-whitespace nodes.
- */
- FZ_FUNCTION FzXml fz_parse_xml_stream(const FzStream& stream, int preserve_white);
- /** Class-aware wrapper for `::fz_path_is_rect()`. */
- /**
- Check whether a given path, under the given transform
- is an axis-aligned rectangle.
-
- We accept zero width or height rectangles, so
- "move 100, 100; line 200, 100" would count as
- a rectangle too.
- */
- FZ_FUNCTION int fz_path_is_rect(const FzPath& path, const FzMatrix& ctm);
- /** Class-aware wrapper for `::fz_path_is_rect_with_bounds()`. */
- /**
- Check whether a given path, under the given transform
- is an axis-aligned rectangle.
-
- We accept zero width or height rectangles, so
- "move 100, 100; line 200, 100" would count as
- a rectangle too.
-
- bounds = NULL, or place to return the rectangle
- bounds if the path is a rectangle.
- */
- FZ_FUNCTION int fz_path_is_rect_with_bounds(const FzPath& path, const FzMatrix& ctm, FzRect& bounds);
- /** Class-aware wrapper for `::fz_pcl_preset()`. */
- /**
- Initialize PCL option struct for a given preset.
-
- Currently defined presets include:
-
- generic Generic PCL printer
- ljet4 HP DeskJet
- dj500 HP DeskJet 500
- fs600 Kyocera FS-600
- lj HP LaserJet, HP LaserJet Plus
- lj2 HP LaserJet IIp, HP LaserJet IId
- lj3 HP LaserJet III
- lj3d HP LaserJet IIId
- lj4 HP LaserJet 4
- lj4pl HP LaserJet 4 PL
- lj4d HP LaserJet 4d
- lp2563b HP 2563B line printer
- oce9050 Oce 9050 Line printer
- */
- FZ_FUNCTION void fz_pcl_preset(const FzPclOptions& opts, const char *preset);
- /** Class-aware wrapper for `::fz_pdfocr_band_writer_set_progress()`. */
- /**
- Set the progress callback for a pdfocr bandwriter.
- */
- FZ_FUNCTION void fz_pdfocr_band_writer_set_progress(const FzBandWriter& writer, ::fz_pdfocr_progress_fn *progress_fn, void *progress_arg);
- /** Class-aware wrapper for `::fz_pdfocr_writer_set_progress()`. */
- FZ_FUNCTION void fz_pdfocr_writer_set_progress(const FzDocumentWriter& writer, ::fz_pdfocr_progress_fn *progress, void *arg_2);
- /** Class-aware wrapper for `::fz_peek_byte()`. */
- /**
- Peek at the next byte in a stream.
-
- stm: The stream to peek at.
-
- Returns -1 for EOF, or the next byte that will be read.
- */
- FZ_FUNCTION int fz_peek_byte(const FzStream& stm);
- /** Class-aware wrapper for `::fz_pixmap_alpha()`. */
- /**
- Return the number of alpha planes in a pixmap.
-
- Returns the number of alphas. Does not throw exceptions.
- */
- FZ_FUNCTION int fz_pixmap_alpha(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_bbox()`. */
- /**
- Return the bounding box for a pixmap.
- */
- FZ_FUNCTION FzIrect fz_pixmap_bbox(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_colorants()`. */
- /**
- Return the number of colorants in a pixmap.
-
- Returns the number of colorants (components, less any spots and
- alpha).
- */
- FZ_FUNCTION int fz_pixmap_colorants(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_colorspace()`. */
- /**
- Return the colorspace of a pixmap
-
- Returns colorspace.
- */
- FZ_FUNCTION FzColorspace fz_pixmap_colorspace(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_components()`. */
- /**
- Return the number of components in a pixmap.
-
- Returns the number of components (including spots and alpha).
- */
- FZ_FUNCTION int fz_pixmap_components(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_height()`. */
- /**
- Return the height of the pixmap in pixels.
- */
- FZ_FUNCTION int fz_pixmap_height(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_image_tile()`. */
- /**
- Retrieve the underlying fz_pixmap for an image.
-
- Returns a pointer to the underlying fz_pixmap for an image,
- or NULL if this image is not based upon an fz_pixmap.
-
- No reference is returned. Lifespan is limited to that of
- the image itself. If required, use fz_keep_pixmap to take
- a reference to keep it longer.
- */
- FZ_FUNCTION FzPixmap fz_pixmap_image_tile(const FzPixmapImage& cimg);
- /** Class-aware wrapper for `::fz_pixmap_samples()`. */
- /**
- Returns a pointer to the pixel data of a pixmap.
-
- Returns the pointer.
- */
- FZ_FUNCTION unsigned char *fz_pixmap_samples(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_samples_int()`. */
- /** */
- FZ_FUNCTION long long fz_pixmap_samples_int(const FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_pixmap_size()`. */
- /**
- Return sizeof fz_pixmap plus size of data, in bytes.
- */
- FZ_FUNCTION size_t fz_pixmap_size(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_spots()`. */
- /**
- Return the number of spots in a pixmap.
-
- Returns the number of spots (components, less colorants and
- alpha). Does not throw exceptions.
- */
- FZ_FUNCTION int fz_pixmap_spots(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_stride()`. */
- /**
- Return the number of bytes in a row in the pixmap.
- */
- FZ_FUNCTION int fz_pixmap_stride(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_width()`. */
- /**
- Return the width of the pixmap in pixels.
- */
- FZ_FUNCTION int fz_pixmap_width(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_x()`. */
- /**
- Return the x value of the pixmap in pixels.
- */
- FZ_FUNCTION int fz_pixmap_x(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_pixmap_y()`. */
- /**
- Return the y value of the pixmap in pixels.
- */
- FZ_FUNCTION int fz_pixmap_y(const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_place_story()`. */
- FZ_FUNCTION int fz_place_story(const FzStory& story, const FzRect& where, FzRect& filled);
- /** Class-aware wrapper for `::fz_place_story_flags()`. */
- FZ_FUNCTION int fz_place_story_flags(const FzStory& story, const FzRect& where, FzRect& filled, int flags);
- /** Class-aware wrapper for `::fz_pool_alloc()`. */
- /**
- Allocate a block of size bytes from the pool.
- */
- FZ_FUNCTION void *fz_pool_alloc(const FzPool& pool, size_t size);
- /** Class-aware wrapper for `::fz_pool_array_append()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_pool_array_append(::fz_pool_array *arr)` => `(void *, size_t idx)`
- */
- /**
- Append an element to the end of the array.
-
- Returns a pointer to the new element (initially all 0's), and
- (optionally) the index of that element.
- */
- FZ_FUNCTION void *fz_pool_array_append(const FzPoolArray& arr, size_t *idx);
- /** Class-aware wrapper for `::fz_pool_array_len()`. */
- /**
- Get the length of the array.
- */
- FZ_FUNCTION size_t fz_pool_array_len(const FzPoolArray& arr);
- /** Class-aware wrapper for `::fz_pool_array_lookup()`. */
- /**
- Lookup an element in the array.
- */
- FZ_FUNCTION void *fz_pool_array_lookup(const FzPoolArray& arr, size_t idx);
- /** Class-aware wrapper for `::fz_pool_size()`. */
- /**
- The current size of the pool.
-
- The number of bytes of storage currently allocated to the pool.
- This is the total of the storage used for the blocks making
- up the pool, rather then total of the allocated blocks so far,
- so it will increase in 'lumps'.
- from the pool, then the pool size may still be X
- */
- FZ_FUNCTION size_t fz_pool_size(const FzPool& pool);
- /** Class-aware wrapper for `::fz_pool_strdup()`. */
- /**
- strdup equivalent allocating from the pool.
- */
- FZ_FUNCTION char *fz_pool_strdup(const FzPool& pool, const char *s);
- /** Class-aware wrapper for `::fz_pop_clip()`. */
- FZ_FUNCTION void fz_pop_clip(const FzDevice& dev);
- /** Class-aware wrapper for `::fz_post_scale()`. */
- /**
- Scale a matrix by postmultiplication.
-
- m: Pointer to the matrix to scale
-
- sx, sy: Scaling factors along the X- and Y-axes. A scaling
- factor of 1.0 will not cause any scaling along the relevant
- axis.
-
- Returns m (updated).
- */
- FZ_FUNCTION FzMatrix fz_post_scale(const FzMatrix& m, float sx, float sy);
- /** Class-aware wrapper for `::fz_pre_rotate()`. */
- /**
- Rotate a transformation by premultiplying.
-
- The premultiplied matrix is of the form
- [ cos(deg) sin(deg) -sin(deg) cos(deg) 0 0 ].
-
- m: Pointer to matrix to premultiply.
-
- degrees: Degrees of counter clockwise rotation. Values less
- than zero and greater than 360 are handled as expected.
-
- Returns m (updated).
- */
- FZ_FUNCTION FzMatrix fz_pre_rotate(const FzMatrix& m, float degrees);
- /** Class-aware wrapper for `::fz_pre_scale()`. */
- /**
- Scale a matrix by premultiplication.
-
- m: Pointer to the matrix to scale
-
- sx, sy: Scaling factors along the X- and Y-axes. A scaling
- factor of 1.0 will not cause any scaling along the relevant
- axis.
-
- Returns m (updated).
- */
- FZ_FUNCTION FzMatrix fz_pre_scale(const FzMatrix& m, float sx, float sy);
- /** Class-aware wrapper for `::fz_pre_shear()`. */
- /**
- Premultiply a matrix with a shearing matrix.
-
- The shearing matrix is of the form [ 1 sy sx 1 0 0 ].
-
- m: pointer to matrix to premultiply
-
- sx, sy: Shearing factors. A shearing factor of 0.0 will not
- cause any shearing along the relevant axis.
-
- Returns m (updated).
- */
- FZ_FUNCTION FzMatrix fz_pre_shear(const FzMatrix& m, float sx, float sy);
- /** Class-aware wrapper for `::fz_pre_translate()`. */
- /**
- Translate a matrix by premultiplication.
-
- m: The matrix to translate
-
- tx, ty: Translation distances along the X- and Y-axes. A
- translation of 0 will not cause any translation along the
- relevant axis.
-
- Returns m.
- */
- FZ_FUNCTION FzMatrix fz_pre_translate(const FzMatrix& m, float tx, float ty);
- /** Class-aware wrapper for `::fz_prepare_t3_glyph()`. */
- /**
- Force a type3 font to cache the displaylist for a given glyph
- id.
-
- This caching can involve reading the underlying file, so must
- happen ahead of time, so we aren't suddenly forced to read the
- file while playing a displaylist back.
- */
- FZ_FUNCTION void fz_prepare_t3_glyph(const FzFont& font, int gid);
- /** Class-aware wrapper for `::fz_previous_page()`. */
- /**
- Function to get the location of the previous page (allowing for
- the end of chapters etc). If already at the start of the
- document, returns the current page.
- */
- FZ_FUNCTION FzLocation fz_previous_page(const FzDocument& doc, const FzLocation& loc);
- /** Class-aware wrapper for `::fz_print_stext_header_as_html()`. */
- FZ_FUNCTION void fz_print_stext_header_as_html(const FzOutput& out);
- /** Class-aware wrapper for `::fz_print_stext_header_as_xhtml()`. */
- FZ_FUNCTION void fz_print_stext_header_as_xhtml(const FzOutput& out);
- /** Class-aware wrapper for `::fz_print_stext_page_as_html()`. */
- /**
- Output structured text to a file in HTML (visual) format.
- */
- FZ_FUNCTION void fz_print_stext_page_as_html(const FzOutput& out, const FzStextPage& page, int id);
- /** Class-aware wrapper for `::fz_print_stext_page_as_json()`. */
- /**
- Output structured text to a file in JSON format.
- */
- FZ_FUNCTION void fz_print_stext_page_as_json(const FzOutput& out, const FzStextPage& page, float scale);
- /** Class-aware wrapper for `::fz_print_stext_page_as_text()`. */
- /**
- Output structured text to a file in plain-text UTF-8 format.
- */
- FZ_FUNCTION void fz_print_stext_page_as_text(const FzOutput& out, const FzStextPage& page);
- /** Class-aware wrapper for `::fz_print_stext_page_as_xhtml()`. */
- /**
- Output structured text to a file in XHTML (semantic) format.
- */
- FZ_FUNCTION void fz_print_stext_page_as_xhtml(const FzOutput& out, const FzStextPage& page, int id);
- /** Class-aware wrapper for `::fz_print_stext_page_as_xml()`. */
- /**
- Output structured text to a file in XML format.
- */
- FZ_FUNCTION void fz_print_stext_page_as_xml(const FzOutput& out, const FzStextPage& page, int id);
- /** Class-aware wrapper for `::fz_print_stext_trailer_as_html()`. */
- FZ_FUNCTION void fz_print_stext_trailer_as_html(const FzOutput& out);
- /** Class-aware wrapper for `::fz_print_stext_trailer_as_xhtml()`. */
- FZ_FUNCTION void fz_print_stext_trailer_as_xhtml(const FzOutput& out);
- /** Class-aware wrapper for `::fz_process_opened_pages()`. */
- /**
- Iterates over all opened pages of the document, calling the
- provided callback for each page for processing. If the callback
- returns non-NULL then the iteration stops and that value is returned
- to the called of fz_process_opened_pages().
-
- The state pointer provided to fz_process_opened_pages() is
- passed on to the callback but is owned by the caller.
-
- Returns the first non-NULL value returned by the callback,
- or NULL if the callback returned NULL for all opened pages.
- */
- FZ_FUNCTION void *fz_process_opened_pages(const FzDocument& doc, ::fz_process_opened_page_fn *process_openend_page, void *state);
- /** Class-aware wrapper for `::fz_process_shade()`. */
- /**
- Process a shade, using supplied callback functions. This
- decomposes the shading to a mesh (even ones that are not
- natively meshes, such as linear or radial shadings), and
- processes triangles from those meshes.
-
- shade: The shade to process.
-
- ctm: The transform to use
-
- prepare: Callback function to 'prepare' each vertex.
- This function is passed an array of floats, and populates
- a fz_vertex structure.
-
- process: This function is passed 3 pointers to vertex
- structures, and actually performs the processing (typically
- filling the area between the vertices).
-
- process_arg: An opaque argument passed through from caller
- to callback functions.
- */
- FZ_FUNCTION void fz_process_shade(const FzShade& shade, const FzMatrix& ctm, const FzRect& scissor, ::fz_shade_prepare_fn *prepare, ::fz_shade_process_fn *process, void *process_arg);
- /** Class-aware wrapper for `::fz_ptr_heap_insert()`. */
- FZ_FUNCTION void fz_ptr_heap_insert(const FzPtrHeap& heap, void *v, int (*HEAP_CMP)(void **, void **));
- /** Class-aware wrapper for `::fz_ptr_heap_sort()`. */
- FZ_FUNCTION void fz_ptr_heap_sort(const FzPtrHeap& heap, int (*HEAP_CMP)(void **, void **));
- /** Class-aware wrapper for `::fz_ptr_heap_uniq()`. */
- FZ_FUNCTION void fz_ptr_heap_uniq(const FzPtrHeap& heap, int (*HEAP_CMP)(void **, void **));
- /** Class-aware wrapper for `::fz_purge_glyph_cache()`. */
- /**
- Purge all the glyphs from the cache.
- */
- FZ_FUNCTION void fz_purge_glyph_cache();
- /** Class-aware wrapper for `::fz_quad_from_rect()`. */
- /**
- Convert a rect to a quad (losslessly).
- */
- FZ_FUNCTION FzQuad fz_quad_from_rect(const FzRect& r);
- /** Class-aware wrapper for `::fz_quadto()`. */
- /**
- Append a 'quadto' command to an open path. (For a
- quadratic bezier).
-
- path: The path to modify.
-
- x0, y0: The control coordinates for the quadratic curve.
-
- x1, y1: The end coordinates for the quadratic curve.
-
- Throws exceptions on failure to allocate, or attempting to
- modify a packed path.
- */
- FZ_FUNCTION void fz_quadto(const FzPath& path, float x0, float y0, float x1, float y1);
- /** Class-aware wrapper for `::fz_range_limit_xml_char()`. */
- FZ_FUNCTION int fz_range_limit_xml_char(int c);
- /** Class-aware wrapper for `::fz_read()`. */
- /**
- Read from a stream into a given data block.
-
- stm: The stream to read from.
-
- data: The data block to read into.
-
- len: The length of the data block (in bytes).
-
- Returns the number of bytes read. May throw exceptions.
- */
- FZ_FUNCTION size_t fz_read(const FzStream& stm, unsigned char *data, size_t len);
- /** Class-aware wrapper for `::fz_read_all()`. */
- /**
- Read all of a stream into a buffer.
-
- stm: The stream to read from
-
- initial: Suggested initial size for the buffer.
-
- Returns a buffer created from reading from the stream. May throw
- exceptions on failure to allocate.
- */
- FZ_FUNCTION FzBuffer fz_read_all(const FzStream& stm, size_t initial);
- /** Class-aware wrapper for `::fz_read_archive_entry()`. */
- /**
- Reads all bytes in an archive entry
- into a buffer.
-
- name: Entry name to look for, this must be an exact match to
- the entry name in the archive.
-
- Throws an exception if a matching entry cannot be found.
- */
- FZ_FUNCTION FzBuffer fz_read_archive_entry(const FzArchive& arch, const char *name);
- /** Class-aware wrapper for `::fz_read_best()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_read_best(::fz_stream *stm, size_t initial, size_t worst_case)` => `(fz_buffer *, int truncated)`
- */
- /**
- Attempt to read a stream into a buffer. If truncated
- is NULL behaves as fz_read_all, sets a truncated flag in case of
- error.
-
- stm: The stream to read from.
-
- initial: Suggested initial size for the buffer.
-
- truncated: Flag to store success/failure indication in.
-
- worst_case: 0 for unknown, otherwise an upper bound for the
- size of the stream.
-
- Returns a buffer created from reading from the stream.
- */
- FZ_FUNCTION FzBuffer fz_read_best(const FzStream& stm, size_t initial, int *truncated, size_t worst_case);
- /** Class-aware wrapper for `::fz_read_bits()`. */
- /**
- Read the next n bits from a stream (assumed to
- be packed most significant bit first).
-
- stm: The stream to read from.
-
- n: The number of bits to read, between 1 and 8*sizeof(int)
- inclusive.
-
- Returns -1 for EOF, or the required number of bits.
- */
- FZ_FUNCTION unsigned int fz_read_bits(const FzStream& stm, int n);
- /** Class-aware wrapper for `::fz_read_byte()`. */
- /**
- Read the next byte from a stream.
-
- stm: The stream t read from.
-
- Returns -1 for end of stream, or the next byte. May
- throw exceptions.
- */
- FZ_FUNCTION int fz_read_byte(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_file()`. */
- /**
- Read all the contents of a file into a buffer.
- */
- FZ_FUNCTION FzBuffer fz_read_file(const char *filename);
- /** Class-aware wrapper for `::fz_read_float()`. */
- FZ_FUNCTION float fz_read_float(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_float_le()`. */
- FZ_FUNCTION float fz_read_float_le(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_int16()`. */
- FZ_FUNCTION int16_t fz_read_int16(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_int16_le()`. */
- FZ_FUNCTION int16_t fz_read_int16_le(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_int32()`. */
- FZ_FUNCTION int32_t fz_read_int32(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_int32_le()`. */
- FZ_FUNCTION int32_t fz_read_int32_le(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_int64()`. */
- FZ_FUNCTION int64_t fz_read_int64(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_int64_le()`. */
- FZ_FUNCTION int64_t fz_read_int64_le(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_line()`. */
- /**
- Read a line from stream into the buffer until either a
- terminating newline or EOF, which it replaces with a null byte
- ('\0').
-
- Returns buf on success, and NULL when end of file occurs while
- no characters have been read.
- */
- FZ_FUNCTION char *fz_read_line(const FzStream& stm, char *buf, size_t max);
- /** Class-aware wrapper for `::fz_read_rbits()`. */
- /**
- Read the next n bits from a stream (assumed to
- be packed least significant bit first).
-
- stm: The stream to read from.
-
- n: The number of bits to read, between 1 and 8*sizeof(int)
- inclusive.
-
- Returns (unsigned int)-1 for EOF, or the required number of bits.
- */
- FZ_FUNCTION unsigned int fz_read_rbits(const FzStream& stm, int n);
- /** Class-aware wrapper for `::fz_read_rune()`. */
- /**
- Read a utf-8 rune from a stream.
-
- In the event of encountering badly formatted utf-8 codes
- (such as a leading code with an unexpected number of following
- codes) no error/exception is given, but undefined values may be
- returned.
- */
- FZ_FUNCTION int fz_read_rune(const FzStream& in);
- /** Class-aware wrapper for `::fz_read_string()`. */
- /**
- Read a null terminated string from the stream into
- a buffer of a given length. The buffer will be null terminated.
- Throws on failure (including the failure to fit the entire
- string including the terminator into the buffer).
- */
- FZ_FUNCTION void fz_read_string(const FzStream& stm, char *buffer, int len);
- /** Class-aware wrapper for `::fz_read_uint16()`. */
- /**
- fz_read_[u]int(16|24|32|64)(_le)?
-
- Read a 16/32/64 bit signed/unsigned integer from stream,
- in big or little-endian byte orders.
-
- Throws an exception if EOF is encountered.
- */
- FZ_FUNCTION uint16_t fz_read_uint16(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_uint16_le()`. */
- FZ_FUNCTION uint16_t fz_read_uint16_le(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_uint24()`. */
- FZ_FUNCTION uint32_t fz_read_uint24(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_uint24_le()`. */
- FZ_FUNCTION uint32_t fz_read_uint24_le(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_uint32()`. */
- FZ_FUNCTION uint32_t fz_read_uint32(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_uint32_le()`. */
- FZ_FUNCTION uint32_t fz_read_uint32_le(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_uint64()`. */
- FZ_FUNCTION uint64_t fz_read_uint64(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_uint64_le()`. */
- FZ_FUNCTION uint64_t fz_read_uint64_le(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_utf16_be()`. */
- FZ_FUNCTION int fz_read_utf16_be(const FzStream& stm);
- /** Class-aware wrapper for `::fz_read_utf16_le()`. */
- /**
- Read a utf-16 rune from a stream. (little endian and
- big endian respectively).
-
- In the event of encountering badly formatted utf-16 codes
- (mismatched surrogates) no error/exception is given, but
- undefined values may be returned.
- */
- FZ_FUNCTION int fz_read_utf16_le(const FzStream& stm);
- /** Class-aware wrapper for `::fz_realloc()`. */
- /**
- Reallocates a block of memory to given size. Existing contents
- up to min(old_size,new_size) are maintained. The rest of the
- block is uninitialised.
-
- fz_realloc(ctx, NULL, size) behaves like fz_malloc(ctx, size).
-
- fz_realloc(ctx, p, 0); behaves like fz_free(ctx, p).
-
- Throws exception in the event of failure to allocate.
- */
- FZ_FUNCTION void *fz_realloc(void *p, size_t size);
- /** Class-aware wrapper for `::fz_realloc_no_throw()`. */
- /**
- fz_realloc equivalent that returns NULL rather than throwing
- exceptions.
- */
- FZ_FUNCTION void *fz_realloc_no_throw(void *p, size_t size);
- /** Class-aware wrapper for `::fz_realpath()`. */
- /**
- Resolve a path to an absolute file name.
- The resolved path buffer must be of at least PATH_MAX size.
- */
- FZ_FUNCTION char *fz_realpath(const char *path, char *resolved_path);
- /* Class-aware wrapper for `fz_recognize_document()`
- is not available because returned wrapper class for `fz_document_handler`
- is non-copyable. */
- /* Class-aware wrapper for `fz_recognize_document_content()`
- is not available because returned wrapper class for `fz_document_handler`
- is non-copyable. */
- /* Class-aware wrapper for `fz_recognize_document_stream_and_dir_content()`
- is not available because returned wrapper class for `fz_document_handler`
- is non-copyable. */
- /* Class-aware wrapper for `fz_recognize_document_stream_content()`
- is not available because returned wrapper class for `fz_document_handler`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_recognize_image_format()`. */
- /**
- Recognise image format strings in the first 8 bytes from image
- data.
- */
- FZ_FUNCTION int fz_recognize_image_format(unsigned char p[8]);
- /** Class-aware wrapper for `::fz_rect_from_irect()`. */
- /**
- Convert a bbox into a rect.
-
- For our purposes, a rect can represent all the values we meet in
- a bbox, so nothing can go wrong.
-
- rect: A place to store the generated rectangle.
-
- bbox: The bbox to convert.
-
- Returns rect (updated).
- */
- FZ_FUNCTION FzRect fz_rect_from_irect(const FzIrect& bbox);
- /** Class-aware wrapper for `::fz_rect_from_quad()`. */
- /**
- Convert a quad to the smallest rect that covers it.
- */
- FZ_FUNCTION FzRect fz_rect_from_quad(const FzQuad& q);
- /** Class-aware wrapper for `::fz_rectto()`. */
- /**
- Append a 'rectto' command to an open path.
-
- The rectangle is equivalent to:
- moveto x0 y0
- lineto x1 y0
- lineto x1 y1
- lineto x0 y1
- closepath
-
- path: The path to modify.
-
- x0, y0: First corner of the rectangle.
-
- x1, y1: Second corner of the rectangle.
-
- Throws exceptions on failure to allocate, or attempting to
- modify a packed path.
- */
- FZ_FUNCTION void fz_rectto(const FzPath& path, float x0, float y0, float x1, float y1);
- /** Class-aware wrapper for `::fz_register_activity_logger()`. */
- FZ_FUNCTION void fz_register_activity_logger(::fz_activity_fn *activity, void *opaque);
- /** Class-aware wrapper for `::fz_register_archive_handler()`. */
- FZ_FUNCTION void fz_register_archive_handler(const FzArchiveHandler& handler);
- /** Class-aware wrapper for `::fz_register_document_handler()`. */
- /**
- Register a handler for a document type.
-
- handler: The handler to register. This must live on for the duration of the
- use of this handler. It will be passed back to the handler for calls so
- the caller can use it to retrieve state.
- */
- FZ_FUNCTION void fz_register_document_handler(const FzDocumentHandler& handler);
- /** Class-aware wrapper for `::fz_register_document_handlers()`. */
- /**
- Register handlers for all the standard document types supported in
- this build.
- */
- FZ_FUNCTION void fz_register_document_handlers();
- /** Class-aware wrapper for `::fz_remove_item()`. */
- /**
- Remove an item from the store.
-
- If an item indexed by the given key exists in the store, remove
- it.
-
- drop: The function used to free the value (to ensure we get a
- value of the correct type).
-
- key: The key used to find the item to remove.
-
- type: Functions used to manipulate the key.
- */
- FZ_FUNCTION void fz_remove_item(::fz_store_drop_fn *drop, void *key, const FzStoreType& type);
- /** Class-aware wrapper for `::fz_render_flags()`. */
- FZ_FUNCTION void fz_render_flags(const FzDevice& dev, int set, int clear);
- /** Class-aware wrapper for `::fz_render_glyph_pixmap()`. */
- /**
- Create a pixmap containing a rendered glyph.
-
- Lookup gid from font, clip it with scissor, and rendering it
- with aa bits of antialiasing into a new pixmap.
-
- The caller takes ownership of the pixmap and so must free it.
-
- Note: This function is no longer used for normal rendering
- operations, and is kept around just because we use it in the
- app. It should be considered "at risk" of removal from the API.
- */
- FZ_FUNCTION FzPixmap fz_render_glyph_pixmap(const FzFont& font, int gid, FzMatrix& ctm, FzIrect& scissor, int aa);
- /** Class-aware wrapper for `::fz_render_t3_glyph_direct()`. */
- /**
- Nasty PDF interpreter specific hernia, required to allow the
- interpreter to replay glyphs from a type3 font directly into
- the target device.
-
- This is only used in exceptional circumstances (such as type3
- glyphs that inherit current graphics state, or nested type3
- glyphs).
- */
- FZ_FUNCTION void fz_render_t3_glyph_direct(const FzDevice& dev, const FzFont& font, int gid, const FzMatrix& trm, void *gstate, const FzDefaultColorspaces& def_cs, void *fill_gstate, void *stroke_gstate);
- /** Class-aware wrapper for `::fz_rendering_intent_name()`. */
- /**
- Map from enumerated rendering intent to string.
-
- The returned string is static and therefore must not be freed.
- */
- FZ_FUNCTION const char *fz_rendering_intent_name(int ri);
- /** Class-aware wrapper for `::fz_report_error()`. */
- FZ_FUNCTION void fz_report_error();
- /** Class-aware wrapper for `::fz_reset_output()`. */
- /**
- Reset a closed output stream. Returns state to
- (broadly) that which it was in when opened. Not
- all outputs can be reset, so this may throw an
- exception.
- */
- FZ_FUNCTION void fz_reset_output(const FzOutput& arg_0);
- /** Class-aware wrapper for `::fz_reset_story()`. */
- FZ_FUNCTION void fz_reset_story(const FzStory& story);
- /** Class-aware wrapper for `::fz_resize_buffer()`. */
- /**
- Ensure that a buffer has a given capacity,
- truncating data if required.
-
- capacity: The desired capacity for the buffer. If the current
- size of the buffer contents is smaller than capacity, it is
- truncated.
- */
- FZ_FUNCTION void fz_resize_buffer(const FzBuffer& buf, size_t capacity);
- /** Class-aware wrapper for `::fz_resolve_link()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_resolve_link(::fz_document *doc, const char *uri)` => `(fz_location, float xp, float yp)`
- */
- /**
- Resolve an internal link to a page number.
-
- xp, yp: Pointer to store coordinate of destination on the page.
-
- Returns (-1,-1) if the URI cannot be resolved.
- */
- FZ_FUNCTION FzLocation fz_resolve_link(const FzDocument& doc, const char *uri, float *xp, float *yp);
- /* Class-aware wrapper for `fz_resolve_link_dest()`
- is not available because returned wrapper class for `fz_link_dest`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_rethrow()`. */
- FZ_FUNCTION void fz_rethrow();
- /** Class-aware wrapper for `::fz_rethrow_if()`. */
- /**
- Within an fz_catch() block, rethrow the current exception
- if the errcode of the current exception matches.
-
- This assumes no intervening use of fz_try/fz_catch.
- */
- FZ_FUNCTION void fz_rethrow_if(int errcode);
- /** Class-aware wrapper for `::fz_rethrow_unless()`. */
- FZ_FUNCTION void fz_rethrow_unless(int errcode);
- /** Class-aware wrapper for `::fz_rotate()`. */
- /**
- Create a rotation matrix.
-
- The returned matrix is of the form
- [ cos(deg) sin(deg) -sin(deg) cos(deg) 0 0 ].
-
- m: Pointer to place to store matrix
-
- degrees: Degrees of counter clockwise rotation. Values less
- than zero and greater than 360 are handled as expected.
-
- Returns m.
- */
- FZ_FUNCTION FzMatrix fz_rotate(float degrees);
- /** Class-aware wrapper for `::fz_round_rect()`. */
- /**
- Round rectangle coordinates.
-
- Coordinates in a bounding box are integers, so rounding of the
- rects coordinates takes place. The top left corner is rounded
- upwards and left while the bottom right corner is rounded
- downwards and to the right.
-
- This differs from fz_irect_from_rect, in that fz_irect_from_rect
- slavishly follows the numbers (i.e any slight over/under
- calculations can cause whole extra pixels to be added).
- fz_round_rect allows for a small amount of rounding error when
- calculating the bbox.
- */
- FZ_FUNCTION FzIrect fz_round_rect(const FzRect& rect);
- /** Class-aware wrapper for `::fz_run_display_list()`. */
- /**
- (Re)-run a display list through a device.
-
- list: A display list, created by fz_new_display_list and
- populated with objects from a page by running fz_run_page on a
- device obtained from fz_new_list_device.
-
- ctm: Transform to apply to display list contents. May include
- for example scaling and rotation, see fz_scale, fz_rotate and
- fz_concat. Set to fz_identity if no transformation is desired.
-
- scissor: Only the part of the contents of the display list
- visible within this area will be considered when the list is
- run through the device. This does not imply for tile objects
- contained in the display list.
-
- cookie: Communication mechanism between caller and library
- running the page. Intended for multi-threaded applications,
- while single-threaded applications set cookie to NULL. The
- caller may abort an ongoing page run. Cookie also communicates
- progress information back to the caller. The fields inside
- cookie are continually updated while the page is being run.
- */
- FZ_FUNCTION void fz_run_display_list(const FzDisplayList& list, const FzDevice& dev, const FzMatrix& ctm, const FzRect& scissor, FzCookie& cookie);
- /** Class-aware wrapper for `::fz_run_document_structure()`. */
- /**
- Run the document structure through a device.
-
- doc: Document in question.
-
- dev: Device obtained from fz_new_*_device.
-
- cookie: Communication mechanism between caller and library.
- Intended for multi-threaded applications, while
- single-threaded applications set cookie to NULL. The
- caller may abort an ongoing rendering of a page. Cookie also
- communicates progress information back to the caller. The
- fields inside cookie are continually updated while the page is
- rendering.
- */
- FZ_FUNCTION void fz_run_document_structure(const FzDocument& doc, const FzDevice& dev, FzCookie& cookie);
- /** Class-aware wrapper for `::fz_run_page()`. */
- /**
- Run a page through a device.
-
- page: Page obtained from fz_load_page.
-
- dev: Device obtained from fz_new_*_device.
-
- transform: Transform to apply to page. May include for example
- scaling and rotation, see fz_scale, fz_rotate and fz_concat.
- Set to fz_identity if no transformation is desired.
-
- cookie: Communication mechanism between caller and library
- rendering the page. Intended for multi-threaded applications,
- while single-threaded applications set cookie to NULL. The
- caller may abort an ongoing rendering of a page. Cookie also
- communicates progress information back to the caller. The
- fields inside cookie are continually updated while the page is
- rendering.
- */
- FZ_FUNCTION void fz_run_page(const FzPage& page, const FzDevice& dev, const FzMatrix& transform, FzCookie& cookie);
- /** Class-aware wrapper for `::fz_run_page_annots()`. */
- /**
- Run the annotations on a page through a device.
- */
- FZ_FUNCTION void fz_run_page_annots(const FzPage& page, const FzDevice& dev, const FzMatrix& transform, FzCookie& cookie);
- /** Class-aware wrapper for `::fz_run_page_contents()`. */
- /**
- Run a page through a device. Just the main
- page content, without the annotations, if any.
-
- page: Page obtained from fz_load_page.
-
- dev: Device obtained from fz_new_*_device.
-
- transform: Transform to apply to page. May include for example
- scaling and rotation, see fz_scale, fz_rotate and fz_concat.
- Set to fz_identity if no transformation is desired.
-
- cookie: Communication mechanism between caller and library
- rendering the page. Intended for multi-threaded applications,
- while single-threaded applications set cookie to NULL. The
- caller may abort an ongoing rendering of a page. Cookie also
- communicates progress information back to the caller. The
- fields inside cookie are continually updated while the page is
- rendering.
- */
- FZ_FUNCTION void fz_run_page_contents(const FzPage& page, const FzDevice& dev, const FzMatrix& transform, FzCookie& cookie);
- /** Class-aware wrapper for `::fz_run_page_widgets()`. */
- /**
- Run the widgets on a page through a device.
- */
- FZ_FUNCTION void fz_run_page_widgets(const FzPage& page, const FzDevice& dev, const FzMatrix& transform, FzCookie& cookie);
- /** Class-aware wrapper for `::fz_run_t3_glyph()`. */
- /**
- Run a glyph from a Type3 font to
- a given device.
-
- font: The font to find the glyph in.
-
- gid: The glyph to run.
-
- trm: The transform to apply.
-
- dev: The device to render onto.
- */
- FZ_FUNCTION void fz_run_t3_glyph(const FzFont& font, int gid, const FzMatrix& trm, const FzDevice& dev);
- /** Class-aware wrapper for `::fz_runeidx()`. */
- /**
- Compute the index of a rune in a string.
-
- str: Pointer to beginning of a string.
-
- p: Pointer to a char in str.
-
- Returns the index of the rune pointed to by p in str.
- */
- FZ_FUNCTION int fz_runeidx(const char *str, const char *p);
- /** Class-aware wrapper for `::fz_runelen()`. */
- /**
- Count how many chars are required to represent a rune.
-
- rune: The rune to encode.
-
- Returns the number of bytes required to represent this run in
- UTF8.
- */
- FZ_FUNCTION int fz_runelen(int rune);
- /** Class-aware wrapper for `::fz_runeptr()`. */
- /**
- Obtain a pointer to the char representing the rune
- at a given index.
-
- str: Pointer to beginning of a string.
-
- idx: Index of a rune to return a char pointer to.
-
- Returns a pointer to the char where the desired rune starts,
- or NULL if the string ends before the index is reached.
- */
- FZ_FUNCTION const char *fz_runeptr(const char *str, int idx);
- /** Class-aware wrapper for `::fz_runetochar()`. */
- /**
- UTF8 encode a rune to a sequence of chars.
-
- str: Pointer to a place to put the UTF8 encoded character.
-
- rune: Pointer to a 'rune'.
-
- Returns the number of bytes the rune took to output.
- */
- FZ_FUNCTION int fz_runetochar(char *str, int rune);
- /** Class-aware wrapper for `::fz_samples_get()`. */
- /**
- Provides simple (but slow) access to pixmap data from Python and C#.
- */
- FZ_FUNCTION int fz_samples_get(const FzPixmap& pixmap, int offset);
- /** Class-aware wrapper for `::fz_samples_set()`. */
- /**
- Provides simple (but slow) write access to pixmap data from Python and
- C#.
- */
- FZ_FUNCTION void fz_samples_set(const FzPixmap& pixmap, int offset, int value);
- /** Class-aware wrapper for `::fz_save_accelerator()`. */
- /**
- Save accelerator data for the document to a given file.
- */
- FZ_FUNCTION void fz_save_accelerator(const FzDocument& doc, const char *accel);
- /** Class-aware wrapper for `::fz_save_bitmap_as_pbm()`. */
- /**
- Save a bitmap as a pbm.
- */
- FZ_FUNCTION void fz_save_bitmap_as_pbm(const FzBitmap& bitmap, const char *filename);
- /** Class-aware wrapper for `::fz_save_bitmap_as_pcl()`. */
- /**
- Save a bitmap as mono PCL.
- */
- FZ_FUNCTION void fz_save_bitmap_as_pcl(const FzBitmap& bitmap, char *filename, int append, const FzPclOptions& pcl);
- /** Class-aware wrapper for `::fz_save_bitmap_as_pkm()`. */
- /**
- Save a CMYK bitmap as a pkm.
- */
- FZ_FUNCTION void fz_save_bitmap_as_pkm(const FzBitmap& bitmap, const char *filename);
- /** Class-aware wrapper for `::fz_save_bitmap_as_pwg()`. */
- /**
- Save a bitmap as a PWG.
- */
- FZ_FUNCTION void fz_save_bitmap_as_pwg(const FzBitmap& bitmap, char *filename, int append, FzPwgOptions& pwg);
- /** Class-aware wrapper for `::fz_save_buffer()`. */
- /**
- Save the contents of a buffer to a file.
- */
- FZ_FUNCTION void fz_save_buffer(const FzBuffer& buf, const char *filename);
- /** Class-aware wrapper for `::fz_save_pixmap_as_jpeg()`. */
- /**
- Save a pixmap as a JPEG.
- */
- FZ_FUNCTION void fz_save_pixmap_as_jpeg(const FzPixmap& pixmap, const char *filename, int quality);
- /** Class-aware wrapper for `::fz_save_pixmap_as_jpx()`. */
- /**
- Save pixmap data as JP2K with no subsampling.
-
- quality = 100 = lossless
- otherwise for a factor of x compression use 100-x. (so 80 is 1:20 compression)
- */
- FZ_FUNCTION void fz_save_pixmap_as_jpx(const FzPixmap& pixmap, const char *filename, int q);
- /** Class-aware wrapper for `::fz_save_pixmap_as_pam()`. */
- /**
- Save a pixmap as a pnm (greyscale, rgb or cmyk, with or without
- alpha).
- */
- FZ_FUNCTION void fz_save_pixmap_as_pam(const FzPixmap& pixmap, const char *filename);
- /** Class-aware wrapper for `::fz_save_pixmap_as_pbm()`. */
- /**
- Save a pixmap as a pbm. (Performing halftoning).
- */
- FZ_FUNCTION void fz_save_pixmap_as_pbm(const FzPixmap& pixmap, const char *filename);
- /** Class-aware wrapper for `::fz_save_pixmap_as_pcl()`. */
- /**
- Save an (RGB) pixmap as color PCL.
- */
- FZ_FUNCTION void fz_save_pixmap_as_pcl(const FzPixmap& pixmap, char *filename, int append, const FzPclOptions& pcl);
- /** Class-aware wrapper for `::fz_save_pixmap_as_pclm()`. */
- /**
- Save a (Greyscale or RGB) pixmap as pclm.
- */
- FZ_FUNCTION void fz_save_pixmap_as_pclm(const FzPixmap& pixmap, const char *filename, int append, const FzPclmOptions& options);
- /** Class-aware wrapper for `::fz_save_pixmap_as_pdfocr()`. */
- /**
- Save a (Greyscale or RGB) pixmap as pdfocr.
- */
- FZ_FUNCTION void fz_save_pixmap_as_pdfocr(const FzPixmap& pixmap, char *filename, int append, FzPdfocrOptions& options);
- /** Class-aware wrapper for `::fz_save_pixmap_as_pkm()`. */
- /**
- Save a CMYK pixmap as a pkm. (Performing halftoning).
- */
- FZ_FUNCTION void fz_save_pixmap_as_pkm(const FzPixmap& pixmap, const char *filename);
- /** Class-aware wrapper for `::fz_save_pixmap_as_png()`. */
- /**
- Save a (Greyscale or RGB) pixmap as a png.
- */
- FZ_FUNCTION void fz_save_pixmap_as_png(const FzPixmap& pixmap, const char *filename);
- /** Class-aware wrapper for `::fz_save_pixmap_as_pnm()`. */
- /**
- Save a pixmap as a pnm (greyscale or rgb, no alpha).
- */
- FZ_FUNCTION void fz_save_pixmap_as_pnm(const FzPixmap& pixmap, const char *filename);
- /** Class-aware wrapper for `::fz_save_pixmap_as_ps()`. */
- /**
- Save a (gray, rgb, or cmyk, no alpha) pixmap out as postscript.
- */
- FZ_FUNCTION void fz_save_pixmap_as_ps(const FzPixmap& pixmap, char *filename, int append);
- /** Class-aware wrapper for `::fz_save_pixmap_as_psd()`. */
- /**
- Save a pixmap as a PSD file.
- */
- FZ_FUNCTION void fz_save_pixmap_as_psd(const FzPixmap& pixmap, const char *filename);
- /** Class-aware wrapper for `::fz_save_pixmap_as_pwg()`. */
- /**
- Save a pixmap as a PWG.
- */
- FZ_FUNCTION void fz_save_pixmap_as_pwg(const FzPixmap& pixmap, char *filename, int append, FzPwgOptions& pwg);
- /** Class-aware wrapper for `::fz_save_xml()`. */
- /**
- As for fz_write_xml, but direct to a file.
- */
- FZ_FUNCTION void fz_save_xml(const FzXml& root, const char *path, int indented);
- /** Class-aware wrapper for `::fz_scale()`. */
- /**
- Create a scaling matrix.
-
- The returned matrix is of the form [ sx 0 0 sy 0 0 ].
-
- m: Pointer to the matrix to populate
-
- sx, sy: Scaling factors along the X- and Y-axes. A scaling
- factor of 1.0 will not cause any scaling along the relevant
- axis.
-
- Returns m.
- */
- FZ_FUNCTION FzMatrix fz_scale(float sx, float sy);
- /** Class-aware wrapper for `::fz_scale_pixmap()`. */
- FZ_FUNCTION FzPixmap fz_scale_pixmap(const FzPixmap& src, float x, float y, float w, float h, FzIrect& clip);
- /** Class-aware wrapper for `::fz_search_chapter_page_number()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_search_chapter_page_number(::fz_document *doc, int chapter, int page, const char *needle, ::fz_quad *hit_bbox, int hit_max)` => `(int, int hit_mark)`
- */
- FZ_FUNCTION int fz_search_chapter_page_number(const FzDocument& doc, int chapter, int page, const char *needle, int *hit_mark, FzQuad& hit_bbox, int hit_max);
- /** Class-aware wrapper for `::fz_search_chapter_page_number_cb()`. */
- FZ_FUNCTION int fz_search_chapter_page_number_cb(const FzDocument& doc, int chapter, int page, const char *needle, ::fz_search_callback_fn *cb, void *opaque);
- /** Class-aware wrapper for `::fz_search_display_list()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_search_display_list(::fz_display_list *list, const char *needle, ::fz_quad *hit_bbox, int hit_max)` => `(int, int hit_mark)`
- */
- FZ_FUNCTION int fz_search_display_list(const FzDisplayList& list, const char *needle, int *hit_mark, FzQuad& hit_bbox, int hit_max);
- /** Class-aware wrapper for `::fz_search_display_list_cb()`. */
- FZ_FUNCTION int fz_search_display_list_cb(const FzDisplayList& list, const char *needle, ::fz_search_callback_fn *cb, void *opaque);
- /** Class-aware wrapper for `::fz_search_page()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_search_page(::fz_page *page, const char *needle, ::fz_quad *hit_bbox, int hit_max)` => `(int, int hit_mark)`
- */
- /**
- Search for the 'needle' text on the page.
- Record the hits in the hit_bbox array and return the number of
- hits. Will stop looking once it has filled hit_max rectangles.
- */
- FZ_FUNCTION int fz_search_page(const FzPage& page, const char *needle, int *hit_mark, FzQuad& hit_bbox, int hit_max);
- /** Class-aware wrapper for `::fz_search_page2()`. */
- /**
- C++ alternative to fz_search_page() that returns information in a std::vector.
- */
- FZ_FUNCTION std::vector<fz_search_page2_hit> fz_search_page2(const FzDocument& doc, int number, const char *needle, int hit_max);
- /** Class-aware wrapper for `::fz_search_page_cb()`. */
- /**
- Search for the 'needle' text on the page.
- */
- FZ_FUNCTION int fz_search_page_cb(const FzPage& page, const char *needle, ::fz_search_callback_fn *cb, void *opaque);
- /** Class-aware wrapper for `::fz_search_page_number()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_search_page_number(::fz_document *doc, int number, const char *needle, ::fz_quad *hit_bbox, int hit_max)` => `(int, int hit_mark)`
- */
- FZ_FUNCTION int fz_search_page_number(const FzDocument& doc, int number, const char *needle, int *hit_mark, FzQuad& hit_bbox, int hit_max);
- /** Class-aware wrapper for `::fz_search_page_number_cb()`. */
- FZ_FUNCTION int fz_search_page_number_cb(const FzDocument& doc, int number, const char *needle, ::fz_search_callback_fn *cb, void *opaque);
- /** Class-aware wrapper for `::fz_search_stext_page()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_search_stext_page(::fz_stext_page *text, const char *needle, ::fz_quad *hit_bbox, int hit_max)` => `(int, int hit_mark)`
- */
- /**
- Search for occurrence of 'needle' in text page.
-
- Return the number of quads and store hit quads in the passed in
- array.
-
- NOTE: This is an experimental interface and subject to change
- without notice.
- */
- FZ_FUNCTION int fz_search_stext_page(const FzStextPage& text, const char *needle, int *hit_mark, FzQuad& hit_bbox, int hit_max);
- /** Class-aware wrapper for `::fz_search_stext_page_cb()`. */
- /**
- Search for occurrence of 'needle' in text page.
-
- Call callback once for each hit. This callback will receive
- (potentially) multiple quads for each hit.
-
- Returns the number of hits - note that this is potentially
- different from (i.e. is not greater than) the number of quads
- as returned by the non callback API.
-
- NOTE: This is an experimental interface and subject to change
- without notice.
- */
- FZ_FUNCTION int fz_search_stext_page_cb(const FzStextPage& text, const char *needle, ::fz_search_callback_fn *cb, void *opaque);
- /** Class-aware wrapper for `::fz_seek()`. */
- /**
- Seek within a stream.
-
- stm: The stream to seek within.
-
- offset: The offset to seek to.
-
- whence: From where the offset is measured (see fseek).
- SEEK_SET - start of stream.
- SEEK_CUR - current position.
- SEEK_END - end of stream.
-
- */
- FZ_FUNCTION void fz_seek(const FzStream& stm, int64_t offset, int whence);
- /** Class-aware wrapper for `::fz_seek_output()`. */
- /**
- Seek to the specified file position.
- See fseek for arguments.
-
- Throw an error on unseekable outputs.
- */
- FZ_FUNCTION void fz_seek_output(const FzOutput& out, int64_t off, int whence);
- /** Class-aware wrapper for `::fz_segment_stext_page()`. */
- /**
- Perform segmentation analysis on an (unstructured) page to look for
- recursive subdivisions.
-
- Essentially this code attempts to split the page horizontally and/or
- vertically repeatedly into smaller and smaller "segments" (divisions).
-
- This minimises the reordering of the content, but some reordering
- may be unavoidable.
-
- Returns 0 if no changes were made to the document.
-
- This is experimental code, and may change (or be removed) in future
- versions!
- */
- FZ_FUNCTION int fz_segment_stext_page(const FzStextPage& page);
- /** Class-aware wrapper for `::fz_segment_stext_rect()`. */
- /**
- Perform segmentation analysis on a rectangle of a given
- stext page.
-
- Like fz_segment_stext_page, this attempts to split the given page
- region horizontally and/or vertically repeatedly into smaller and
- smaller "segments".
-
- This works for pages with structure too, but splitting with
- rectangles that cut across structure blocks may not behave as
- expected.
-
- This minimises the reordering of the content (as viewed from the
- perspective of a depth first traversal), but some reordering may
- be unavoidable.
-
- This function accepts smaller gaps for segmentation than the full
- page segmentation does.
-
- Returns 0 if no changes were made to the document.
-
- This is experimental code, and may change (or be removed) in future
- versions!
- */
- FZ_FUNCTION int fz_segment_stext_rect(const FzStextPage& page, const FzRect& rect);
- /** Class-aware wrapper for `::fz_separation_current_behavior()`. */
- /**
- Test for the current behavior of a separation.
- */
- FZ_FUNCTION ::fz_separation_behavior fz_separation_current_behavior(const FzSeparations& sep, int separation);
- /** Class-aware wrapper for `::fz_separation_equivalent()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_separation_equivalent(const ::fz_separations *seps, int idx, ::fz_colorspace *dst_cs, ::fz_colorspace *prf, ::fz_color_params color_params)` => float dst_color
- */
- /**
- Get the equivalent separation color in a given colorspace.
- */
- FZ_FUNCTION void fz_separation_equivalent(const FzSeparations& seps, int idx, const FzColorspace& dst_cs, float *dst_color, const FzColorspace& prf, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_separation_name()`. */
- FZ_FUNCTION const char *fz_separation_name(const FzSeparations& sep, int separation);
- /** Class-aware wrapper for `::fz_set_aa_level()`. */
- /**
- Set the number of bits of antialiasing we should
- use (for both text and graphics).
-
- bits: The number of bits of antialiasing to use (values are
- clamped to within the 0 to 8 range).
- */
- FZ_FUNCTION void fz_set_aa_level(int bits);
- /** Class-aware wrapper for `::fz_set_compressed_image_buffer()`. */
- FZ_FUNCTION void fz_set_compressed_image_buffer(const FzCompressedImage& cimg, const FzCompressedBuffer& buf);
- /** Class-aware wrapper for `::fz_set_default_cmyk()`. */
- FZ_FUNCTION void fz_set_default_cmyk(const FzDefaultColorspaces& default_cs, const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_set_default_colorspaces()`. */
- FZ_FUNCTION void fz_set_default_colorspaces(const FzDevice& dev, const FzDefaultColorspaces& default_cs);
- /** Class-aware wrapper for `::fz_set_default_gray()`. */
- /**
- Set new defaults within the default colorspace structure.
-
- New references are taken to the new default, and references to
- the old defaults dropped.
-
- Never throws exceptions.
- */
- FZ_FUNCTION void fz_set_default_gray(const FzDefaultColorspaces& default_cs, const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_set_default_output_intent()`. */
- FZ_FUNCTION void fz_set_default_output_intent(const FzDefaultColorspaces& default_cs, const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_set_default_rgb()`. */
- FZ_FUNCTION void fz_set_default_rgb(const FzDefaultColorspaces& default_cs, const FzColorspace& cs);
- /** Class-aware wrapper for `::fz_set_error_callback()`. */
- /**
- Set the error callback. This will be called as part of the
- exception handling.
-
- The callback must not throw exceptions!
- */
- FZ_FUNCTION void fz_set_error_callback(::fz_error_cb *error_cb, void *user);
- /** Class-aware wrapper for `::fz_set_font_bbox()`. */
- /**
- Set the font bbox.
-
- font: The font to set the bbox for.
-
- xmin, ymin, xmax, ymax: The bounding box.
- */
- FZ_FUNCTION void fz_set_font_bbox(const FzFont& font, float xmin, float ymin, float xmax, float ymax);
- /** Class-aware wrapper for `::fz_set_font_embedding()`. */
- /**
- Control whether a given font should be embedded or not when writing.
- */
- FZ_FUNCTION void fz_set_font_embedding(const FzFont& font, int embed);
- /** Class-aware wrapper for `::fz_set_graphics_aa_level()`. */
- /**
- Set the number of bits of antialiasing we
- should use for graphics.
-
- bits: The number of bits of antialiasing to use (values are
- clamped to within the 0 to 8 range).
- */
- FZ_FUNCTION void fz_set_graphics_aa_level(int bits);
- /** Class-aware wrapper for `::fz_set_graphics_min_line_width()`. */
- /**
- Set the minimum line width to be
- used for stroked lines.
-
- min_line_width: The minimum line width to use (in pixels).
- */
- FZ_FUNCTION void fz_set_graphics_min_line_width(float min_line_width);
- /** Class-aware wrapper for `::fz_set_link_rect()`. */
- FZ_FUNCTION void fz_set_link_rect(const FzLink& link, const FzRect& rect);
- /** Class-aware wrapper for `::fz_set_link_uri()`. */
- FZ_FUNCTION void fz_set_link_uri(const FzLink& link, const char *uri);
- /** Class-aware wrapper for `::fz_set_metadata()`. */
- FZ_FUNCTION void fz_set_metadata(const FzDocument& doc, const char *key, const char *value);
- /** Class-aware wrapper for `::fz_set_pixmap_image_tile()`. */
- FZ_FUNCTION void fz_set_pixmap_image_tile(const FzPixmapImage& cimg, const FzPixmap& pix);
- /** Class-aware wrapper for `::fz_set_pixmap_resolution()`. */
- /**
- Set the pixels per inch resolution of the pixmap.
- */
- FZ_FUNCTION void fz_set_pixmap_resolution(const FzPixmap& pix, int xres, int yres);
- /** Class-aware wrapper for `::fz_set_separation_behavior()`. */
- /**
- Control the rendering of a given separation.
- */
- FZ_FUNCTION void fz_set_separation_behavior(const FzSeparations& sep, int separation, ::fz_separation_behavior behavior);
- /** Class-aware wrapper for `::fz_set_stddbg()`. */
- /**
- Set the output stream to be used for fz_stddbg. Set to NULL to
- reset to default (stderr).
- */
- FZ_FUNCTION void fz_set_stddbg(const FzOutput& out);
- /** Class-aware wrapper for `::fz_set_text_aa_level()`. */
- /**
- Set the number of bits of antialiasing we
- should use for text.
-
- bits: The number of bits of antialiasing to use (values are
- clamped to within the 0 to 8 range).
- */
- FZ_FUNCTION void fz_set_text_aa_level(int bits);
- /** Class-aware wrapper for `::fz_set_use_document_css()`. */
- /**
- Toggle whether to respect document styles in HTML and EPUB.
- */
- FZ_FUNCTION void fz_set_use_document_css(int use);
- /** Class-aware wrapper for `::fz_set_user_context()`. */
- /**
- Set the user field in the context.
-
- NULL initially, this field can be set to any opaque value
- required by the user. It is copied on clones.
- */
- FZ_FUNCTION void fz_set_user_context(void *user);
- /** Class-aware wrapper for `::fz_set_user_css()`. */
- /**
- Set the user stylesheet source text for use with HTML and EPUB.
- */
- FZ_FUNCTION void fz_set_user_css(const char *text);
- /** Class-aware wrapper for `::fz_set_warning_callback()`. */
- /**
- Set the warning callback. This will be called as part of the
- exception handling.
-
- The callback must not throw exceptions!
- */
- FZ_FUNCTION void fz_set_warning_callback(::fz_warning_cb *warning_cb, void *user);
- /** Class-aware wrapper for `::fz_sha256_final()`. */
- /**
- MD5 finalization. Ends an MD5 message-digest operation, writing
- the message digest and zeroizing the context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_sha256_final(const FzSha256& state, unsigned char digest[32]);
- /** Class-aware wrapper for `::fz_sha256_init()`. */
- /**
- SHA256 initialization. Begins an SHA256 operation, initialising
- the supplied context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_sha256_init(const FzSha256& state);
- /** Class-aware wrapper for `::fz_sha256_update()`. */
- /**
- SHA256 block update operation. Continues an SHA256 message-
- digest operation, processing another message block, and updating
- the context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_sha256_update(const FzSha256& state, const unsigned char *input, size_t inlen);
- /** Class-aware wrapper for `::fz_sha384_final()`. */
- /**
- SHA384 finalization. Ends an SHA384 message-digest operation,
- writing the message digest and zeroizing the context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_sha384_final(const FzSha512& state, unsigned char digest[64]);
- /** Class-aware wrapper for `::fz_sha384_init()`. */
- /**
- SHA384 initialization. Begins an SHA384 operation, initialising
- the supplied context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_sha384_init(const FzSha512& state);
- /** Class-aware wrapper for `::fz_sha384_update()`. */
- /**
- SHA384 block update operation. Continues an SHA384 message-
- digest operation, processing another message block, and updating
- the context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_sha384_update(const FzSha512& state, const unsigned char *input, size_t inlen);
- /** Class-aware wrapper for `::fz_sha512_final()`. */
- /**
- SHA512 finalization. Ends an SHA512 message-digest operation,
- writing the message digest and zeroizing the context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_sha512_final(const FzSha512& state, unsigned char digest[64]);
- /** Class-aware wrapper for `::fz_sha512_init()`. */
- /**
- SHA512 initialization. Begins an SHA512 operation, initialising
- the supplied context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_sha512_init(const FzSha512& state);
- /** Class-aware wrapper for `::fz_sha512_update()`. */
- /**
- SHA512 block update operation. Continues an SHA512 message-
- digest operation, processing another message block, and updating
- the context.
-
- Never throws an exception.
- */
- FZ_FUNCTION void fz_sha512_update(const FzSha512& state, const unsigned char *input, size_t inlen);
- /** Class-aware wrapper for `::fz_shear()`. */
- /**
- Create a shearing matrix.
-
- The returned matrix is of the form [ 1 sy sx 1 0 0 ].
-
- m: pointer to place to store returned matrix
-
- sx, sy: Shearing factors. A shearing factor of 0.0 will not
- cause any shearing along the relevant axis.
-
- Returns m.
- */
- FZ_FUNCTION FzMatrix fz_shear(float sx, float sy);
- /** Class-aware wrapper for `::fz_show_glyph()`. */
- /**
- Add a glyph/unicode value to a text object.
-
- text: Text object to add to.
-
- font: The font the glyph should be added in.
-
- trm: The transform to use for the glyph.
-
- glyph: The glyph id to add.
-
- unicode: The unicode character for the glyph.
-
- cid: The CJK CID value or raw character code.
-
- wmode: 1 for vertical mode, 0 for horizontal.
-
- bidi_level: The bidirectional level for this glyph.
-
- markup_dir: The direction of the text as specified in the
- markup.
-
- language: The language in use (if known, 0 otherwise)
- (e.g. FZ_LANG_zh_Hans).
-
- Throws exception on failure to allocate.
- */
- FZ_FUNCTION void fz_show_glyph(const FzText& text, const FzFont& font, const FzMatrix& trm, int glyph, int unicode, int wmode, int bidi_level, ::fz_bidi_direction markup_dir, ::fz_text_language language);
- /** Class-aware wrapper for `::fz_show_glyph_aux()`. */
- FZ_FUNCTION void fz_show_glyph_aux(const FzText& text, const FzFont& font, const FzMatrix& trm, float adv, int glyph, int unicode, int cid, int wmode, int bidi_level, ::fz_bidi_direction markup_dir, ::fz_text_language lang);
- /** Class-aware wrapper for `::fz_show_string()`. */
- /**
- Add a UTF8 string to a text object.
-
- text: Text object to add to.
-
- font: The font the string should be added in.
-
- trm: The transform to use.
-
- s: The utf-8 string to add.
-
- wmode: 1 for vertical mode, 0 for horizontal.
-
- bidi_level: The bidirectional level for this glyph.
-
- markup_dir: The direction of the text as specified in the markup.
-
- language: The language in use (if known, 0 otherwise)
- (e.g. FZ_LANG_zh_Hans).
-
- Returns the transform updated with the advance width of the
- string.
- */
- FZ_FUNCTION FzMatrix fz_show_string(const FzText& text, const FzFont& font, const FzMatrix& trm, const char *s, int wmode, int bidi_level, ::fz_bidi_direction markup_dir, ::fz_text_language language);
- /** Class-aware wrapper for `::fz_shrink_store()`. */
- /**
- Evict items from the store until the total size of
- the objects in the store is reduced to a given percentage of its
- current size.
-
- percent: %age of current size to reduce the store to.
-
- Returns non zero if we managed to free enough memory, zero
- otherwise.
- */
- FZ_FUNCTION int fz_shrink_store(unsigned int percent);
- /** Class-aware wrapper for `::fz_skip()`. */
- /**
- Read from a stream discarding data.
-
- stm: The stream to read from.
-
- len: The number of bytes to read.
-
- Returns the number of bytes read. May throw exceptions.
- */
- FZ_FUNCTION size_t fz_skip(const FzStream& stm, size_t len);
- /** Class-aware wrapper for `::fz_skip_space()`. */
- /**
- Skip over whitespace (bytes <= 32) in a stream.
- */
- FZ_FUNCTION void fz_skip_space(const FzStream& stm);
- /** Class-aware wrapper for `::fz_skip_string()`. */
- /**
- Skip over a given string in a stream. Return 0 if successfully
- skipped, non-zero otherwise. As many characters will be skipped
- over as matched in the string.
- */
- FZ_FUNCTION int fz_skip_string(const FzStream& stm, const char *str);
- /** Class-aware wrapper for `::fz_slice_buffer()`. */
- /**
- Create a new buffer with a (subset of) the data from the buffer.
-
- start: if >= 0, offset from start of buffer, if < 0 offset from end of buffer.
-
- end: if >= 0, offset from start of buffer, if < 0 offset from end of buffer.
-
- */
- FZ_FUNCTION FzBuffer fz_slice_buffer(const FzBuffer& buf, int64_t start, int64_t end);
- /** Class-aware wrapper for `::fz_snap_selection()`. */
- FZ_FUNCTION FzQuad fz_snap_selection(const FzStextPage& page, FzPoint& ap, FzPoint& bp, int mode);
- /** Class-aware wrapper for `::fz_start_throw_on_repair()`. */
- FZ_FUNCTION void fz_start_throw_on_repair();
- /** Class-aware wrapper for `::fz_stat_ctime()`. */
- FZ_FUNCTION int64_t fz_stat_ctime(const char *path);
- /** Class-aware wrapper for `::fz_stat_mtime()`. */
- FZ_FUNCTION int64_t fz_stat_mtime(const char *path);
- /* Class-aware wrapper for `fz_stddbg()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /* Class-aware wrapper for `fz_stderr()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /* Class-aware wrapper for `fz_stdout()`
- is not available because returned wrapper class for `fz_output`
- is non-copyable. */
- /* Class-aware wrapper for `fz_stext_page_block_iterator_begin()`
- is not available because returned wrapper class for `fz_stext_page_block_iterator`
- is non-copyable. */
- /* Class-aware wrapper for `fz_stext_page_block_iterator_down()`
- is not available because returned wrapper class for `fz_stext_page_block_iterator`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_stext_page_block_iterator_eod()`. */
- FZ_FUNCTION int fz_stext_page_block_iterator_eod(const FzStextPageBlockIterator& pos);
- /** Class-aware wrapper for `::fz_stext_page_block_iterator_eod_dfs()`. */
- FZ_FUNCTION int fz_stext_page_block_iterator_eod_dfs(const FzStextPageBlockIterator& pos);
- /* Class-aware wrapper for `fz_stext_page_block_iterator_next()`
- is not available because returned wrapper class for `fz_stext_page_block_iterator`
- is non-copyable. */
- /* Class-aware wrapper for `fz_stext_page_block_iterator_next_dfs()`
- is not available because returned wrapper class for `fz_stext_page_block_iterator`
- is non-copyable. */
- /* Class-aware wrapper for `fz_stext_page_block_iterator_up()`
- is not available because returned wrapper class for `fz_stext_page_block_iterator`
- is non-copyable. */
- /* Class-aware wrapper for `fz_stext_page_details_for_block()`
- is not available because returned wrapper class for `fz_stext_page_details`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_stext_remove_page_fill()`. */
- FZ_FUNCTION int fz_stext_remove_page_fill(const FzStextPage& page);
- /** Class-aware wrapper for `::fz_store_item()`. */
- /**
- Add an item to the store.
-
- Add an item into the store, returning NULL for success. If an
- item with the same key is found in the store, then our item will
- not be inserted, and the function will return a pointer to that
- value instead. This function takes its own reference to val, as
- required (i.e. the caller maintains ownership of its own
- reference).
-
- key: The key used to index the item.
-
- val: The value to store.
-
- itemsize: The size in bytes of the value (as counted towards the
- store size).
-
- type: Functions used to manipulate the key.
- */
- FZ_FUNCTION void *fz_store_item(void *key, void *val, size_t itemsize, const FzStoreType& type);
- /** Class-aware wrapper for `::fz_store_scavenge()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_store_scavenge(size_t size)` => `(int, int phase)`
- */
- /**
- Internal function used as part of the scavenging
- allocator; when we fail to allocate memory, before returning a
- failure to the caller, we try to scavenge space within the store
- by evicting at least 'size' bytes. The allocator then retries.
-
- size: The number of bytes we are trying to have free.
-
- phase: What phase of the scavenge we are in. Updated on exit.
-
- Returns non zero if we managed to free any memory.
- */
- FZ_FUNCTION int fz_store_scavenge(size_t size, int *phase);
- /** Class-aware wrapper for `::fz_store_scavenge_external()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_store_scavenge_external(size_t size)` => `(int, int phase)`
- */
- /**
- External function for callers to use
- to scavenge while trying allocations.
-
- size: The number of bytes we are trying to have free.
-
- phase: What phase of the scavenge we are in. Updated on exit.
-
- Returns non zero if we managed to free any memory.
- */
- FZ_FUNCTION int fz_store_scavenge_external(size_t size, int *phase);
- /** Class-aware wrapper for `::fz_story_document()`. */
- FZ_FUNCTION FzXml fz_story_document(const FzStory& story);
- /** Class-aware wrapper for `::fz_story_positions()`. */
- FZ_FUNCTION void fz_story_positions(const FzStory& story, ::fz_story_position_callback *cb, void *arg);
- /** Class-aware wrapper for `::fz_story_warnings()`. */
- FZ_FUNCTION const char *fz_story_warnings(const FzStory& story);
- /** Class-aware wrapper for `::fz_strcasecmp()`. */
- /**
- Case insensitive (UTF8) string comparison.
- */
- FZ_FUNCTION int fz_strcasecmp(const char *a, const char *b);
- /** Class-aware wrapper for `::fz_strdup()`. */
- /**
- Portable strdup implementation, using fz allocators.
- */
- FZ_FUNCTION char *fz_strdup(const char *s);
- /** Class-aware wrapper for `::fz_stream_filename()`. */
- /**
- Return the filename (UTF-8 encoded) from which a stream was opened.
-
- Returns NULL if the filename is not available (or the stream was
- opened from a source other than a file).
- */
- FZ_FUNCTION const char *fz_stream_filename(const FzStream& stm);
- /** Class-aware wrapper for `::fz_stream_from_output()`. */
- /**
- Obtain the fz_output in the form of a fz_stream.
-
- This allows data to be read back from some forms of fz_output
- object. When finished reading, the fz_stream should be released
- by calling fz_drop_stream. Until the fz_stream is dropped, no
- further operations should be performed on the fz_output object.
- */
- FZ_FUNCTION FzStream fz_stream_from_output(const FzOutput& arg_0);
- /** Class-aware wrapper for `::fz_string_from_barcode_type()`. */
- /**
- Return barcode string matching one of the above barcode types.
- All lowercase, e.g. "none", "aztec" etc.
- */
- FZ_FUNCTION const char *fz_string_from_barcode_type(::fz_barcode_type type);
- /** Class-aware wrapper for `::fz_string_from_box_type()`. */
- FZ_FUNCTION const char *fz_string_from_box_type(::fz_box_type box);
- /** Class-aware wrapper for `::fz_string_from_buffer()`. */
- /**
- Ensure that a buffer's data ends in a
- 0 byte, and return a pointer to it.
- */
- FZ_FUNCTION const char *fz_string_from_buffer(const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_string_from_linecap()`. */
- FZ_FUNCTION const char *fz_string_from_linecap(::fz_linecap cap);
- /** Class-aware wrapper for `::fz_string_from_linejoin()`. */
- FZ_FUNCTION const char *fz_string_from_linejoin(::fz_linejoin join);
- /** Class-aware wrapper for `::fz_string_from_text_language()`. */
- /**
- Recover ISO 639 (639-{1,2,3,5}) language specification
- strings losslessly from a 15 bit fz_text_language code.
-
- No validation is carried out. See note above.
- */
- FZ_FUNCTION char *fz_string_from_text_language(char str[8], ::fz_text_language lang);
- /** Class-aware wrapper for `::fz_string_from_text_language2()`. */
- /**
- C++ alternative to fz_string_from_text_language() that returns information in a std::string.
- */
- FZ_FUNCTION std::string fz_string_from_text_language2(::fz_text_language lang);
- /** Class-aware wrapper for `::fz_strlcat()`. */
- /**
- Concatenate 2 strings, with a maximum length.
-
- dst: pointer to first string in a buffer of n bytes.
-
- src: pointer to string to concatenate.
-
- n: Size (in bytes) of buffer that dst is in.
-
- Returns the real length that a concatenated dst + src would have
- been (not including terminator).
- */
- FZ_FUNCTION size_t fz_strlcat(char *dst, const char *src, size_t n);
- /** Class-aware wrapper for `::fz_strlcpy()`. */
- /**
- Copy at most n-1 chars of a string into a destination
- buffer with null termination, returning the real length of the
- initial string (excluding terminator).
-
- dst: Destination buffer, at least n bytes long.
-
- src: C string (non-NULL).
-
- n: Size of dst buffer in bytes.
-
- Returns the length (excluding terminator) of src.
- */
- FZ_FUNCTION size_t fz_strlcpy(char *dst, const char *src, size_t n);
- /** Class-aware wrapper for `::fz_strncasecmp()`. */
- /**
- Case insensitive (UTF8) string comparison.
-
- n = maximum number of bytes to read from either a or b.
- */
- FZ_FUNCTION int fz_strncasecmp(const char *a, const char *b, size_t n);
- /** Class-aware wrapper for `::fz_strnlen()`. */
- /**
- Return strlen(s), if that is less than maxlen, or maxlen if
- there is no null byte ('\0') among the first maxlen bytes.
- */
- FZ_FUNCTION size_t fz_strnlen(const char *s, size_t maxlen);
- /** Class-aware wrapper for `::fz_stroke_path()`. */
- FZ_FUNCTION void fz_stroke_path(const FzDevice& dev, const FzPath& path, const FzStrokeState& stroke, const FzMatrix& ctm, const FzColorspace& colorspace, const float *color, float alpha, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_stroke_state_eq()`. */
- FZ_FUNCTION int fz_stroke_state_eq(const FzStrokeState& a, const FzStrokeState& b);
- /** Class-aware wrapper for `::fz_stroke_text()`. */
- FZ_FUNCTION void fz_stroke_text(const FzDevice& dev, const FzText& text, const FzStrokeState& stroke, const FzMatrix& ctm, const FzColorspace& colorspace, const float *color, float alpha, const FzColorParams& color_params);
- /** Class-aware wrapper for `::fz_strsep()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_strsep(const char *delim)` => `(char *, char *stringp)`
- */
- /**
- Given a pointer to a C string (or a pointer to NULL) break
- it at the first occurrence of a delimiter char (from a given
- set).
-
- stringp: Pointer to a C string pointer (or NULL). Updated on
- exit to point to the first char of the string after the
- delimiter that was found. The string pointed to by stringp will
- be corrupted by this call (as the found delimiter will be
- overwritten by 0).
-
- delim: A C string of acceptable delimiter characters.
-
- Returns a pointer to a C string containing the chars of stringp
- up to the first delimiter char (or the end of the string), or
- NULL.
- */
- FZ_FUNCTION char *fz_strsep(char **stringp, const char *delim);
- /** Class-aware wrapper for `::fz_strstr()`. */
- /**
- Safe strstr function.
-
- haystack: Where to look (may be NULL).
-
- needled: What to look for.
-
- Returns NULL if unmatched, or pointer to start of match.
- */
- FZ_FUNCTION const char *fz_strstr(const char *haystack, const char *needle);
- /** Class-aware wrapper for `::fz_strstrcase()`. */
- /**
- Safe case-insensitive strstr function. (Accepts UTF-8).
-
- haystack: Where to look (may be NULL).
-
- needled: What to look for.
-
- Returns NULL if unmatched, or pointer to start of match.
- */
- FZ_FUNCTION const char *fz_strstrcase(const char *haystack, const char *needle);
- /** Class-aware wrapper for `::fz_strtof()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_strtof(const char *s)` => `(float, char *es)`
- */
- /**
- Locale-independent decimal to binary conversion. On overflow
- return (-)INFINITY and set errno to ERANGE. On underflow return
- 0 and set errno to ERANGE. Special inputs (case insensitive):
- "NAN", "INF" or "INFINITY".
- */
- FZ_FUNCTION float fz_strtof(const char *s, char **es);
- /** Class-aware wrapper for `::fz_structure_from_string()`. */
- FZ_FUNCTION ::fz_structure fz_structure_from_string(const char *str);
- /** Class-aware wrapper for `::fz_structure_to_string()`. */
- FZ_FUNCTION const char *fz_structure_to_string(::fz_structure type);
- /** Class-aware wrapper for `::fz_strverscmp()`. */
- /**
- portable strverscmp(3) function
- */
- FZ_FUNCTION int fz_strverscmp(const char *s1, const char *s2);
- /** Class-aware wrapper for `::fz_subpixel_adjust()`. */
- /**
- Perform subpixel quantisation and adjustment on a glyph matrix.
-
- ctm: On entry, the desired 'ideal' transformation for a glyph.
- On exit, adjusted to a (very similar) transformation quantised
- for subpixel caching.
-
- subpix_ctm: Initialised by the routine to the transform that
- should be used to render the glyph.
-
- qe, qf: which subpixel position we quantised to.
-
- Returns: the size of the glyph.
-
- Note: This is currently only exposed for use in our app. It
- should be considered "at risk" of removal from the API.
- */
- FZ_FUNCTION float fz_subpixel_adjust(FzMatrix& ctm, FzMatrix& subpix_ctm, unsigned char *qe, unsigned char *qf);
- /** Class-aware wrapper for `::fz_subsample_pixmap()`. */
- FZ_FUNCTION void fz_subsample_pixmap(const FzPixmap& tile, int factor);
- /** Class-aware wrapper for `::fz_subset_cff_for_gids()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_subset_cff_for_gids(::fz_buffer *orig, int num_gids, int symbolic, int cidfont)` => `(fz_buffer *, int gids)`
- */
- FZ_FUNCTION FzBuffer fz_subset_cff_for_gids(const FzBuffer& orig, int *gids, int num_gids, int symbolic, int cidfont);
- /** Class-aware wrapper for `::fz_subset_ttf_for_gids()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_subset_ttf_for_gids(::fz_buffer *orig, int num_gids, int symbolic, int cidfont)` => `(fz_buffer *, int gids)`
- */
- FZ_FUNCTION FzBuffer fz_subset_ttf_for_gids(const FzBuffer& orig, int *gids, int num_gids, int symbolic, int cidfont);
- /** Class-aware wrapper for `::fz_sync_bits()`. */
- /**
- Called after reading bits to tell the stream
- that we are about to return to reading bytewise. Resyncs
- the stream to whole byte boundaries.
- */
- FZ_FUNCTION void fz_sync_bits(const FzStream& stm);
- /** Class-aware wrapper for `::fz_table_hunt()`. */
- /**
- Hunt for possible tables on a page, and update the stext with
- information.
- */
- FZ_FUNCTION void fz_table_hunt(const FzStextPage& page);
- /** Class-aware wrapper for `::fz_table_hunt_within_bounds()`. */
- /**
- Hunt for possible tables within a specific rect on a page, and
- update the stext with information.
- */
- FZ_FUNCTION void fz_table_hunt_within_bounds(const FzStextPage& page, const FzRect& bounds);
- /** Class-aware wrapper for `::fz_tell()`. */
- /**
- return the current reading position within a stream
- */
- FZ_FUNCTION int64_t fz_tell(const FzStream& stm);
- /** Class-aware wrapper for `::fz_tell_output()`. */
- /**
- Return the current file position.
-
- Throw an error on untellable outputs.
- */
- FZ_FUNCTION int64_t fz_tell_output(const FzOutput& out);
- /** Class-aware wrapper for `::fz_terminate_buffer()`. */
- /**
- Zero-terminate buffer in order to use as a C string.
-
- This byte is invisible and does not affect the length of the
- buffer as returned by fz_buffer_storage. The zero byte is
- written *after* the data, and subsequent writes will overwrite
- the terminating byte.
-
- Subsequent changes to the size of the buffer (such as by
- fz_buffer_trim, fz_buffer_grow, fz_resize_buffer, etc) may
- invalidate this.
- */
- FZ_FUNCTION void fz_terminate_buffer(const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_text_aa_level()`. */
- /**
- Get the number of bits of antialiasing we are
- using for text. Between 0 and 8.
- */
- FZ_FUNCTION int fz_text_aa_level();
- /** Class-aware wrapper for `::fz_text_language_from_string()`. */
- /**
- Convert ISO 639 (639-{1,2,3,5}) language specification
- strings losslessly to a 15 bit fz_text_language code.
-
- No validation is carried out. Obviously invalid (out
- of spec) codes will be mapped to FZ_LANG_UNSET, but
- well-formed (but undefined) codes will be blithely
- accepted.
- */
- FZ_FUNCTION ::fz_text_language fz_text_language_from_string(const char *str);
- /** Class-aware wrapper for `::fz_tint_pixmap()`. */
- /**
- Tint all the pixels in an RGB, BGR, or Gray pixmap.
-
- black: Map black to this hexadecimal RGB color.
-
- white: Map white to this hexadecimal RGB color.
- */
- FZ_FUNCTION void fz_tint_pixmap(const FzPixmap& pix, int black, int white);
- /** Class-aware wrapper for `::fz_tolower()`. */
- /**
- Unicode aware tolower and toupper functions.
- */
- FZ_FUNCTION int fz_tolower(int c);
- /** Class-aware wrapper for `::fz_toupper()`. */
- FZ_FUNCTION int fz_toupper(int c);
- /** Class-aware wrapper for `::fz_transform_page()`. */
- /**
- Create transform matrix to draw page
- at a given resolution and rotation. Adjusts the scaling
- factors so that the page covers whole number of
- pixels and adjust the page origin to be at 0,0.
- */
- FZ_FUNCTION FzMatrix fz_transform_page(const FzRect& mediabox, float resolution, float rotate);
- /** Class-aware wrapper for `::fz_transform_path()`. */
- /**
- Transform a path by a given
- matrix.
-
- path: The path to modify (must not be a packed path).
-
- transform: The transform to apply.
-
- Throws exceptions if the path is packed, or on failure
- to allocate.
- */
- FZ_FUNCTION void fz_transform_path(const FzPath& path, const FzMatrix& transform);
- /** Class-aware wrapper for `::fz_transform_point()`. */
- /**
- Apply a transformation to a point.
-
- transform: Transformation matrix to apply. See fz_concat,
- fz_scale, fz_rotate and fz_translate for how to create a
- matrix.
-
- point: Pointer to point to update.
-
- Returns transform (unchanged).
- */
- FZ_FUNCTION FzPoint fz_transform_point(const FzPoint& point, const FzMatrix& m);
- /** Class-aware wrapper for `::fz_transform_point_xy()`. */
- FZ_FUNCTION FzPoint fz_transform_point_xy(float x, float y, const FzMatrix& m);
- /** Class-aware wrapper for `::fz_transform_quad()`. */
- /**
- Transform a quad by a matrix.
- */
- FZ_FUNCTION FzQuad fz_transform_quad(const FzQuad& q, const FzMatrix& m);
- /** Class-aware wrapper for `::fz_transform_rect()`. */
- /**
- Apply a transform to a rectangle.
-
- After the four corner points of the axis-aligned rectangle
- have been transformed it may not longer be axis-aligned. So a
- new axis-aligned rectangle is created covering at least the
- area of the transformed rectangle.
-
- transform: Transformation matrix to apply. See fz_concat,
- fz_scale and fz_rotate for how to create a matrix.
-
- rect: Rectangle to be transformed. The two special cases
- fz_empty_rect and fz_infinite_rect, may be used but are
- returned unchanged as expected.
- */
- FZ_FUNCTION FzRect fz_transform_rect(const FzRect& rect, const FzMatrix& m);
- /** Class-aware wrapper for `::fz_transform_vector()`. */
- /**
- Apply a transformation to a vector.
-
- transform: Transformation matrix to apply. See fz_concat,
- fz_scale and fz_rotate for how to create a matrix. Any
- translation will be ignored.
-
- vector: Pointer to vector to update.
- */
- FZ_FUNCTION FzPoint fz_transform_vector(const FzPoint& vector, const FzMatrix& m);
- /** Class-aware wrapper for `::fz_translate()`. */
- /**
- Create a translation matrix.
-
- The returned matrix is of the form [ 1 0 0 1 tx ty ].
-
- m: A place to store the created matrix.
-
- tx, ty: Translation distances along the X- and Y-axes. A
- translation of 0 will not cause any translation along the
- relevant axis.
-
- Returns m.
- */
- FZ_FUNCTION FzMatrix fz_translate(float tx, float ty);
- /** Class-aware wrapper for `::fz_translate_irect()`. */
- FZ_FUNCTION FzIrect fz_translate_irect(const FzIrect& a, int xoff, int yoff);
- /** Class-aware wrapper for `::fz_translate_rect()`. */
- /**
- Translate bounding box.
-
- Translate a bbox by a given x and y offset. Allows for overflow.
- */
- FZ_FUNCTION FzRect fz_translate_rect(const FzRect& a, float xoff, float yoff);
- /** Class-aware wrapper for `::fz_tree_archive_add_buffer()`. */
- /**
- Add a named buffer to an existing tree archive.
-
- The tree will take a new reference to the buffer. Ownership
- is not transferred.
- */
- FZ_FUNCTION void fz_tree_archive_add_buffer(const FzArchive& arch_, const char *name, const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_tree_archive_add_data()`. */
- /**
- Add a named block of data to an existing tree archive.
-
- The data will be copied into a buffer, and so the caller
- may free it as soon as this returns.
- */
- FZ_FUNCTION void fz_tree_archive_add_data(const FzArchive& arch_, const char *name, const void *data, size_t size);
- /* Class-aware wrapper for `fz_tree_insert()`
- is not available because returned wrapper class for `fz_tree`
- is non-copyable. */
- /** Class-aware wrapper for `::fz_tree_lookup()`. */
- /**
- Look for the value of a node in the tree with the given key.
-
- Simple pointer equivalence is used for key.
-
- Returns NULL for no match.
- */
- FZ_FUNCTION void *fz_tree_lookup(const FzTree& node, const char *key);
- /** Class-aware wrapper for `::fz_trim_buffer()`. */
- /**
- Trim wasted capacity from a buffer by resizing internal memory.
- */
- FZ_FUNCTION void fz_trim_buffer(const FzBuffer& buf);
- /** Class-aware wrapper for `::fz_trim_path()`. */
- /**
- Minimise the internal storage used by a path.
-
- As paths are constructed, the internal buffers
- grow. To avoid repeated reallocations they
- grow with some spare space. Once a path has
- been fully constructed, this call allows the
- excess space to be trimmed.
- */
- FZ_FUNCTION void fz_trim_path(const FzPath& path);
- /** Class-aware wrapper for `::fz_truncate_output()`. */
- /**
- Truncate the output at the current position.
-
- This allows output streams which have seeked back from the end
- of their storage to be truncated at the current point.
- */
- FZ_FUNCTION void fz_truncate_output(const FzOutput& arg_0);
- /** Class-aware wrapper for `::fz_try_invert_matrix()`. */
- /**
- Attempt to create an inverse matrix.
-
- inv: Place to store inverse matrix.
-
- src: Matrix to invert. A degenerate matrix, where the
- determinant is equal to zero, can not be inverted.
-
- Returns 1 if matrix is degenerate (singular), or 0 otherwise.
- */
- FZ_FUNCTION int fz_try_invert_matrix(FzMatrix& inv, const FzMatrix& src);
- /** Class-aware wrapper for `::fz_try_open_archive_entry()`. */
- /**
- Opens an archive entry as a stream.
-
- Returns NULL if a matching entry cannot be found, otherwise
- behaves exactly as fz_open_archive_entry.
- */
- FZ_FUNCTION FzStream fz_try_open_archive_entry(const FzArchive& arch, const char *name);
- /** Class-aware wrapper for `::fz_try_open_archive_with_stream()`. */
- /**
- Open zip or tar archive stream.
-
- Does the same as fz_open_archive_with_stream, but will not throw
- an error in the event of failing to recognise the format. Will
- still throw errors in other cases though!
- */
- FZ_FUNCTION FzArchive fz_try_open_archive_with_stream(const FzStream& file);
- /** Class-aware wrapper for `::fz_try_open_file()`. */
- /**
- Open the named file and wrap it in a stream.
-
- Does the same as fz_open_file, but in the event the file
- does not open, it will return NULL rather than throw an
- exception.
- */
- FZ_FUNCTION FzStream fz_try_open_file(const char *name);
- /** Class-aware wrapper for `::fz_try_parse_xml_archive_entry()`. */
- /**
- Try and parse the contents of an archive entry into a tree of xml nodes.
-
- preserve_white: whether to keep or delete all-whitespace nodes.
-
- Will return NULL if the archive entry can't be found. Otherwise behaves
- the same as fz_parse_xml_archive_entry. May throw exceptions.
- */
- FZ_FUNCTION FzXml fz_try_parse_xml_archive_entry(const FzArchive& dir, const char *filename, int preserve_white);
- /** Class-aware wrapper for `::fz_try_read_archive_entry()`. */
- /**
- Reads all bytes in an archive entry
- into a buffer.
-
- name: Entry name to look for, this must be an exact match to
- the entry name in the archive.
-
- Returns NULL if a matching entry cannot be found. Otherwise behaves
- the same as fz_read_archive_entry. Exceptions may be thrown.
- */
- FZ_FUNCTION FzBuffer fz_try_read_archive_entry(const FzArchive& arch, const char *name);
- /** Class-aware wrapper for `::fz_try_read_file()`. */
- /**
- Read all the contents of a file into a buffer.
-
- Returns NULL if the file does not exist, otherwise
- behaves exactly as fz_read_file.
- */
- FZ_FUNCTION FzBuffer fz_try_read_file(const char *filename);
- /** Class-aware wrapper for `::fz_tune_image_decode()`. */
- /**
- Set the tuning function to use for
- image decode.
-
- image_decode: Function to use.
-
- arg: Opaque argument to be passed to tuning function.
- */
- FZ_FUNCTION void fz_tune_image_decode(::fz_tune_image_decode_fn *image_decode, void *arg);
- /** Class-aware wrapper for `::fz_tune_image_scale()`. */
- /**
- Set the tuning function to use for
- image scaling.
-
- image_scale: Function to use.
-
- arg: Opaque argument to be passed to tuning function.
- */
- FZ_FUNCTION void fz_tune_image_scale(::fz_tune_image_scale_fn *image_scale, void *arg);
- /** Class-aware wrapper for `::fz_unicode_from_glyph_name()`. */
- FZ_FUNCTION int fz_unicode_from_glyph_name(const char *name);
- /** Class-aware wrapper for `::fz_unicode_from_glyph_name_strict()`. */
- FZ_FUNCTION int fz_unicode_from_glyph_name_strict(const char *name);
- /** Class-aware wrapper for `::fz_union_rect()`. */
- /**
- Compute union of two rectangles.
-
- Given two rectangles, update the first to be the smallest
- axis-aligned rectangle that encompasses both given rectangles.
- If either rectangle is infinite then the union is also infinite.
- If either rectangle is empty then the union is simply the
- non-empty rectangle. Should both rectangles be empty, then the
- union is also empty.
- */
- FZ_FUNCTION FzRect fz_union_rect(const FzRect& a, const FzRect& b);
- /** Class-aware wrapper for `::fz_unlock()`. */
- /**
- Unlock one of the user supplied mutexes.
- */
- FZ_FUNCTION void fz_unlock(int lock);
- /** Class-aware wrapper for `::fz_unpack_stream()`. */
- FZ_FUNCTION FzStream fz_unpack_stream(const FzStream& src, int depth, int w, int h, int n, int indexed, int pad, int skip);
- /** Class-aware wrapper for `::fz_unread_byte()`. */
- /**
- Unread the single last byte successfully
- read from a stream. Do not call this without having
- successfully read a byte.
-
- stm: The stream to operate upon.
- */
- FZ_FUNCTION void fz_unread_byte(const FzStream& stm);
- /** Class-aware wrapper for `::fz_unshare_stroke_state()`. */
- /**
- Given a reference to a (possibly) shared stroke_state structure,
- return a reference to an equivalent stroke_state structure
- that is guaranteed to be unshared (i.e. one that can
- safely be modified).
-
- shared: The reference to a (possibly) shared structure
- to unshare. Ownership of this reference is passed in
- to this function, even in the case of exceptions being
- thrown.
-
- Exceptions may be thrown in the event of failure to
- allocate if required.
- */
- FZ_FUNCTION FzStrokeState fz_unshare_stroke_state(const FzStrokeState& shared);
- /** Class-aware wrapper for `::fz_unshare_stroke_state_with_dash_len()`. */
- /**
- Given a reference to a (possibly) shared stroke_state structure,
- return a reference to a stroke_state structure (with room for a
- given amount of dash data) that is guaranteed to be unshared
- (i.e. one that can safely be modified).
-
- shared: The reference to a (possibly) shared structure
- to unshare. Ownership of this reference is passed in
- to this function, even in the case of exceptions being
- thrown.
-
- Exceptions may be thrown in the event of failure to
- allocate if required.
- */
- FZ_FUNCTION FzStrokeState fz_unshare_stroke_state_with_dash_len(const FzStrokeState& shared, int len);
- /** Class-aware wrapper for `::fz_urldecode()`. */
- /**
- Like fz_decode_uri_component but in-place.
- */
- FZ_FUNCTION char *fz_urldecode(char *url);
- /** Class-aware wrapper for `::fz_use_document_css()`. */
- /**
- Return whether to respect document styles in HTML and EPUB.
- */
- FZ_FUNCTION int fz_use_document_css();
- /** Class-aware wrapper for `::fz_user_context()`. */
- /**
- Read the user field from the context.
- */
- FZ_FUNCTION void *fz_user_context();
- /** Class-aware wrapper for `::fz_user_css()`. */
- /**
- Get the user stylesheet source text.
- */
- FZ_FUNCTION const char *fz_user_css();
- /** Class-aware wrapper for `::fz_utflen()`. */
- /**
- Count how many runes the UTF-8 encoded string
- consists of.
-
- s: The UTF-8 encoded, NUL-terminated text string.
-
- Returns the number of runes in the string.
- */
- FZ_FUNCTION int fz_utflen(const char *s);
- /** Class-aware wrapper for `::fz_var_imp()`. */
- FZ_FUNCTION void fz_var_imp(void *arg_0);
- /** Class-aware wrapper for `::fz_vlog_error_printf()`. */
- FZ_FUNCTION void fz_vlog_error_printf(const char *fmt, va_list ap);
- /** Class-aware wrapper for `::fz_vsnprintf()`. */
- /**
- A vsnprintf work-alike, using our custom formatter.
- */
- FZ_FUNCTION size_t fz_vsnprintf(char *buffer, size_t space, const char *fmt, va_list args);
- /** Class-aware wrapper for `::fz_vthrow()`. */
- /**
- Throw an exception.
-
- This assumes an enclosing fz_try() block within the callstack.
- */
- FZ_FUNCTION void fz_vthrow(int errcode, const char *arg_1, va_list ap);
- /** Class-aware wrapper for `::fz_vwarn()`. */
- /**
- Log a warning.
-
- This goes to the registered warning stream (stderr by
- default).
- */
- FZ_FUNCTION void fz_vwarn(const char *fmt, va_list ap);
- /** Class-aware wrapper for `::fz_walk_path()`. */
- /**
- Walk the segments of a path, calling the
- appropriate callback function from a given set for each
- segment of the path.
-
- path: The path to walk.
-
- walker: The set of callback functions to use. The first
- 4 callback pointers in the set must be non-NULL. The
- subsequent ones can either be supplied, or can be left
- as NULL, in which case the top 4 functions will be
- called as appropriate to simulate them.
-
- arg: An opaque argument passed in to each callback.
-
- Exceptions will only be thrown if the underlying callback
- functions throw them.
- */
- FZ_FUNCTION void fz_walk_path(const FzPath& path, const FzPathWalker& walker, void *arg);
- /** Class-aware wrapper for `::fz_warn()`. */
- FZ_FUNCTION void fz_warn(const char *fmt, ...);
- /** Class-aware wrapper for `::fz_warning_callback()`.
-
- This function has out-params. Python/C# wrappers look like:
- `fz_warning_callback()` => `(fz_warning_cb *, void *user)`
- */
- /**
- Retrieve the currently set warning callback, or NULL if none
- has been set. Optionally, if user is non-NULL, the user pointer
- given when the warning callback was set is also passed back to
- the caller.
- */
- FZ_FUNCTION ::fz_warning_cb *fz_warning_callback(void **user);
- /** Class-aware wrapper for `::fz_warp_pixmap()`. */
- FZ_FUNCTION FzPixmap fz_warp_pixmap(const FzPixmap& src, const FzQuad& points, int width, int height);
- /** Class-aware wrapper for `::fz_windows_1250_from_unicode()`. */
- FZ_FUNCTION int fz_windows_1250_from_unicode(int u);
- /** Class-aware wrapper for `::fz_windows_1251_from_unicode()`. */
- FZ_FUNCTION int fz_windows_1251_from_unicode(int u);
- /** Class-aware wrapper for `::fz_windows_1252_from_unicode()`. */
- FZ_FUNCTION int fz_windows_1252_from_unicode(int u);
- /** Class-aware wrapper for `::fz_write_band()`. */
- /**
- Cause a band writer to write the next band
- of data for an image.
-
- stride: The byte offset from the first byte of the data
- for a pixel to the first byte of the data for the same pixel
- on the row below.
-
- band_height: The number of lines in this band.
-
- samples: Pointer to first byte of the data.
- */
- FZ_FUNCTION void fz_write_band(const FzBandWriter& writer, int stride, int band_height, const unsigned char *samples);
- /** Class-aware wrapper for `::fz_write_base64()`. */
- /**
- Write a base64 encoded data block, optionally with periodic
- newlines.
- */
- FZ_FUNCTION void fz_write_base64(const FzOutput& out, const unsigned char *data, size_t size, int newline);
- /** Class-aware wrapper for `::fz_write_base64_buffer()`. */
- /**
- Write a base64 encoded fz_buffer, optionally with periodic
- newlines.
- */
- FZ_FUNCTION void fz_write_base64_buffer(const FzOutput& out, const FzBuffer& data, int newline);
- /** Class-aware wrapper for `::fz_write_bitmap_as_pbm()`. */
- /**
- Write a bitmap as a pbm.
- */
- FZ_FUNCTION void fz_write_bitmap_as_pbm(const FzOutput& out, const FzBitmap& bitmap);
- /** Class-aware wrapper for `::fz_write_bitmap_as_pcl()`. */
- /**
- Write a bitmap as mono PCL.
- */
- FZ_FUNCTION void fz_write_bitmap_as_pcl(const FzOutput& out, const FzBitmap& bitmap, const FzPclOptions& pcl);
- /** Class-aware wrapper for `::fz_write_bitmap_as_pkm()`. */
- /**
- Write a CMYK bitmap as a pkm.
- */
- FZ_FUNCTION void fz_write_bitmap_as_pkm(const FzOutput& out, const FzBitmap& bitmap);
- /** Class-aware wrapper for `::fz_write_bitmap_as_pwg()`. */
- /**
- Write a bitmap as a PWG.
- */
- FZ_FUNCTION void fz_write_bitmap_as_pwg(const FzOutput& out, const FzBitmap& bitmap, FzPwgOptions& pwg);
- /** Class-aware wrapper for `::fz_write_bitmap_as_pwg_page()`. */
- /**
- Write a bitmap as a PWG page.
-
- Caller should provide a file header by calling
- fz_write_pwg_file_header, but can then write several pages to
- the same file.
- */
- FZ_FUNCTION void fz_write_bitmap_as_pwg_page(const FzOutput& out, const FzBitmap& bitmap, FzPwgOptions& pwg);
- /** Class-aware wrapper for `::fz_write_bits()`. */
- /**
- Write num_bits of data to the end of the output stream, assumed to be packed
- most significant bits first.
- */
- FZ_FUNCTION void fz_write_bits(const FzOutput& out, unsigned int data, int num_bits);
- /** Class-aware wrapper for `::fz_write_bits_sync()`. */
- /**
- Sync to byte boundary after writing bits.
- */
- FZ_FUNCTION void fz_write_bits_sync(const FzOutput& out);
- /** Class-aware wrapper for `::fz_write_buffer()`. */
- FZ_FUNCTION void fz_write_buffer(const FzOutput& out, const FzBuffer& data);
- /** Class-aware wrapper for `::fz_write_byte()`. */
- FZ_FUNCTION void fz_write_byte(const FzOutput& out, unsigned char x);
- /** Class-aware wrapper for `::fz_write_char()`. */
- FZ_FUNCTION void fz_write_char(const FzOutput& out, char x);
- /** Class-aware wrapper for `::fz_write_data()`. */
- /**
- Write data to output.
-
- data: Pointer to data to write.
- size: Size of data to write in bytes.
- */
- FZ_FUNCTION void fz_write_data(const FzOutput& out, const void *data, size_t size);
- /** Class-aware wrapper for `::fz_write_document()`. */
- /**
- Convenience function to feed all the pages of a document to
- fz_begin_page/fz_run_page/fz_end_page.
- */
- FZ_FUNCTION void fz_write_document(const FzDocumentWriter& wri, const FzDocument& doc);
- /** Class-aware wrapper for `::fz_write_float_be()`. */
- FZ_FUNCTION void fz_write_float_be(const FzOutput& out, float f);
- /** Class-aware wrapper for `::fz_write_float_le()`. */
- FZ_FUNCTION void fz_write_float_le(const FzOutput& out, float f);
- /** Class-aware wrapper for `::fz_write_header()`. */
- /**
- Cause a band writer to write the header for
- a banded image with the given properties/dimensions etc. This
- also configures the bandwriter for the format of the data to be
- passed in future calls.
-
- w, h: Width and Height of the entire page.
-
- n: Number of components (including spots and alphas).
-
- alpha: Number of alpha components.
-
- xres, yres: X and Y resolutions in dpi.
-
- cs: Colorspace (NULL for bitmaps)
-
- seps: Separation details (or NULL).
- */
- FZ_FUNCTION void fz_write_header(const FzBandWriter& writer, int w, int h, int n, int alpha, int xres, int yres, int pagenum, const FzColorspace& cs, const FzSeparations& seps);
- /** Class-aware wrapper for `::fz_write_image_as_data_uri()`. */
- /**
- Write image as a data URI (for HTML and SVG output).
- */
- FZ_FUNCTION void fz_write_image_as_data_uri(const FzOutput& out, const FzImage& image);
- /** Class-aware wrapper for `::fz_write_int16_be()`. */
- FZ_FUNCTION void fz_write_int16_be(const FzOutput& out, int x);
- /** Class-aware wrapper for `::fz_write_int16_le()`. */
- FZ_FUNCTION void fz_write_int16_le(const FzOutput& out, int x);
- /** Class-aware wrapper for `::fz_write_int32_be()`. */
- /**
- Write different sized data to an output stream.
- */
- FZ_FUNCTION void fz_write_int32_be(const FzOutput& out, int x);
- /** Class-aware wrapper for `::fz_write_int32_le()`. */
- FZ_FUNCTION void fz_write_int32_le(const FzOutput& out, int x);
- /** Class-aware wrapper for `::fz_write_json()`. */
- FZ_FUNCTION void fz_write_json(const FzOutput& out, const FzJson& value);
- /** Class-aware wrapper for `::fz_write_pixmap_as_data_uri()`. */
- FZ_FUNCTION void fz_write_pixmap_as_data_uri(const FzOutput& out, const FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_write_pixmap_as_jpeg()`. */
- /**
- Write a pixmap as a JPEG.
- */
- FZ_FUNCTION void fz_write_pixmap_as_jpeg(const FzOutput& out, const FzPixmap& pix, int quality, int invert_cmyk);
- /** Class-aware wrapper for `::fz_write_pixmap_as_jpx()`. */
- /**
- Pixmap data as JP2K with no subsampling.
-
- quality = 100 = lossless
- otherwise for a factor of x compression use 100-x. (so 80 is 1:20 compression)
- */
- FZ_FUNCTION void fz_write_pixmap_as_jpx(const FzOutput& out, const FzPixmap& pix, int quality);
- /** Class-aware wrapper for `::fz_write_pixmap_as_pam()`. */
- /**
- Write a pixmap as a pnm (greyscale, rgb or cmyk, with or without
- alpha).
- */
- FZ_FUNCTION void fz_write_pixmap_as_pam(const FzOutput& out, const FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_write_pixmap_as_pcl()`. */
- /**
- Write an (RGB) pixmap as color PCL.
- */
- FZ_FUNCTION void fz_write_pixmap_as_pcl(const FzOutput& out, const FzPixmap& pixmap, const FzPclOptions& pcl);
- /** Class-aware wrapper for `::fz_write_pixmap_as_pclm()`. */
- /**
- Write a (Greyscale or RGB) pixmap as pclm.
- */
- FZ_FUNCTION void fz_write_pixmap_as_pclm(const FzOutput& out, const FzPixmap& pixmap, const FzPclmOptions& options);
- /** Class-aware wrapper for `::fz_write_pixmap_as_pdfocr()`. */
- /**
- Write a (Greyscale or RGB) pixmap as pdfocr.
- */
- FZ_FUNCTION void fz_write_pixmap_as_pdfocr(const FzOutput& out, const FzPixmap& pixmap, FzPdfocrOptions& options);
- /** Class-aware wrapper for `::fz_write_pixmap_as_png()`. */
- /**
- Write a (Greyscale or RGB) pixmap as a png.
- */
- FZ_FUNCTION void fz_write_pixmap_as_png(const FzOutput& out, const FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_write_pixmap_as_pnm()`. */
- /**
- Write a pixmap as a pnm (greyscale or rgb, no alpha).
- */
- FZ_FUNCTION void fz_write_pixmap_as_pnm(const FzOutput& out, const FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_write_pixmap_as_ps()`. */
- /**
- Write a (gray, rgb, or cmyk, no alpha) pixmap out as postscript.
- */
- FZ_FUNCTION void fz_write_pixmap_as_ps(const FzOutput& out, const FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_write_pixmap_as_psd()`. */
- /**
- Write a pixmap as a PSD file.
- */
- FZ_FUNCTION void fz_write_pixmap_as_psd(const FzOutput& out, const FzPixmap& pixmap);
- /** Class-aware wrapper for `::fz_write_pixmap_as_pwg()`. */
- /**
- Write a pixmap as a PWG.
- */
- FZ_FUNCTION void fz_write_pixmap_as_pwg(const FzOutput& out, const FzPixmap& pixmap, FzPwgOptions& pwg);
- /** Class-aware wrapper for `::fz_write_pixmap_as_pwg_page()`. */
- /**
- Write a pixmap as a PWG page.
-
- Caller should provide a file header by calling
- fz_write_pwg_file_header, but can then write several pages to
- the same file.
- */
- FZ_FUNCTION void fz_write_pixmap_as_pwg_page(const FzOutput& out, const FzPixmap& pixmap, FzPwgOptions& pwg);
- /** Class-aware wrapper for `::fz_write_ps_file_header()`. */
- /**
- Write the file level header for ps band writer output.
- */
- FZ_FUNCTION void fz_write_ps_file_header(const FzOutput& out);
- /** Class-aware wrapper for `::fz_write_ps_file_trailer()`. */
- /**
- Write the file level trailer for ps band writer output.
- */
- FZ_FUNCTION void fz_write_ps_file_trailer(const FzOutput& out, int pages);
- /** Class-aware wrapper for `::fz_write_pwg_file_header()`. */
- /**
- Output the file header to a pwg stream, ready for pages to follow it.
- */
- FZ_FUNCTION void fz_write_pwg_file_header(const FzOutput& out);
- /** Class-aware wrapper for `::fz_write_rune()`. */
- /**
- Write a UTF-8 encoded unicode character.
- */
- FZ_FUNCTION void fz_write_rune(const FzOutput& out, int rune);
- /** Class-aware wrapper for `::fz_write_stabilized_story()`. */
- FZ_FUNCTION void fz_write_stabilized_story(const FzDocumentWriter& writer, const char *user_css, float em, ::fz_write_story_contentfn contentfn, void *contentfn_ref, ::fz_write_story_rectfn rectfn, void *rectfn_ref, ::fz_write_story_pagefn pagefn, void *pagefn_ref, const FzArchive& dir);
- /** Class-aware wrapper for `::fz_write_story()`. */
- FZ_FUNCTION void fz_write_story(const FzDocumentWriter& writer, const FzStory& story, ::fz_write_story_rectfn rectfn, void *rectfn_ref, ::fz_write_story_positionfn positionfn, void *positionfn_ref, ::fz_write_story_pagefn pagefn, void *pagefn_ref);
- /** Class-aware wrapper for `::fz_write_stream()`. */
- /**
- Copy the stream contents to the output.
- */
- FZ_FUNCTION void fz_write_stream(const FzOutput& out, const FzStream& in);
- /** Class-aware wrapper for `::fz_write_string()`. */
- /**
- Write a string. Does not write zero terminator.
- */
- FZ_FUNCTION void fz_write_string(const FzOutput& out, const char *s);
- /** Class-aware wrapper for `::fz_write_uint16_be()`. */
- FZ_FUNCTION void fz_write_uint16_be(const FzOutput& out, unsigned int x);
- /** Class-aware wrapper for `::fz_write_uint16_le()`. */
- FZ_FUNCTION void fz_write_uint16_le(const FzOutput& out, unsigned int x);
- /** Class-aware wrapper for `::fz_write_uint32_be()`. */
- FZ_FUNCTION void fz_write_uint32_be(const FzOutput& out, unsigned int x);
- /** Class-aware wrapper for `::fz_write_uint32_le()`. */
- FZ_FUNCTION void fz_write_uint32_le(const FzOutput& out, unsigned int x);
- /** Class-aware wrapper for `::fz_write_vprintf()`. */
- /**
- va_list version of fz_write_printf.
- */
- FZ_FUNCTION void fz_write_vprintf(const FzOutput& out, const char *fmt, va_list ap);
- /** Class-aware wrapper for `::fz_write_xml()`. */
- /**
- Write our xml structure out to an xml stream.
-
- Properly formatted XML is only allowed to have a single top-level node
- under which everything must sit. Our structures allow for multiple
- top level nodes. If required, we will output an extra 'ROOT' node
- at the top so that the xml is well-formed.
-
- If 'indented' is non-zero then additional whitespace will be added to
- make the XML easier to read in a text editor. It will NOT be properly
- compliant.
- */
- FZ_FUNCTION void fz_write_xml(const FzXml& root, const FzOutput& out, int indented);
- /** Class-aware wrapper for `::fz_write_zip_entry()`. */
- /**
- Given a buffer of data, (optionally) compress it, and add it to
- the zip file with the given name.
- */
- FZ_FUNCTION void fz_write_zip_entry(const FzZipWriter& zip, const char *name, const FzBuffer& buf, int compress);
- /** Class-aware wrapper for `::fz_xml_add_att()`. */
- /**
- Add an attribute to an XML node.
- */
- FZ_FUNCTION void fz_xml_add_att(const FzPool& pool, const FzXml& node, const char *key, const char *val);
- /** Class-aware wrapper for `::fz_xml_att()`. */
- /**
- Return the value of an attribute of an XML node.
- NULL if the attribute doesn't exist.
- */
- FZ_FUNCTION char *fz_xml_att(const FzXml& item, const char *att);
- /** Class-aware wrapper for `::fz_xml_att_alt()`. */
- /**
- Return the value of an attribute of an XML node.
- If the first attribute doesn't exist, try the second.
- NULL if neither attribute exists.
- */
- FZ_FUNCTION char *fz_xml_att_alt(const FzXml& item, const char *one, const char *two);
- /** Class-aware wrapper for `::fz_xml_att_eq()`. */
- /**
- Check for a matching attribute on an XML node.
-
- If the node has the requested attribute (name), and the value
- matches (match) then return 1. Otherwise, 0.
- */
- FZ_FUNCTION int fz_xml_att_eq(const FzXml& item, const char *name, const char *match);
- /** Class-aware wrapper for `::fz_xml_down()`. */
- /**
- Return first child of XML node.
- */
- FZ_FUNCTION FzXml fz_xml_down(const FzXml& item);
- /** Class-aware wrapper for `::fz_xml_find()`. */
- /**
- Search the siblings of XML nodes starting with item looking for
- the first with the given tag.
-
- Return NULL if none found.
- */
- FZ_FUNCTION FzXml fz_xml_find(const FzXml& item, const char *tag);
- /** Class-aware wrapper for `::fz_xml_find_dfs()`. */
- /**
- Perform a depth first search from item, returning the first
- child that matches the given tag (or any tag if tag is NULL),
- with the given attribute (if att is non NULL), that matches
- match (if match is non NULL).
- */
- FZ_FUNCTION FzXml fz_xml_find_dfs(const FzXml& item, const char *tag, const char *att, const char *match);
- /** Class-aware wrapper for `::fz_xml_find_dfs_top()`. */
- /**
- Perform a depth first search from item, returning the first
- child that matches the given tag (or any tag if tag is NULL),
- with the given attribute (if att is non NULL), that matches
- match (if match is non NULL). The search stops if it ever
- reaches the top of the tree, or the declared 'top' item.
- */
- FZ_FUNCTION FzXml fz_xml_find_dfs_top(const FzXml& item, const char *tag, const char *att, const char *match, const FzXml& top);
- /** Class-aware wrapper for `::fz_xml_find_down()`. */
- /**
- Search the siblings of XML nodes starting with the first child
- of item looking for the first with the given tag.
-
- Return NULL if none found.
- */
- FZ_FUNCTION FzXml fz_xml_find_down(const FzXml& item, const char *tag);
- /** Class-aware wrapper for `::fz_xml_find_down_match()`. */
- /**
- Search the siblings of XML nodes starting with the first child
- of item looking for the first with the given tag (or any tag if
- tag is NULL), and with a matching attribute.
-
- Return NULL if none found.
- */
- FZ_FUNCTION FzXml fz_xml_find_down_match(const FzXml& item, const char *tag, const char *att, const char *match);
- /** Class-aware wrapper for `::fz_xml_find_match()`. */
- /**
- Search the siblings of XML nodes starting with item looking for
- the first with the given tag (or any tag if tag is NULL), and
- with a matching attribute.
-
- Return NULL if none found.
- */
- FZ_FUNCTION FzXml fz_xml_find_match(const FzXml& item, const char *tag, const char *att, const char *match);
- /** Class-aware wrapper for `::fz_xml_find_next()`. */
- /**
- Search the siblings of XML nodes starting with the first sibling
- of item looking for the first with the given tag.
-
- Return NULL if none found.
- */
- FZ_FUNCTION FzXml fz_xml_find_next(const FzXml& item, const char *tag);
- /** Class-aware wrapper for `::fz_xml_find_next_dfs()`. */
- /**
- Perform a depth first search onwards from item, returning the first
- child that matches the given tag (or any tag if tag is NULL),
- with the given attribute (if att is non NULL), that matches
- match (if match is non NULL).
- */
- FZ_FUNCTION FzXml fz_xml_find_next_dfs(const FzXml& item, const char *tag, const char *att, const char *match);
- /** Class-aware wrapper for `::fz_xml_find_next_dfs_top()`. */
- /**
- Perform a depth first search onwards from item, returning the first
- child that matches the given tag (or any tag if tag is NULL),
- with the given attribute (if att is non NULL), that matches
- match (if match is non NULL). The search stops if it ever reaches
- the top of the tree, or the declared 'top' item.
- */
- FZ_FUNCTION FzXml fz_xml_find_next_dfs_top(const FzXml& item, const char *tag, const char *att, const char *match, const FzXml& top);
- /** Class-aware wrapper for `::fz_xml_find_next_match()`. */
- /**
- Search the siblings of XML nodes starting with the first sibling
- of item looking for the first with the given tag (or any tag if tag
- is NULL), and with a matching attribute.
-
- Return NULL if none found.
- */
- FZ_FUNCTION FzXml fz_xml_find_next_match(const FzXml& item, const char *tag, const char *att, const char *match);
- /** Class-aware wrapper for `::fz_xml_is_tag()`. */
- /**
- Return true if the tag name matches.
- */
- FZ_FUNCTION int fz_xml_is_tag(const FzXml& item, const char *name);
- /** Class-aware wrapper for `::fz_xml_next()`. */
- /**
- Return next sibling of XML node.
- */
- FZ_FUNCTION FzXml fz_xml_next(const FzXml& item);
- /** Class-aware wrapper for `::fz_xml_prev()`. */
- /**
- Return previous sibling of XML node.
- */
- FZ_FUNCTION FzXml fz_xml_prev(const FzXml& item);
- /** Class-aware wrapper for `::fz_xml_root()`. */
- /**
- Return the topmost XML node of a document.
- */
- FZ_FUNCTION FzXml fz_xml_root(const FzXml& xml);
- /** Class-aware wrapper for `::fz_xml_tag()`. */
- /**
- Return tag of XML node. Return NULL for text nodes.
- */
- FZ_FUNCTION char *fz_xml_tag(const FzXml& item);
- /** Class-aware wrapper for `::fz_xml_text()`. */
- /**
- Return the text content of an XML node.
- Return NULL if the node is a tag.
- */
- FZ_FUNCTION char *fz_xml_text(const FzXml& item);
- /** Class-aware wrapper for `::fz_xml_up()`. */
- /**
- Return parent of XML node.
- */
- FZ_FUNCTION FzXml fz_xml_up(const FzXml& item);
- /** Class-aware wrapper for `::pdf_abandon_operation()`. */
- FZ_FUNCTION void pdf_abandon_operation(const PdfDocument& doc);
- /* Class-aware wrapper for `pdf_access_alert_event()`
- is not available because returned wrapper class for `pdf_alert_event`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_access_exec_menu_item_event()`. */
- FZ_FUNCTION const char *pdf_access_exec_menu_item_event(const PdfDocEvent& evt);
- /* Class-aware wrapper for `pdf_access_launch_url_event()`
- is not available because returned wrapper class for `pdf_launch_url_event`
- is non-copyable. */
- /* Class-aware wrapper for `pdf_access_mail_doc_event()`
- is not available because returned wrapper class for `pdf_mail_doc_event`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_add_annot_border_dash_item()`. */
- FZ_FUNCTION void pdf_add_annot_border_dash_item(const PdfAnnot& annot, float length);
- /** Class-aware wrapper for `::pdf_add_annot_ink_list()`. */
- FZ_FUNCTION void pdf_add_annot_ink_list(const PdfAnnot& annot, int n, ::fz_point stroke[]);
- /** Class-aware wrapper for `::pdf_add_annot_ink_list_stroke()`. */
- FZ_FUNCTION void pdf_add_annot_ink_list_stroke(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_add_annot_ink_list_stroke_vertex()`. */
- FZ_FUNCTION void pdf_add_annot_ink_list_stroke_vertex(const PdfAnnot& annot, const FzPoint& p);
- /** Class-aware wrapper for `::pdf_add_annot_quad_point()`. */
- FZ_FUNCTION void pdf_add_annot_quad_point(const PdfAnnot& annot, const FzQuad& quad);
- /** Class-aware wrapper for `::pdf_add_annot_vertex()`. */
- FZ_FUNCTION void pdf_add_annot_vertex(const PdfAnnot& annot, const FzPoint& p);
- /** Class-aware wrapper for `::pdf_add_cid_font()`. */
- FZ_FUNCTION PdfObj pdf_add_cid_font(const PdfDocument& doc, const FzFont& font);
- /** Class-aware wrapper for `::pdf_add_cjk_font()`. */
- FZ_FUNCTION PdfObj pdf_add_cjk_font(const PdfDocument& doc, const FzFont& font, int script, int wmode, int serif);
- /** Class-aware wrapper for `::pdf_add_codespace()`. */
- FZ_FUNCTION void pdf_add_codespace(const PdfCmap& cmap, unsigned int low, unsigned int high, size_t n);
- /** Class-aware wrapper for `::pdf_add_colorspace()`. */
- FZ_FUNCTION PdfObj pdf_add_colorspace(const PdfDocument& doc, const FzColorspace& cs);
- /** Class-aware wrapper for `::pdf_add_embedded_file()`. */
- FZ_FUNCTION PdfObj pdf_add_embedded_file(const PdfDocument& doc, const char *filename, const char *mimetype, const FzBuffer& contents, int64_t created, int64_t modified, int add_checksum);
- /** Class-aware wrapper for `::pdf_add_hmtx()`. */
- FZ_FUNCTION void pdf_add_hmtx(const PdfFontDesc& font, int lo, int hi, int w);
- /** Class-aware wrapper for `::pdf_add_image()`. */
- FZ_FUNCTION PdfObj pdf_add_image(const PdfDocument& doc, const FzImage& image);
- /** Class-aware wrapper for `::pdf_add_journal_fragment()`. */
- FZ_FUNCTION void pdf_add_journal_fragment(const PdfDocument& doc, int parent, const PdfObj& copy, const FzBuffer& copy_stream, int newobj);
- /** Class-aware wrapper for `::pdf_add_new_array()`. */
- FZ_FUNCTION PdfObj pdf_add_new_array(const PdfDocument& doc, int initial);
- /** Class-aware wrapper for `::pdf_add_new_dict()`. */
- FZ_FUNCTION PdfObj pdf_add_new_dict(const PdfDocument& doc, int initial);
- /** Class-aware wrapper for `::pdf_add_object()`. */
- FZ_FUNCTION PdfObj pdf_add_object(const PdfDocument& doc, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_add_page()`. */
- FZ_FUNCTION PdfObj pdf_add_page(const PdfDocument& doc, const FzRect& mediabox, int rotate, const PdfObj& resources, const FzBuffer& contents);
- /** Class-aware wrapper for `::pdf_add_simple_font()`. */
- FZ_FUNCTION PdfObj pdf_add_simple_font(const PdfDocument& doc, const FzFont& font, int encoding);
- /** Class-aware wrapper for `::pdf_add_stream()`. */
- FZ_FUNCTION PdfObj pdf_add_stream(const PdfDocument& doc, const FzBuffer& buf, const PdfObj& obj, int compressed);
- /** Class-aware wrapper for `::pdf_add_substitute_font()`. */
- FZ_FUNCTION PdfObj pdf_add_substitute_font(const PdfDocument& doc, const FzFont& font);
- /** Class-aware wrapper for `::pdf_add_vmtx()`. */
- FZ_FUNCTION void pdf_add_vmtx(const PdfFontDesc& font, int lo, int hi, int x, int y, int w);
- /** Class-aware wrapper for `::pdf_annot_MK_BC()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_annot_MK_BC(::pdf_annot *annot, float color[4])` => int n
- */
- FZ_FUNCTION void pdf_annot_MK_BC(const PdfAnnot& annot, int *n, float color[4]);
- /** Class-aware wrapper for `::pdf_annot_MK_BC_rgb()`. */
- FZ_FUNCTION int pdf_annot_MK_BC_rgb(const PdfAnnot& annot, float rgb[3]);
- /** Class-aware wrapper for `::pdf_annot_MK_BG()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_annot_MK_BG(::pdf_annot *annot, float color[4])` => int n
- */
- FZ_FUNCTION void pdf_annot_MK_BG(const PdfAnnot& annot, int *n, float color[4]);
- /** Class-aware wrapper for `::pdf_annot_MK_BG_rgb()`. */
- FZ_FUNCTION int pdf_annot_MK_BG_rgb(const PdfAnnot& annot, float rgb[3]);
- /** Class-aware wrapper for `::pdf_annot_active()`. */
- FZ_FUNCTION int pdf_annot_active(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_ap()`. */
- FZ_FUNCTION PdfObj pdf_annot_ap(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_author()`. */
- FZ_FUNCTION const char *pdf_annot_author(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_border()`. */
- FZ_FUNCTION float pdf_annot_border(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_border_dash_count()`. */
- FZ_FUNCTION int pdf_annot_border_dash_count(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_border_dash_item()`. */
- FZ_FUNCTION float pdf_annot_border_dash_item(const PdfAnnot& annot, int i);
- /** Class-aware wrapper for `::pdf_annot_border_effect()`. */
- FZ_FUNCTION enum pdf_border_effect pdf_annot_border_effect(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_border_effect_intensity()`. */
- FZ_FUNCTION float pdf_annot_border_effect_intensity(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_border_style()`. */
- FZ_FUNCTION enum pdf_border_style pdf_annot_border_style(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_border_width()`. */
- FZ_FUNCTION float pdf_annot_border_width(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_callout_line()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_annot_callout_line(::pdf_annot *annot, ::fz_point callout[3])` => int n
- */
- FZ_FUNCTION void pdf_annot_callout_line(const PdfAnnot& annot, ::fz_point callout[3], int *n);
- /** Class-aware wrapper for `::pdf_annot_callout_point()`. */
- FZ_FUNCTION FzPoint pdf_annot_callout_point(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_callout_style()`. */
- FZ_FUNCTION enum pdf_line_ending pdf_annot_callout_style(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_color()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_annot_color(::pdf_annot *annot, float color[4])` => int n
- */
- FZ_FUNCTION void pdf_annot_color(const PdfAnnot& annot, int *n, float color[4]);
- /** Class-aware wrapper for `::pdf_annot_contents()`. */
- FZ_FUNCTION const char *pdf_annot_contents(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_creation_date()`. */
- FZ_FUNCTION int64_t pdf_annot_creation_date(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_default_appearance()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_annot_default_appearance(::pdf_annot *annot, float color[4])` => `(const char *font, float size, int n)`
- */
- FZ_FUNCTION void pdf_annot_default_appearance(const PdfAnnot& annot, const char **font, float *size, int *n, float color[4]);
- /** Class-aware wrapper for `::pdf_annot_default_appearance_unmapped()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_annot_default_appearance_unmapped(::pdf_annot *annot, char *font_name, int font_name_len, float color[4])` => `(float size, int n)`
- */
- FZ_FUNCTION void pdf_annot_default_appearance_unmapped(const PdfAnnot& annot, char *font_name, int font_name_len, float *size, int *n, float color[4]);
- /** Class-aware wrapper for `::pdf_annot_ensure_local_xref()`. */
- FZ_FUNCTION void pdf_annot_ensure_local_xref(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_event_blur()`. */
- FZ_FUNCTION void pdf_annot_event_blur(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_event_down()`. */
- FZ_FUNCTION void pdf_annot_event_down(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_event_enter()`. */
- FZ_FUNCTION void pdf_annot_event_enter(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_event_exit()`. */
- FZ_FUNCTION void pdf_annot_event_exit(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_event_focus()`. */
- FZ_FUNCTION void pdf_annot_event_focus(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_event_page_close()`. */
- FZ_FUNCTION void pdf_annot_event_page_close(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_event_page_invisible()`. */
- FZ_FUNCTION void pdf_annot_event_page_invisible(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_event_page_open()`. */
- FZ_FUNCTION void pdf_annot_event_page_open(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_event_page_visible()`. */
- FZ_FUNCTION void pdf_annot_event_page_visible(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_event_up()`. */
- FZ_FUNCTION void pdf_annot_event_up(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_field_event_keystroke()`. */
- FZ_FUNCTION int pdf_annot_field_event_keystroke(const PdfDocument& doc, const PdfAnnot& annot, const PdfKeystrokeEvent& evt);
- /** Class-aware wrapper for `::pdf_annot_field_flags()`. */
- FZ_FUNCTION int pdf_annot_field_flags(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_field_label()`. */
- FZ_FUNCTION const char *pdf_annot_field_label(const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_annot_field_value()`. */
- FZ_FUNCTION const char *pdf_annot_field_value(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_filespec()`. */
- FZ_FUNCTION PdfObj pdf_annot_filespec(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_flags()`. */
- FZ_FUNCTION int pdf_annot_flags(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_author()`. */
- FZ_FUNCTION int pdf_annot_has_author(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_border()`. */
- FZ_FUNCTION int pdf_annot_has_border(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_border_effect()`. */
- FZ_FUNCTION int pdf_annot_has_border_effect(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_callout()`. */
- FZ_FUNCTION int pdf_annot_has_callout(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_default_appearance()`. */
- FZ_FUNCTION int pdf_annot_has_default_appearance(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_filespec()`. */
- FZ_FUNCTION int pdf_annot_has_filespec(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_icon_name()`. */
- FZ_FUNCTION int pdf_annot_has_icon_name(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_ink_list()`. */
- FZ_FUNCTION int pdf_annot_has_ink_list(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_intent()`. */
- FZ_FUNCTION int pdf_annot_has_intent(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_interior_color()`. */
- FZ_FUNCTION int pdf_annot_has_interior_color(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_line()`. */
- FZ_FUNCTION int pdf_annot_has_line(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_line_ending_styles()`. */
- FZ_FUNCTION int pdf_annot_has_line_ending_styles(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_open()`. */
- FZ_FUNCTION int pdf_annot_has_open(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_popup()`. */
- FZ_FUNCTION int pdf_annot_has_popup(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_quad_points()`. */
- FZ_FUNCTION int pdf_annot_has_quad_points(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_quadding()`. */
- FZ_FUNCTION int pdf_annot_has_quadding(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_rect()`. */
- FZ_FUNCTION int pdf_annot_has_rect(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_rich_contents()`. */
- FZ_FUNCTION int pdf_annot_has_rich_contents(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_rich_defaults()`. */
- FZ_FUNCTION int pdf_annot_has_rich_defaults(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_has_vertices()`. */
- FZ_FUNCTION int pdf_annot_has_vertices(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_hidden_for_editing()`. */
- FZ_FUNCTION int pdf_annot_hidden_for_editing(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_hot()`. */
- FZ_FUNCTION int pdf_annot_hot(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_icon_name()`. */
- FZ_FUNCTION const char *pdf_annot_icon_name(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_ink_list_count()`. */
- FZ_FUNCTION int pdf_annot_ink_list_count(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_ink_list_stroke_count()`. */
- FZ_FUNCTION int pdf_annot_ink_list_stroke_count(const PdfAnnot& annot, int i);
- /** Class-aware wrapper for `::pdf_annot_ink_list_stroke_vertex()`. */
- FZ_FUNCTION FzPoint pdf_annot_ink_list_stroke_vertex(const PdfAnnot& annot, int i, int k);
- /** Class-aware wrapper for `::pdf_annot_intent()`. */
- FZ_FUNCTION enum pdf_intent pdf_annot_intent(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_interior_color()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_annot_interior_color(::pdf_annot *annot, float color[4])` => int n
- */
- FZ_FUNCTION void pdf_annot_interior_color(const PdfAnnot& annot, int *n, float color[4]);
- /** Class-aware wrapper for `::pdf_annot_is_open()`. */
- FZ_FUNCTION int pdf_annot_is_open(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_is_standard_stamp()`. */
- FZ_FUNCTION int pdf_annot_is_standard_stamp(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_language()`. */
- FZ_FUNCTION ::fz_text_language pdf_annot_language(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_line()`. */
- FZ_FUNCTION void pdf_annot_line(const PdfAnnot& annot, FzPoint& a, FzPoint& b);
- /** Class-aware wrapper for `::pdf_annot_line_caption()`. */
- FZ_FUNCTION int pdf_annot_line_caption(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_line_caption_offset()`. */
- FZ_FUNCTION FzPoint pdf_annot_line_caption_offset(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_line_end_style()`. */
- FZ_FUNCTION enum pdf_line_ending pdf_annot_line_end_style(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_line_ending_styles()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_annot_line_ending_styles(::pdf_annot *annot)` => `(enum pdf_line_ending start_style, enum pdf_line_ending end_style)`
- */
- FZ_FUNCTION void pdf_annot_line_ending_styles(const PdfAnnot& annot, enum pdf_line_ending *start_style, enum pdf_line_ending *end_style);
- /** Class-aware wrapper for `::pdf_annot_line_leader()`. */
- FZ_FUNCTION float pdf_annot_line_leader(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_line_leader_extension()`. */
- FZ_FUNCTION float pdf_annot_line_leader_extension(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_line_leader_offset()`. */
- FZ_FUNCTION float pdf_annot_line_leader_offset(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_line_start_style()`. */
- FZ_FUNCTION enum pdf_line_ending pdf_annot_line_start_style(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_modification_date()`. */
- FZ_FUNCTION int64_t pdf_annot_modification_date(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_needs_resynthesis()`. */
- FZ_FUNCTION int pdf_annot_needs_resynthesis(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_obj()`. */
- FZ_FUNCTION PdfObj pdf_annot_obj(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_opacity()`. */
- FZ_FUNCTION float pdf_annot_opacity(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_page()`. */
- FZ_FUNCTION PdfPage pdf_annot_page(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_pop_and_discard_local_xref()`. */
- FZ_FUNCTION void pdf_annot_pop_and_discard_local_xref(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_pop_local_xref()`. */
- FZ_FUNCTION void pdf_annot_pop_local_xref(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_popup()`. */
- FZ_FUNCTION FzRect pdf_annot_popup(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_push_local_xref()`. */
- FZ_FUNCTION void pdf_annot_push_local_xref(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_quad_point()`. */
- FZ_FUNCTION FzQuad pdf_annot_quad_point(const PdfAnnot& annot, int i);
- /** Class-aware wrapper for `::pdf_annot_quad_point_count()`. */
- FZ_FUNCTION int pdf_annot_quad_point_count(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_quadding()`. */
- FZ_FUNCTION int pdf_annot_quadding(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_rect()`. */
- FZ_FUNCTION FzRect pdf_annot_rect(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_request_resynthesis()`. */
- FZ_FUNCTION void pdf_annot_request_resynthesis(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_request_synthesis()`. */
- FZ_FUNCTION void pdf_annot_request_synthesis(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_rich_contents()`. */
- FZ_FUNCTION const char *pdf_annot_rich_contents(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_rich_defaults()`. */
- FZ_FUNCTION const char *pdf_annot_rich_defaults(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_stamp_image_obj()`. */
- FZ_FUNCTION PdfObj pdf_annot_stamp_image_obj(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_transform()`. */
- FZ_FUNCTION FzMatrix pdf_annot_transform(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_type()`. */
- FZ_FUNCTION enum pdf_annot_type pdf_annot_type(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_annot_type_from_string()`. */
- FZ_FUNCTION enum pdf_annot_type pdf_annot_type_from_string(const char *subtype);
- /** Class-aware wrapper for `::pdf_annot_vertex()`. */
- FZ_FUNCTION FzPoint pdf_annot_vertex(const PdfAnnot& annot, int i);
- /** Class-aware wrapper for `::pdf_annot_vertex_count()`. */
- FZ_FUNCTION int pdf_annot_vertex_count(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_append_explicit_dest_to_uri()`. */
- FZ_FUNCTION char *pdf_append_explicit_dest_to_uri(const char *url, const FzLinkDest& dest);
- /** Class-aware wrapper for `::pdf_append_named_dest_to_uri()`. */
- FZ_FUNCTION char *pdf_append_named_dest_to_uri(const char *url, const char *name);
- /** Class-aware wrapper for `::pdf_append_token()`. */
- FZ_FUNCTION void pdf_append_token(const FzBuffer& buf, int tok, const PdfLexbuf& lex);
- /** Class-aware wrapper for `::pdf_apply_redaction()`. */
- FZ_FUNCTION int pdf_apply_redaction(const PdfAnnot& annot, PdfRedactOptions& opts);
- /** Class-aware wrapper for `::pdf_array_contains()`. */
- FZ_FUNCTION int pdf_array_contains(const PdfObj& array, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_array_delete()`. */
- FZ_FUNCTION void pdf_array_delete(const PdfObj& array, int index);
- /** Class-aware wrapper for `::pdf_array_find()`. */
- FZ_FUNCTION int pdf_array_find(const PdfObj& array, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_array_get()`. */
- FZ_FUNCTION PdfObj pdf_array_get(const PdfObj& array, int i);
- /** Class-aware wrapper for `::pdf_array_get_bool()`. */
- FZ_FUNCTION int pdf_array_get_bool(const PdfObj& array, int index);
- /** Class-aware wrapper for `::pdf_array_get_int()`. */
- FZ_FUNCTION int pdf_array_get_int(const PdfObj& array, int index);
- /** Class-aware wrapper for `::pdf_array_get_matrix()`. */
- FZ_FUNCTION FzMatrix pdf_array_get_matrix(const PdfObj& array, int index);
- /** Class-aware wrapper for `::pdf_array_get_name()`. */
- FZ_FUNCTION const char *pdf_array_get_name(const PdfObj& array, int index);
- /** Class-aware wrapper for `::pdf_array_get_real()`. */
- FZ_FUNCTION float pdf_array_get_real(const PdfObj& array, int index);
- /** Class-aware wrapper for `::pdf_array_get_rect()`. */
- FZ_FUNCTION FzRect pdf_array_get_rect(const PdfObj& array, int index);
- /** Class-aware wrapper for `::pdf_array_get_string()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_array_get_string(::pdf_obj *array, int index)` => `(const char *, size_t sizep)`
- */
- FZ_FUNCTION const char *pdf_array_get_string(const PdfObj& array, int index, size_t *sizep);
- /** Class-aware wrapper for `::pdf_array_get_text_string()`. */
- FZ_FUNCTION const char *pdf_array_get_text_string(const PdfObj& array, int index);
- /** Class-aware wrapper for `::pdf_array_insert()`. */
- FZ_FUNCTION void pdf_array_insert(const PdfObj& array, const PdfObj& obj, int index);
- /** Class-aware wrapper for `::pdf_array_len()`. */
- FZ_FUNCTION int pdf_array_len(const PdfObj& array);
- /** Class-aware wrapper for `::pdf_array_push()`. */
- FZ_FUNCTION void pdf_array_push(const PdfObj& array, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_array_push_array()`. */
- FZ_FUNCTION PdfObj pdf_array_push_array(const PdfObj& array, int initial);
- /** Class-aware wrapper for `::pdf_array_push_bool()`. */
- FZ_FUNCTION void pdf_array_push_bool(const PdfObj& array, int x);
- /** Class-aware wrapper for `::pdf_array_push_dict()`. */
- FZ_FUNCTION PdfObj pdf_array_push_dict(const PdfObj& array, int initial);
- /** Class-aware wrapper for `::pdf_array_push_int()`. */
- FZ_FUNCTION void pdf_array_push_int(const PdfObj& array, int64_t x);
- /** Class-aware wrapper for `::pdf_array_push_name()`. */
- FZ_FUNCTION void pdf_array_push_name(const PdfObj& array, const char *x);
- /** Class-aware wrapper for `::pdf_array_push_real()`. */
- FZ_FUNCTION void pdf_array_push_real(const PdfObj& array, double x);
- /** Class-aware wrapper for `::pdf_array_push_string()`. */
- FZ_FUNCTION void pdf_array_push_string(const PdfObj& array, const char *x, size_t n);
- /** Class-aware wrapper for `::pdf_array_push_text_string()`. */
- FZ_FUNCTION void pdf_array_push_text_string(const PdfObj& array, const char *x);
- /** Class-aware wrapper for `::pdf_array_put()`. */
- FZ_FUNCTION void pdf_array_put(const PdfObj& array, int i, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_array_put_array()`. */
- FZ_FUNCTION PdfObj pdf_array_put_array(const PdfObj& array, int i, int initial);
- /** Class-aware wrapper for `::pdf_array_put_bool()`. */
- FZ_FUNCTION void pdf_array_put_bool(const PdfObj& array, int i, int x);
- /** Class-aware wrapper for `::pdf_array_put_dict()`. */
- FZ_FUNCTION PdfObj pdf_array_put_dict(const PdfObj& array, int i, int initial);
- /** Class-aware wrapper for `::pdf_array_put_int()`. */
- FZ_FUNCTION void pdf_array_put_int(const PdfObj& array, int i, int64_t x);
- /** Class-aware wrapper for `::pdf_array_put_name()`. */
- FZ_FUNCTION void pdf_array_put_name(const PdfObj& array, int i, const char *x);
- /** Class-aware wrapper for `::pdf_array_put_real()`. */
- FZ_FUNCTION void pdf_array_put_real(const PdfObj& array, int i, double x);
- /** Class-aware wrapper for `::pdf_array_put_string()`. */
- FZ_FUNCTION void pdf_array_put_string(const PdfObj& array, int i, const char *x, size_t n);
- /** Class-aware wrapper for `::pdf_array_put_text_string()`. */
- FZ_FUNCTION void pdf_array_put_text_string(const PdfObj& array, int i, const char *x);
- /** Class-aware wrapper for `::pdf_authenticate_password()`. */
- FZ_FUNCTION int pdf_authenticate_password(const PdfDocument& doc, const char *pw);
- /** Class-aware wrapper for `::pdf_bake_document()`. */
- FZ_FUNCTION void pdf_bake_document(const PdfDocument& doc, int bake_annots, int bake_widgets);
- /** Class-aware wrapper for `::pdf_begin_implicit_operation()`. */
- FZ_FUNCTION void pdf_begin_implicit_operation(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_begin_operation()`. */
- FZ_FUNCTION void pdf_begin_operation(const PdfDocument& doc, const char *operation);
- /** Class-aware wrapper for `::pdf_bound_annot()`. */
- FZ_FUNCTION FzRect pdf_bound_annot(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_bound_page()`. */
- FZ_FUNCTION FzRect pdf_bound_page(const PdfPage& page, ::fz_box_type box);
- /** Class-aware wrapper for `::pdf_bound_widget()`. */
- FZ_FUNCTION FzRect pdf_bound_widget(const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_button_field_on_state()`. */
- FZ_FUNCTION PdfObj pdf_button_field_on_state(const PdfObj& field);
- /* Class-aware wrapper for `pdf_cache_object()`
- is not available because returned wrapper class for `pdf_xref_entry`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_calculate_form()`. */
- FZ_FUNCTION void pdf_calculate_form(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_can_be_saved_incrementally()`. */
- FZ_FUNCTION int pdf_can_be_saved_incrementally(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_can_redo()`. */
- FZ_FUNCTION int pdf_can_redo(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_can_undo()`. */
- FZ_FUNCTION int pdf_can_undo(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_check_certificate()`. */
- FZ_FUNCTION ::pdf_signature_error pdf_check_certificate(const PdfPkcs7Verifier& verifier, const PdfDocument& doc, const PdfObj& signature);
- /** Class-aware wrapper for `::pdf_check_digest()`. */
- FZ_FUNCTION ::pdf_signature_error pdf_check_digest(const PdfPkcs7Verifier& verifier, const PdfDocument& doc, const PdfObj& signature);
- /** Class-aware wrapper for `::pdf_check_widget_certificate()`. */
- FZ_FUNCTION ::pdf_signature_error pdf_check_widget_certificate(const PdfPkcs7Verifier& verifier, const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_check_widget_digest()`. */
- FZ_FUNCTION ::pdf_signature_error pdf_check_widget_digest(const PdfPkcs7Verifier& verifier, const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_choice_field_option()`. */
- FZ_FUNCTION const char *pdf_choice_field_option(const PdfObj& field, int exportval, int i);
- /** Class-aware wrapper for `::pdf_choice_field_option_count()`. */
- FZ_FUNCTION int pdf_choice_field_option_count(const PdfObj& field);
- /** Class-aware wrapper for `::pdf_choice_widget_is_multiselect()`. */
- FZ_FUNCTION int pdf_choice_widget_is_multiselect(const PdfAnnot& tw);
- /** Class-aware wrapper for `::pdf_choice_widget_options()`. */
- FZ_FUNCTION int pdf_choice_widget_options(const PdfAnnot& tw, int exportval, const char *opts[]);
- /** Class-aware wrapper for `::pdf_choice_widget_options2()`. */
- /** Swig-friendly wrapper for pdf_choice_widget_options(), returns the
- options directly in a vector. */
- FZ_FUNCTION std::vector<std::string> pdf_choice_widget_options2(const PdfAnnot& tw, int exportval);
- /** Class-aware wrapper for `::pdf_choice_widget_set_value()`. */
- FZ_FUNCTION void pdf_choice_widget_set_value(const PdfAnnot& tw, int n, const char *opts[]);
- /** Class-aware wrapper for `::pdf_choice_widget_value()`. */
- FZ_FUNCTION int pdf_choice_widget_value(const PdfAnnot& tw, const char *opts[]);
- /** Class-aware wrapper for `::pdf_clean_file()`. */
- FZ_FUNCTION void pdf_clean_file(char *infile, char *outfile, char *password, PdfCleanOptions& opts, int retainlen, char *retainlist[]);
- /** Class-aware wrapper for `::pdf_clean_font_name()`. */
- FZ_FUNCTION const char *pdf_clean_font_name(const char *fontname);
- /** Class-aware wrapper for `::pdf_clean_obj()`. */
- FZ_FUNCTION void pdf_clean_obj(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_clear_annot_border_dash()`. */
- FZ_FUNCTION void pdf_clear_annot_border_dash(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_clear_annot_ink_list()`. */
- FZ_FUNCTION void pdf_clear_annot_ink_list(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_clear_annot_quad_points()`. */
- FZ_FUNCTION void pdf_clear_annot_quad_points(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_clear_annot_vertices()`. */
- FZ_FUNCTION void pdf_clear_annot_vertices(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_clear_signature()`. */
- FZ_FUNCTION void pdf_clear_signature(const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_clear_xref()`. */
- FZ_FUNCTION void pdf_clear_xref(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_clear_xref_to_mark()`. */
- FZ_FUNCTION void pdf_clear_xref_to_mark(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_clip_page()`. */
- FZ_FUNCTION void pdf_clip_page(const PdfPage& page, FzRect& clip);
- /** Class-aware wrapper for `::pdf_close_processor()`. */
- FZ_FUNCTION void pdf_close_processor(const PdfProcessor& proc);
- /** Class-aware wrapper for `::pdf_cmap_size()`. */
- FZ_FUNCTION size_t pdf_cmap_size(const PdfCmap& cmap);
- /** Class-aware wrapper for `::pdf_cmap_wmode()`. */
- FZ_FUNCTION int pdf_cmap_wmode(const PdfCmap& cmap);
- /** Class-aware wrapper for `::pdf_copy_array()`. */
- FZ_FUNCTION PdfObj pdf_copy_array(const PdfObj& array);
- /** Class-aware wrapper for `::pdf_copy_dict()`. */
- FZ_FUNCTION PdfObj pdf_copy_dict(const PdfObj& dict);
- /** Class-aware wrapper for `::pdf_count_document_associated_files()`. */
- FZ_FUNCTION int pdf_count_document_associated_files(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_count_layer_config_ui()`. */
- FZ_FUNCTION int pdf_count_layer_config_ui(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_count_layer_configs()`. */
- FZ_FUNCTION int pdf_count_layer_configs(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_count_layers()`. */
- FZ_FUNCTION int pdf_count_layers(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_count_objects()`. */
- FZ_FUNCTION int pdf_count_objects(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_count_page_associated_files()`. */
- FZ_FUNCTION int pdf_count_page_associated_files(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_count_pages()`. */
- FZ_FUNCTION int pdf_count_pages(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_count_pages_imp()`. */
- FZ_FUNCTION int pdf_count_pages_imp(const FzDocument& doc, int chapter);
- /** Class-aware wrapper for `::pdf_count_q_balance()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_count_q_balance(::pdf_document *doc, ::pdf_obj *res, ::pdf_obj *stm)` => `(int prepend, int append)`
- */
- FZ_FUNCTION void pdf_count_q_balance(const PdfDocument& doc, const PdfObj& res, const PdfObj& stm, int *prepend, int *append);
- /** Class-aware wrapper for `::pdf_count_signatures()`. */
- FZ_FUNCTION int pdf_count_signatures(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_count_unsaved_versions()`. */
- FZ_FUNCTION int pdf_count_unsaved_versions(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_count_versions()`. */
- FZ_FUNCTION int pdf_count_versions(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_create_annot()`. */
- FZ_FUNCTION PdfAnnot pdf_create_annot(const PdfPage& page, enum pdf_annot_type type);
- /** Class-aware wrapper for `::pdf_create_annot_raw()`. */
- FZ_FUNCTION PdfAnnot pdf_create_annot_raw(const PdfPage& page, enum pdf_annot_type type);
- /** Class-aware wrapper for `::pdf_create_document()`. */
- FZ_FUNCTION PdfDocument pdf_create_document();
- /** Class-aware wrapper for `::pdf_create_field_name()`. */
- FZ_FUNCTION void pdf_create_field_name(const PdfDocument& doc, const char *prefix, char *buf, size_t len);
- /** Class-aware wrapper for `::pdf_create_link()`. */
- FZ_FUNCTION FzLink pdf_create_link(const PdfPage& page, const FzRect& bbox, const char *uri);
- /** Class-aware wrapper for `::pdf_create_object()`. */
- FZ_FUNCTION int pdf_create_object(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_create_signature_widget()`. */
- FZ_FUNCTION PdfAnnot pdf_create_signature_widget(const PdfPage& page, char *name);
- /** Class-aware wrapper for `::pdf_crypt_encrypt_metadata()`. */
- FZ_FUNCTION int pdf_crypt_encrypt_metadata(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_key()`. */
- FZ_FUNCTION unsigned char *pdf_crypt_key(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_length()`. */
- FZ_FUNCTION int pdf_crypt_length(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_method()`. */
- FZ_FUNCTION const char *pdf_crypt_method(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_obj()`. */
- FZ_FUNCTION void pdf_crypt_obj(const PdfCrypt& crypt, const PdfObj& obj, int num, int gen);
- /** Class-aware wrapper for `::pdf_crypt_owner_encryption()`. */
- FZ_FUNCTION unsigned char *pdf_crypt_owner_encryption(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_owner_password()`. */
- FZ_FUNCTION unsigned char *pdf_crypt_owner_password(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_permissions()`. */
- FZ_FUNCTION int pdf_crypt_permissions(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_permissions_encryption()`. */
- FZ_FUNCTION unsigned char *pdf_crypt_permissions_encryption(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_revision()`. */
- FZ_FUNCTION int pdf_crypt_revision(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_stream_method()`. */
- FZ_FUNCTION const char *pdf_crypt_stream_method(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_string_method()`. */
- FZ_FUNCTION const char *pdf_crypt_string_method(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_user_encryption()`. */
- FZ_FUNCTION unsigned char *pdf_crypt_user_encryption(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_user_password()`. */
- FZ_FUNCTION unsigned char *pdf_crypt_user_password(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_crypt_version()`. */
- FZ_FUNCTION int pdf_crypt_version(const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_cycle()`. */
- FZ_FUNCTION int pdf_cycle(const PdfCycleList& here, const PdfCycleList& prev, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_debug_doc_changes()`. */
- FZ_FUNCTION void pdf_debug_doc_changes(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_debug_obj()`. */
- FZ_FUNCTION void pdf_debug_obj(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_debug_ref()`. */
- FZ_FUNCTION void pdf_debug_ref(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_decode_cmap()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_decode_cmap(::pdf_cmap *cmap, unsigned char *s, unsigned char *e)` => `(int, unsigned int cpt)`
- */
- FZ_FUNCTION int pdf_decode_cmap(const PdfCmap& cmap, unsigned char *s, unsigned char *e, unsigned int *cpt);
- /** Class-aware wrapper for `::pdf_deep_copy_obj()`. */
- FZ_FUNCTION PdfObj pdf_deep_copy_obj(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_delete_annot()`. */
- FZ_FUNCTION void pdf_delete_annot(const PdfPage& page, const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_delete_link()`. */
- FZ_FUNCTION void pdf_delete_link(const PdfPage& page, const FzLink& link);
- /** Class-aware wrapper for `::pdf_delete_object()`. */
- FZ_FUNCTION void pdf_delete_object(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_delete_page()`. */
- FZ_FUNCTION void pdf_delete_page(const PdfDocument& doc, int number);
- /** Class-aware wrapper for `::pdf_delete_page_labels()`. */
- FZ_FUNCTION void pdf_delete_page_labels(const PdfDocument& doc, int index);
- /** Class-aware wrapper for `::pdf_delete_page_range()`. */
- FZ_FUNCTION void pdf_delete_page_range(const PdfDocument& doc, int start, int end);
- /** Class-aware wrapper for `::pdf_deselect_layer_config_ui()`. */
- FZ_FUNCTION void pdf_deselect_layer_config_ui(const PdfDocument& doc, int ui);
- /** Class-aware wrapper for `::pdf_deserialise_journal()`. */
- FZ_FUNCTION void pdf_deserialise_journal(const PdfDocument& doc, const FzStream& stm);
- /** Class-aware wrapper for `::pdf_dict_del()`. */
- FZ_FUNCTION void pdf_dict_del(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_dels()`. */
- FZ_FUNCTION void pdf_dict_dels(const PdfObj& dict, const char *key);
- /** Class-aware wrapper for `::pdf_dict_get()`. */
- FZ_FUNCTION PdfObj pdf_dict_get(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_bool()`. */
- FZ_FUNCTION int pdf_dict_get_bool(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_bool_default()`. */
- FZ_FUNCTION int pdf_dict_get_bool_default(const PdfObj& dict, const PdfObj& key, int def);
- /** Class-aware wrapper for `::pdf_dict_get_date()`. */
- FZ_FUNCTION int64_t pdf_dict_get_date(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_inheritable()`. */
- FZ_FUNCTION PdfObj pdf_dict_get_inheritable(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_inheritable_bool()`. */
- FZ_FUNCTION int pdf_dict_get_inheritable_bool(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_inheritable_date()`. */
- FZ_FUNCTION int64_t pdf_dict_get_inheritable_date(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_inheritable_int()`. */
- FZ_FUNCTION int pdf_dict_get_inheritable_int(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_inheritable_int64()`. */
- FZ_FUNCTION int64_t pdf_dict_get_inheritable_int64(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_inheritable_matrix()`. */
- FZ_FUNCTION FzMatrix pdf_dict_get_inheritable_matrix(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_inheritable_name()`. */
- FZ_FUNCTION const char *pdf_dict_get_inheritable_name(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_inheritable_real()`. */
- FZ_FUNCTION float pdf_dict_get_inheritable_real(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_inheritable_rect()`. */
- FZ_FUNCTION FzRect pdf_dict_get_inheritable_rect(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_inheritable_string()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_dict_get_inheritable_string(::pdf_obj *dict, ::pdf_obj *key)` => `(const char *, size_t sizep)`
- */
- FZ_FUNCTION const char *pdf_dict_get_inheritable_string(const PdfObj& dict, const PdfObj& key, size_t *sizep);
- /** Class-aware wrapper for `::pdf_dict_get_inheritable_text_string()`. */
- FZ_FUNCTION const char *pdf_dict_get_inheritable_text_string(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_int()`. */
- FZ_FUNCTION int pdf_dict_get_int(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_int64()`. */
- FZ_FUNCTION int64_t pdf_dict_get_int64(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_int_default()`. */
- FZ_FUNCTION int pdf_dict_get_int_default(const PdfObj& dict, const PdfObj& key, int def);
- /** Class-aware wrapper for `::pdf_dict_get_key()`. */
- FZ_FUNCTION PdfObj pdf_dict_get_key(const PdfObj& dict, int idx);
- /** Class-aware wrapper for `::pdf_dict_get_matrix()`. */
- FZ_FUNCTION FzMatrix pdf_dict_get_matrix(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_name()`. */
- FZ_FUNCTION const char *pdf_dict_get_name(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_point()`. */
- FZ_FUNCTION FzPoint pdf_dict_get_point(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_real()`. */
- FZ_FUNCTION float pdf_dict_get_real(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_real_default()`. */
- FZ_FUNCTION float pdf_dict_get_real_default(const PdfObj& dict, const PdfObj& key, float def);
- /** Class-aware wrapper for `::pdf_dict_get_rect()`. */
- FZ_FUNCTION FzRect pdf_dict_get_rect(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_string()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_dict_get_string(::pdf_obj *dict, ::pdf_obj *key)` => `(const char *, size_t sizep)`
- */
- FZ_FUNCTION const char *pdf_dict_get_string(const PdfObj& dict, const PdfObj& key, size_t *sizep);
- /** Class-aware wrapper for `::pdf_dict_get_text_string()`. */
- FZ_FUNCTION const char *pdf_dict_get_text_string(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_text_string_opt()`. */
- FZ_FUNCTION const char *pdf_dict_get_text_string_opt(const PdfObj& dict, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_dict_get_val()`. */
- FZ_FUNCTION PdfObj pdf_dict_get_val(const PdfObj& dict, int idx);
- /** Class-aware wrapper for `::pdf_dict_geta()`. */
- FZ_FUNCTION PdfObj pdf_dict_geta(const PdfObj& dict, const PdfObj& key, const PdfObj& abbrev);
- /** Class-aware wrapper for `::pdf_dict_getp()`. */
- FZ_FUNCTION PdfObj pdf_dict_getp(const PdfObj& dict, const char *path);
- /** Class-aware wrapper for `::pdf_dict_getp_inheritable()`. */
- FZ_FUNCTION PdfObj pdf_dict_getp_inheritable(const PdfObj& dict, const char *path);
- /** Class-aware wrapper for `::pdf_dict_gets()`. */
- FZ_FUNCTION PdfObj pdf_dict_gets(const PdfObj& dict, const char *key);
- /** Class-aware wrapper for `::pdf_dict_gets_inheritable()`. */
- FZ_FUNCTION PdfObj pdf_dict_gets_inheritable(const PdfObj& dict, const char *key);
- /** Class-aware wrapper for `::pdf_dict_getsa()`. */
- FZ_FUNCTION PdfObj pdf_dict_getsa(const PdfObj& dict, const char *key, const char *abbrev);
- /** Class-aware wrapper for `::pdf_dict_len()`. */
- FZ_FUNCTION int pdf_dict_len(const PdfObj& dict);
- /** Class-aware wrapper for `::pdf_dict_put()`. */
- FZ_FUNCTION void pdf_dict_put(const PdfObj& dict, const PdfObj& key, const PdfObj& val);
- /** Class-aware wrapper for `::pdf_dict_put_array()`. */
- FZ_FUNCTION PdfObj pdf_dict_put_array(const PdfObj& dict, const PdfObj& key, int initial);
- /** Class-aware wrapper for `::pdf_dict_put_bool()`. */
- FZ_FUNCTION void pdf_dict_put_bool(const PdfObj& dict, const PdfObj& key, int x);
- /** Class-aware wrapper for `::pdf_dict_put_date()`. */
- FZ_FUNCTION void pdf_dict_put_date(const PdfObj& dict, const PdfObj& key, int64_t time);
- /** Class-aware wrapper for `::pdf_dict_put_dict()`. */
- FZ_FUNCTION PdfObj pdf_dict_put_dict(const PdfObj& dict, const PdfObj& key, int initial);
- /** Class-aware wrapper for `::pdf_dict_put_indirect()`. */
- FZ_FUNCTION void pdf_dict_put_indirect(const PdfObj& dict, const PdfObj& key, int num);
- /** Class-aware wrapper for `::pdf_dict_put_int()`. */
- FZ_FUNCTION void pdf_dict_put_int(const PdfObj& dict, const PdfObj& key, int64_t x);
- /** Class-aware wrapper for `::pdf_dict_put_matrix()`. */
- FZ_FUNCTION void pdf_dict_put_matrix(const PdfObj& dict, const PdfObj& key, const FzMatrix& x);
- /** Class-aware wrapper for `::pdf_dict_put_name()`. */
- FZ_FUNCTION void pdf_dict_put_name(const PdfObj& dict, const PdfObj& key, const char *x);
- /** Class-aware wrapper for `::pdf_dict_put_point()`. */
- FZ_FUNCTION void pdf_dict_put_point(const PdfObj& dict, const PdfObj& key, const FzPoint& x);
- /** Class-aware wrapper for `::pdf_dict_put_real()`. */
- FZ_FUNCTION void pdf_dict_put_real(const PdfObj& dict, const PdfObj& key, double x);
- /** Class-aware wrapper for `::pdf_dict_put_rect()`. */
- FZ_FUNCTION void pdf_dict_put_rect(const PdfObj& dict, const PdfObj& key, const FzRect& x);
- /** Class-aware wrapper for `::pdf_dict_put_string()`. */
- FZ_FUNCTION void pdf_dict_put_string(const PdfObj& dict, const PdfObj& key, const char *x, size_t n);
- /** Class-aware wrapper for `::pdf_dict_put_text_string()`. */
- FZ_FUNCTION void pdf_dict_put_text_string(const PdfObj& dict, const PdfObj& key, const char *x);
- /** Class-aware wrapper for `::pdf_dict_put_val_null()`. */
- FZ_FUNCTION void pdf_dict_put_val_null(const PdfObj& obj, int idx);
- /** Class-aware wrapper for `::pdf_dict_putp()`. */
- FZ_FUNCTION void pdf_dict_putp(const PdfObj& dict, const char *path, const PdfObj& val);
- /** Class-aware wrapper for `::pdf_dict_puts()`. */
- FZ_FUNCTION void pdf_dict_puts(const PdfObj& dict, const char *key, const PdfObj& val);
- /** Class-aware wrapper for `::pdf_dict_puts_dict()`. */
- FZ_FUNCTION PdfObj pdf_dict_puts_dict(const PdfObj& dict, const char *key, int initial);
- /** Class-aware wrapper for `::pdf_dirty_annot()`. */
- FZ_FUNCTION void pdf_dirty_annot(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_dirty_obj()`. */
- FZ_FUNCTION void pdf_dirty_obj(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_disable_js()`. */
- FZ_FUNCTION void pdf_disable_js(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_discard_journal()`. */
- FZ_FUNCTION void pdf_discard_journal(const PdfJournal& journal);
- /** Class-aware wrapper for `::pdf_doc_was_linearized()`. */
- FZ_FUNCTION int pdf_doc_was_linearized(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_document_associated_file()`. */
- FZ_FUNCTION PdfObj pdf_document_associated_file(const PdfDocument& doc, int idx);
- /** Class-aware wrapper for `::pdf_document_event_did_print()`. */
- FZ_FUNCTION void pdf_document_event_did_print(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_document_event_did_save()`. */
- FZ_FUNCTION void pdf_document_event_did_save(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_document_event_will_close()`. */
- FZ_FUNCTION void pdf_document_event_will_close(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_document_event_will_print()`. */
- FZ_FUNCTION void pdf_document_event_will_print(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_document_event_will_save()`. */
- FZ_FUNCTION void pdf_document_event_will_save(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_document_from_fz_document()`. */
- FZ_FUNCTION PdfDocument pdf_document_from_fz_document(const FzDocument& ptr);
- /** Class-aware wrapper for `::pdf_document_language()`. */
- FZ_FUNCTION ::fz_text_language pdf_document_language(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_document_output_intent()`. */
- FZ_FUNCTION FzColorspace pdf_document_output_intent(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_document_permissions()`. */
- FZ_FUNCTION int pdf_document_permissions(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_edit_text_field_value()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_edit_text_field_value(::pdf_annot *widget, const char *value, const char *change)` => `(int, int selStart, int selEnd, char *newvalue)`
- */
- FZ_FUNCTION int pdf_edit_text_field_value(const PdfAnnot& widget, const char *value, const char *change, int *selStart, int *selEnd, char **newvalue);
- /** Class-aware wrapper for `::pdf_empty_store()`. */
- FZ_FUNCTION void pdf_empty_store(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_enable_journal()`. */
- FZ_FUNCTION void pdf_enable_journal(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_enable_js()`. */
- FZ_FUNCTION void pdf_enable_js(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_enable_layer()`. */
- FZ_FUNCTION void pdf_enable_layer(const PdfDocument& doc, int layer, int enabled);
- /** Class-aware wrapper for `::pdf_encrypt_data()`. */
- FZ_FUNCTION void pdf_encrypt_data(const PdfCrypt& crypt, int num, int gen, void (*fmt_str_out)(::fz_context *, void *, const unsigned char *, size_t ), void *arg, const unsigned char *s, size_t n);
- /** Class-aware wrapper for `::pdf_encrypted_len()`. */
- FZ_FUNCTION size_t pdf_encrypted_len(const PdfCrypt& crypt, int num, int gen, size_t len);
- /** Class-aware wrapper for `::pdf_end_hmtx()`. */
- FZ_FUNCTION void pdf_end_hmtx(const PdfFontDesc& font);
- /** Class-aware wrapper for `::pdf_end_operation()`. */
- FZ_FUNCTION void pdf_end_operation(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_end_vmtx()`. */
- FZ_FUNCTION void pdf_end_vmtx(const PdfFontDesc& font);
- /** Class-aware wrapper for `::pdf_ensure_solid_xref()`. */
- FZ_FUNCTION void pdf_ensure_solid_xref(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_eval_function()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_eval_function(::pdf_function *func, const float *in, int inlen, int outlen)` => float out
- */
- FZ_FUNCTION void pdf_eval_function(const PdfFunction& func, const float *in, int inlen, float *out, int outlen);
- /** Class-aware wrapper for `::pdf_event_issue_alert()`. */
- FZ_FUNCTION void pdf_event_issue_alert(const PdfDocument& doc, const PdfAlertEvent& evt);
- /** Class-aware wrapper for `::pdf_event_issue_exec_menu_item()`. */
- FZ_FUNCTION void pdf_event_issue_exec_menu_item(const PdfDocument& doc, const char *item);
- /** Class-aware wrapper for `::pdf_event_issue_launch_url()`. */
- FZ_FUNCTION void pdf_event_issue_launch_url(const PdfDocument& doc, const char *url, int new_frame);
- /** Class-aware wrapper for `::pdf_event_issue_mail_doc()`. */
- FZ_FUNCTION void pdf_event_issue_mail_doc(const PdfDocument& doc, const PdfMailDocEvent& evt);
- /** Class-aware wrapper for `::pdf_event_issue_print()`. */
- FZ_FUNCTION void pdf_event_issue_print(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_field_border_style()`. */
- FZ_FUNCTION char *pdf_field_border_style(const PdfObj& field);
- /** Class-aware wrapper for `::pdf_field_display()`. */
- FZ_FUNCTION int pdf_field_display(const PdfObj& field);
- /** Class-aware wrapper for `::pdf_field_event_calculate()`. */
- FZ_FUNCTION void pdf_field_event_calculate(const PdfDocument& doc, const PdfObj& field);
- /** Class-aware wrapper for `::pdf_field_event_format()`. */
- FZ_FUNCTION char *pdf_field_event_format(const PdfDocument& doc, const PdfObj& field);
- /** Class-aware wrapper for `::pdf_field_event_keystroke()`. */
- FZ_FUNCTION int pdf_field_event_keystroke(const PdfDocument& doc, const PdfObj& field, const PdfKeystrokeEvent& evt);
- /** Class-aware wrapper for `::pdf_field_event_validate()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_field_event_validate(::pdf_document *doc, ::pdf_obj *field, const char *value)` => `(int, char *newvalue)`
- */
- FZ_FUNCTION int pdf_field_event_validate(const PdfDocument& doc, const PdfObj& field, const char *value, char **newvalue);
- /** Class-aware wrapper for `::pdf_field_flags()`. */
- FZ_FUNCTION int pdf_field_flags(const PdfObj& field);
- /** Class-aware wrapper for `::pdf_field_label()`. */
- FZ_FUNCTION const char *pdf_field_label(const PdfObj& field);
- /** Class-aware wrapper for `::pdf_field_reset()`. */
- FZ_FUNCTION void pdf_field_reset(const PdfDocument& doc, const PdfObj& field);
- /** Class-aware wrapper for `::pdf_field_set_border_style()`. */
- FZ_FUNCTION void pdf_field_set_border_style(const PdfObj& field, const char *text);
- /** Class-aware wrapper for `::pdf_field_set_button_caption()`. */
- FZ_FUNCTION void pdf_field_set_button_caption(const PdfObj& field, const char *text);
- /** Class-aware wrapper for `::pdf_field_set_display()`. */
- FZ_FUNCTION void pdf_field_set_display(const PdfObj& field, int d);
- /** Class-aware wrapper for `::pdf_field_set_fill_color()`. */
- FZ_FUNCTION void pdf_field_set_fill_color(const PdfObj& field, const PdfObj& col);
- /** Class-aware wrapper for `::pdf_field_set_text_color()`. */
- FZ_FUNCTION void pdf_field_set_text_color(const PdfObj& field, const PdfObj& col);
- /** Class-aware wrapper for `::pdf_field_type()`. */
- FZ_FUNCTION int pdf_field_type(const PdfObj& field);
- /** Class-aware wrapper for `::pdf_field_type_string()`. */
- FZ_FUNCTION const char *pdf_field_type_string(const PdfObj& field);
- /** Class-aware wrapper for `::pdf_field_value()`. */
- FZ_FUNCTION const char *pdf_field_value(const PdfObj& field);
- /** Class-aware wrapper for `::pdf_filter_annot_contents()`. */
- FZ_FUNCTION void pdf_filter_annot_contents(const PdfDocument& doc, const PdfAnnot& annot, PdfFilterOptions& options);
- /** Class-aware wrapper for `::pdf_filter_page_contents()`. */
- FZ_FUNCTION void pdf_filter_page_contents(const PdfDocument& doc, const PdfPage& page, PdfFilterOptions& options);
- /** Class-aware wrapper for `::pdf_filter_xobject_instance()`. */
- FZ_FUNCTION PdfObj pdf_filter_xobject_instance(const PdfObj& old_xobj, const PdfObj& page_res, const FzMatrix& ctm, PdfFilterOptions& options, const PdfCycleList& cycle_up);
- /** Class-aware wrapper for `::pdf_find_colorspace_resource()`. */
- FZ_FUNCTION PdfObj pdf_find_colorspace_resource(const PdfDocument& doc, const FzColorspace& item, const PdfColorspaceResourceKey& key);
- /** Class-aware wrapper for `::pdf_find_font_resource()`. */
- FZ_FUNCTION PdfObj pdf_find_font_resource(const PdfDocument& doc, int type, int encoding, const FzFont& item, const PdfFontResourceKey& key);
- /** Class-aware wrapper for `::pdf_find_item()`. */
- FZ_FUNCTION void *pdf_find_item(::fz_store_drop_fn *drop, const PdfObj& key);
- /* Class-aware wrapper for `pdf_find_locked_fields()`
- is not available because returned wrapper class for `pdf_locked_fields`
- is non-copyable. */
- /* Class-aware wrapper for `pdf_find_locked_fields_for_sig()`
- is not available because returned wrapper class for `pdf_locked_fields`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_find_version_for_obj()`. */
- FZ_FUNCTION int pdf_find_version_for_obj(const PdfDocument& doc, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_first_annot()`. */
- FZ_FUNCTION PdfAnnot pdf_first_annot(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_first_widget()`. */
- FZ_FUNCTION PdfAnnot pdf_first_widget(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_flatten_inheritable_page_items()`. */
- FZ_FUNCTION void pdf_flatten_inheritable_page_items(const PdfObj& page);
- /** Class-aware wrapper for `::pdf_font_cid_to_gid()`. */
- FZ_FUNCTION int pdf_font_cid_to_gid(const PdfFontDesc& fontdesc, int cid);
- /** Class-aware wrapper for `::pdf_font_writing_supported()`. */
- FZ_FUNCTION int pdf_font_writing_supported(const FzFont& font);
- /** Class-aware wrapper for `::pdf_forget_xref()`. */
- FZ_FUNCTION void pdf_forget_xref(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_format_date()`. */
- FZ_FUNCTION char *pdf_format_date(int64_t time, char *s, size_t n);
- /** Class-aware wrapper for `::pdf_format_write_options()`. */
- FZ_FUNCTION char *pdf_format_write_options(char *buffer, size_t buffer_len, PdfWriteOptions& opts);
- /** Class-aware wrapper for `::pdf_function_size()`. */
- FZ_FUNCTION size_t pdf_function_size(const PdfFunction& func);
- /** Class-aware wrapper for `::pdf_get_bound_document()`. */
- FZ_FUNCTION PdfDocument pdf_get_bound_document(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_get_doc_event_callback_data()`. */
- FZ_FUNCTION void *pdf_get_doc_event_callback_data(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_get_filespec_params()`. */
- FZ_FUNCTION void pdf_get_filespec_params(const PdfObj& fs, const PdfFilespecParams& out);
- /* Class-aware wrapper for `pdf_get_incremental_xref_entry()`
- is not available because returned wrapper class for `pdf_xref_entry`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_get_indirect_document()`. */
- FZ_FUNCTION PdfDocument pdf_get_indirect_document(const PdfObj& obj);
- /* Class-aware wrapper for `pdf_get_populating_xref_entry()`
- is not available because returned wrapper class for `pdf_xref_entry`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_get_widget_editing_state()`. */
- FZ_FUNCTION int pdf_get_widget_editing_state(const PdfAnnot& widget);
- /* Class-aware wrapper for `pdf_get_xref_entry()`
- is not available because returned wrapper class for `pdf_xref_entry`
- is non-copyable. */
- /* Class-aware wrapper for `pdf_get_xref_entry_no_change()`
- is not available because returned wrapper class for `pdf_xref_entry`
- is non-copyable. */
- /* Class-aware wrapper for `pdf_get_xref_entry_no_null()`
- is not available because returned wrapper class for `pdf_xref_entry`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_graft_mapped_object()`. */
- FZ_FUNCTION PdfObj pdf_graft_mapped_object(const PdfGraftMap& map, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_graft_mapped_page()`. */
- FZ_FUNCTION void pdf_graft_mapped_page(const PdfGraftMap& map, int page_to, const PdfDocument& src, int page_from);
- /** Class-aware wrapper for `::pdf_graft_object()`. */
- FZ_FUNCTION PdfObj pdf_graft_object(const PdfDocument& dst, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_graft_page()`. */
- FZ_FUNCTION void pdf_graft_page(const PdfDocument& dst, int page_to, const PdfDocument& src, int page_from);
- /** Class-aware wrapper for `::pdf_has_permission()`. */
- FZ_FUNCTION int pdf_has_permission(const PdfDocument& doc, ::fz_permission p);
- /** Class-aware wrapper for `::pdf_has_unsaved_changes()`. */
- FZ_FUNCTION int pdf_has_unsaved_changes(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_has_unsaved_sigs()`. */
- FZ_FUNCTION int pdf_has_unsaved_sigs(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_incremental_change_since_signing_widget()`. */
- FZ_FUNCTION int pdf_incremental_change_since_signing_widget(const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_insert_colorspace_resource()`. */
- FZ_FUNCTION PdfObj pdf_insert_colorspace_resource(const PdfDocument& doc, const PdfColorspaceResourceKey& key, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_insert_font_resource()`. */
- FZ_FUNCTION PdfObj pdf_insert_font_resource(const PdfDocument& doc, const PdfFontResourceKey& key, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_insert_page()`. */
- FZ_FUNCTION void pdf_insert_page(const PdfDocument& doc, int at, const PdfObj& page);
- /** Class-aware wrapper for `::pdf_intent_from_name()`. */
- FZ_FUNCTION enum pdf_intent pdf_intent_from_name(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_intent_from_string()`. */
- FZ_FUNCTION enum pdf_intent pdf_intent_from_string(const char *str);
- /** Class-aware wrapper for `::pdf_invalidate_xfa()`. */
- FZ_FUNCTION void pdf_invalidate_xfa(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_is_array()`. */
- FZ_FUNCTION int pdf_is_array(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_bool()`. */
- FZ_FUNCTION int pdf_is_bool(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_dict()`. */
- FZ_FUNCTION int pdf_is_dict(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_embedded_file()`. */
- FZ_FUNCTION int pdf_is_embedded_file(const PdfObj& fs);
- /** Class-aware wrapper for `::pdf_is_field_locked()`. */
- FZ_FUNCTION int pdf_is_field_locked(const PdfLockedFields& locked, const char *name);
- /** Class-aware wrapper for `::pdf_is_filespec()`. */
- FZ_FUNCTION int pdf_is_filespec(const PdfObj& fs);
- /** Class-aware wrapper for `::pdf_is_image_stream()`. */
- FZ_FUNCTION int pdf_is_image_stream(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_indirect()`. */
- FZ_FUNCTION int pdf_is_indirect(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_int()`. */
- FZ_FUNCTION int pdf_is_int(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_jpx_image()`. */
- FZ_FUNCTION int pdf_is_jpx_image(const PdfObj& dict);
- /** Class-aware wrapper for `::pdf_is_local_object()`. */
- FZ_FUNCTION int pdf_is_local_object(const PdfDocument& doc, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_name()`. */
- FZ_FUNCTION int pdf_is_name(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_null()`. */
- FZ_FUNCTION int pdf_is_null(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_number()`. */
- FZ_FUNCTION int pdf_is_number(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_ocg_hidden()`. */
- FZ_FUNCTION int pdf_is_ocg_hidden(const PdfDocument& doc, const PdfResourceStack& rdb, const char *usage, const PdfObj& ocg);
- /** Class-aware wrapper for `::pdf_is_real()`. */
- FZ_FUNCTION int pdf_is_real(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_stream()`. */
- FZ_FUNCTION int pdf_is_stream(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_string()`. */
- FZ_FUNCTION int pdf_is_string(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_is_tint_colorspace()`. */
- FZ_FUNCTION int pdf_is_tint_colorspace(const FzColorspace& cs);
- /** Class-aware wrapper for `::pdf_js_event_init()`. */
- FZ_FUNCTION void pdf_js_event_init(const PdfJs& js, const PdfObj& target, const char *value, int willCommit);
- /** Class-aware wrapper for `::pdf_js_event_init_keystroke()`. */
- FZ_FUNCTION void pdf_js_event_init_keystroke(const PdfJs& js, const PdfObj& target, const PdfKeystrokeEvent& evt);
- /** Class-aware wrapper for `::pdf_js_event_result()`. */
- FZ_FUNCTION int pdf_js_event_result(const PdfJs& js);
- /** Class-aware wrapper for `::pdf_js_event_result_keystroke()`. */
- FZ_FUNCTION int pdf_js_event_result_keystroke(const PdfJs& js, const PdfKeystrokeEvent& evt);
- /** Class-aware wrapper for `::pdf_js_event_result_validate()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_js_event_result_validate(::pdf_js *js)` => `(int, char *newvalue)`
- */
- FZ_FUNCTION int pdf_js_event_result_validate(const PdfJs& js, char **newvalue);
- /** Class-aware wrapper for `::pdf_js_event_value()`. */
- FZ_FUNCTION char *pdf_js_event_value(const PdfJs& js);
- /** Class-aware wrapper for `::pdf_js_execute()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_js_execute(::pdf_js *js, const char *name, const char *code)` => char *result
- */
- FZ_FUNCTION void pdf_js_execute(const PdfJs& js, const char *name, const char *code, char **result);
- /* Class-aware wrapper for `pdf_js_get_console()`
- is not available because returned wrapper class for `pdf_js_console`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_js_set_console()`. */
- FZ_FUNCTION void pdf_js_set_console(const PdfDocument& doc, const PdfJsConsole& console, void *user);
- /** Class-aware wrapper for `::pdf_js_supported()`. */
- FZ_FUNCTION int pdf_js_supported(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_label_object()`. */
- FZ_FUNCTION void pdf_label_object(const PdfObjectLabels& g, int num, ::pdf_label_object_fn *callback, void *arg);
- /** Class-aware wrapper for `::pdf_layer_config_info()`. */
- FZ_FUNCTION void pdf_layer_config_info(const PdfDocument& doc, int config_num, PdfLayerConfig& info);
- /** Class-aware wrapper for `::pdf_layer_config_ui_info()`. */
- FZ_FUNCTION void pdf_layer_config_ui_info(const PdfDocument& doc, int ui, PdfLayerConfigUi& info);
- /** Class-aware wrapper for `::pdf_layer_is_enabled()`. */
- FZ_FUNCTION int pdf_layer_is_enabled(const PdfDocument& doc, int layer);
- /** Class-aware wrapper for `::pdf_layer_name()`. */
- FZ_FUNCTION const char *pdf_layer_name(const PdfDocument& doc, int layer);
- /** Class-aware wrapper for `::pdf_layout_fit_text()`. */
- FZ_FUNCTION FzText pdf_layout_fit_text(const FzFont& font, ::fz_text_language lang, const char *str, const FzRect& bounds);
- /* Class-aware wrapper for `pdf_layout_text_widget()`
- is not available because returned wrapper class for `fz_layout_block`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_lex()`. */
- FZ_FUNCTION ::pdf_token pdf_lex(const FzStream& f, const PdfLexbuf& lexbuf);
- /** Class-aware wrapper for `::pdf_lex_no_string()`. */
- FZ_FUNCTION ::pdf_token pdf_lex_no_string(const FzStream& f, const PdfLexbuf& lexbuf);
- /** Class-aware wrapper for `::pdf_lexbuf_fin()`. */
- FZ_FUNCTION void pdf_lexbuf_fin(const PdfLexbuf& lexbuf);
- /** Class-aware wrapper for `::pdf_lexbuf_grow()`. */
- FZ_FUNCTION ptrdiff_t pdf_lexbuf_grow(const PdfLexbuf& lexbuf);
- /** Class-aware wrapper for `::pdf_lexbuf_init()`. */
- FZ_FUNCTION void pdf_lexbuf_init(const PdfLexbuf& lexbuf, int size);
- /** Class-aware wrapper for `::pdf_line_ending_from_name()`. */
- FZ_FUNCTION enum pdf_line_ending pdf_line_ending_from_name(const PdfObj& end);
- /** Class-aware wrapper for `::pdf_line_ending_from_string()`. */
- FZ_FUNCTION enum pdf_line_ending pdf_line_ending_from_string(const char *end);
- /** Class-aware wrapper for `::pdf_load_builtin_cmap()`. */
- FZ_FUNCTION PdfCmap pdf_load_builtin_cmap(const char *name);
- /** Class-aware wrapper for `::pdf_load_cmap()`. */
- FZ_FUNCTION PdfCmap pdf_load_cmap(const FzStream& file);
- /** Class-aware wrapper for `::pdf_load_colorspace()`. */
- FZ_FUNCTION FzColorspace pdf_load_colorspace(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_load_compressed_inline_image()`. */
- FZ_FUNCTION void pdf_load_compressed_inline_image(const PdfDocument& doc, const PdfObj& dict, int length, const FzStream& cstm, int indexed, const FzCompressedImage& image);
- /** Class-aware wrapper for `::pdf_load_compressed_stream()`. */
- FZ_FUNCTION FzCompressedBuffer pdf_load_compressed_stream(const PdfDocument& doc, int num, size_t worst_case);
- /** Class-aware wrapper for `::pdf_load_default_colorspaces()`. */
- FZ_FUNCTION FzDefaultColorspaces pdf_load_default_colorspaces(const PdfDocument& doc, const PdfPage& page);
- /** Class-aware wrapper for `::pdf_load_embedded_cmap()`. */
- FZ_FUNCTION PdfCmap pdf_load_embedded_cmap(const PdfDocument& doc, const PdfObj& ref);
- /** Class-aware wrapper for `::pdf_load_embedded_file_contents()`. */
- FZ_FUNCTION FzBuffer pdf_load_embedded_file_contents(const PdfObj& fs);
- /** Class-aware wrapper for `::pdf_load_encoding()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_load_encoding(const char *encoding)` => const char *estrings
- */
- FZ_FUNCTION void pdf_load_encoding(const char **estrings, const char *encoding);
- /** Class-aware wrapper for `::pdf_load_field_name()`. */
- FZ_FUNCTION char *pdf_load_field_name(const PdfObj& field);
- /** Alternative to `pdf_load_field_name()` that returns a std::string. */
- FZ_FUNCTION std::string pdf_load_field_name2(PdfObj& field);
- /* Class-aware wrapper for `pdf_load_font()`
- is not available because returned wrapper class for `pdf_font_desc`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_load_function()`. */
- FZ_FUNCTION PdfFunction pdf_load_function(const PdfObj& ref, int in, int out);
- /* Class-aware wrapper for `pdf_load_hail_mary_font()`
- is not available because returned wrapper class for `pdf_font_desc`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_load_image()`. */
- FZ_FUNCTION FzImage pdf_load_image(const PdfDocument& doc, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_load_inline_image()`. */
- FZ_FUNCTION FzImage pdf_load_inline_image(const PdfDocument& doc, const PdfResourceStack& rdb, const PdfObj& dict, const FzStream& file);
- /** Class-aware wrapper for `::pdf_load_journal()`. */
- FZ_FUNCTION void pdf_load_journal(const PdfDocument& doc, const char *filename);
- /** Class-aware wrapper for `::pdf_load_link_annots()`. */
- FZ_FUNCTION FzLink pdf_load_link_annots(const PdfDocument& arg_0, const PdfPage& arg_1, const PdfObj& annots, int pagenum, const FzMatrix& page_ctm);
- /** Class-aware wrapper for `::pdf_load_links()`. */
- FZ_FUNCTION FzLink pdf_load_links(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_load_name_tree()`. */
- FZ_FUNCTION PdfObj pdf_load_name_tree(const PdfDocument& doc, const PdfObj& which);
- /** Class-aware wrapper for `::pdf_load_object()`. */
- /**
- Load a given object.
-
- This can cause xref reorganisations (solidifications etc) due to
- repairs, so all held pdf_xref_entries should be considered
- invalid after this call (other than the returned one).
- */
- FZ_FUNCTION PdfObj pdf_load_object(const PdfDocument& doc, int num);
- /* Class-aware wrapper for `pdf_load_object_labels()`
- is not available because returned wrapper class for `pdf_object_labels`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_load_outline()`. */
- FZ_FUNCTION FzOutline pdf_load_outline(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_load_page()`. */
- FZ_FUNCTION PdfPage pdf_load_page(const PdfDocument& doc, int number);
- /** Class-aware wrapper for `::pdf_load_page_imp()`. */
- FZ_FUNCTION FzPage pdf_load_page_imp(const FzDocument& doc, int chapter, int number);
- /** Class-aware wrapper for `::pdf_load_page_tree()`. */
- FZ_FUNCTION void pdf_load_page_tree(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_load_pattern()`. */
- FZ_FUNCTION PdfPattern pdf_load_pattern(const PdfDocument& doc, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_load_raw_stream()`. */
- FZ_FUNCTION FzBuffer pdf_load_raw_stream(const PdfObj& ref);
- /** Class-aware wrapper for `::pdf_load_raw_stream_number()`. */
- FZ_FUNCTION FzBuffer pdf_load_raw_stream_number(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_load_shading()`. */
- FZ_FUNCTION FzShade pdf_load_shading(const PdfDocument& doc, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_load_stream()`. */
- FZ_FUNCTION FzBuffer pdf_load_stream(const PdfObj& ref);
- /** Class-aware wrapper for `::pdf_load_stream_number()`. */
- FZ_FUNCTION FzBuffer pdf_load_stream_number(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_load_stream_or_string_as_utf8()`. */
- FZ_FUNCTION char *pdf_load_stream_or_string_as_utf8(const PdfObj& src);
- /** Class-aware wrapper for `::pdf_load_system_cmap()`. */
- FZ_FUNCTION PdfCmap pdf_load_system_cmap(const char *name);
- /** Class-aware wrapper for `::pdf_load_to_unicode()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_load_to_unicode(::pdf_document *doc, ::pdf_font_desc *font, char *collection, ::pdf_obj *cmapstm)` => const char *strings
- */
- FZ_FUNCTION void pdf_load_to_unicode(const PdfDocument& doc, const PdfFontDesc& font, const char **strings, char *collection, const PdfObj& cmapstm);
- /* Class-aware wrapper for `pdf_load_type3_font()`
- is not available because returned wrapper class for `pdf_font_desc`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_load_type3_glyphs()`. */
- FZ_FUNCTION void pdf_load_type3_glyphs(const PdfDocument& doc, const PdfFontDesc& fontdesc);
- /** Class-aware wrapper for `::pdf_load_unencrypted_object()`. */
- FZ_FUNCTION PdfObj pdf_load_unencrypted_object(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_lookup_cmap()`. */
- FZ_FUNCTION int pdf_lookup_cmap(const PdfCmap& cmap, unsigned int cpt);
- /** Class-aware wrapper for `::pdf_lookup_cmap_full()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_lookup_cmap_full(::pdf_cmap *cmap, unsigned int cpt)` => `(int, int out)`
- */
- FZ_FUNCTION int pdf_lookup_cmap_full(const PdfCmap& cmap, unsigned int cpt, int *out);
- /** Class-aware wrapper for `::pdf_lookup_dest()`. */
- FZ_FUNCTION PdfObj pdf_lookup_dest(const PdfDocument& doc, const PdfObj& needle);
- /** Class-aware wrapper for `::pdf_lookup_field()`. */
- FZ_FUNCTION PdfObj pdf_lookup_field(const PdfObj& form, const char *name);
- /* Class-aware wrapper for `pdf_lookup_hmtx()`
- is not available because returned wrapper class for `pdf_hmtx`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_lookup_metadata()`. */
- FZ_FUNCTION int pdf_lookup_metadata(const PdfDocument& doc, const char *key, char *ptr, size_t size);
- /** Class-aware wrapper for `::pdf_lookup_metadata2()`. */
- /**
- C++ alternative to `pdf_lookup_metadata()` that returns a `std::string`
- or calls `fz_throw()` if not found.
- */
- FZ_FUNCTION std::string pdf_lookup_metadata2(const PdfDocument& doc, const char *key);
- /** Class-aware wrapper for `::pdf_lookup_name()`. */
- FZ_FUNCTION PdfObj pdf_lookup_name(const PdfDocument& doc, const PdfObj& which, const PdfObj& needle);
- /** Class-aware wrapper for `::pdf_lookup_number()`. */
- FZ_FUNCTION PdfObj pdf_lookup_number(const PdfObj& root, int needle);
- /** Class-aware wrapper for `::pdf_lookup_page_loc()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_lookup_page_loc(::pdf_document *doc, int needle, ::pdf_obj **parentp)` => `(pdf_obj *, int indexp)`
- */
- FZ_FUNCTION PdfObj pdf_lookup_page_loc(const PdfDocument& doc, int needle, PdfObj& parentp, int *indexp);
- /** Class-aware wrapper for `::pdf_lookup_page_number()`. */
- FZ_FUNCTION int pdf_lookup_page_number(const PdfDocument& doc, const PdfObj& pageobj);
- /** Class-aware wrapper for `::pdf_lookup_page_obj()`. */
- FZ_FUNCTION PdfObj pdf_lookup_page_obj(const PdfDocument& doc, int needle);
- /** Class-aware wrapper for `::pdf_lookup_resource()`. */
- FZ_FUNCTION PdfObj pdf_lookup_resource(const PdfResourceStack& stack, const PdfObj& type, const char *name);
- /** Class-aware wrapper for `::pdf_lookup_substitute_font()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_lookup_substitute_font(int mono, int serif, int bold, int italic)` => `(const unsigned char *, int len)`
- */
- FZ_FUNCTION const unsigned char *pdf_lookup_substitute_font(int mono, int serif, int bold, int italic, int *len);
- /* Class-aware wrapper for `pdf_lookup_vmtx()`
- is not available because returned wrapper class for `pdf_vmtx`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_map_one_to_many()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_map_one_to_many(::pdf_cmap *cmap, unsigned int one, size_t len)` => int many
- */
- FZ_FUNCTION void pdf_map_one_to_many(const PdfCmap& cmap, unsigned int one, int *many, size_t len);
- /** Class-aware wrapper for `::pdf_map_range_to_range()`. */
- FZ_FUNCTION void pdf_map_range_to_range(const PdfCmap& cmap, unsigned int srclo, unsigned int srchi, int dstlo);
- /** Class-aware wrapper for `::pdf_mark_bits_reset()`. */
- FZ_FUNCTION void pdf_mark_bits_reset(const PdfMarkBits& marks);
- /** Class-aware wrapper for `::pdf_mark_bits_set()`. */
- FZ_FUNCTION int pdf_mark_bits_set(const PdfMarkBits& marks, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_mark_list_check()`. */
- FZ_FUNCTION int pdf_mark_list_check(const PdfMarkList& list, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_mark_list_free()`. */
- FZ_FUNCTION void pdf_mark_list_free(const PdfMarkList& list);
- /** Class-aware wrapper for `::pdf_mark_list_init()`. */
- FZ_FUNCTION void pdf_mark_list_init(const PdfMarkList& list);
- /** Class-aware wrapper for `::pdf_mark_list_pop()`. */
- FZ_FUNCTION void pdf_mark_list_pop(const PdfMarkList& list);
- /** Class-aware wrapper for `::pdf_mark_list_push()`. */
- FZ_FUNCTION int pdf_mark_list_push(const PdfMarkList& list, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_mark_obj()`. */
- FZ_FUNCTION int pdf_mark_obj(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_mark_xref()`. */
- FZ_FUNCTION void pdf_mark_xref(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_metadata()`. */
- FZ_FUNCTION PdfObj pdf_metadata(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_minimize_document()`. */
- FZ_FUNCTION void pdf_minimize_document(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_name_eq()`. */
- FZ_FUNCTION int pdf_name_eq(const PdfObj& a, const PdfObj& b);
- /** Class-aware wrapper for `::pdf_name_from_intent()`. */
- FZ_FUNCTION PdfObj pdf_name_from_intent(enum pdf_intent intent);
- /** Class-aware wrapper for `::pdf_name_from_line_ending()`. */
- FZ_FUNCTION PdfObj pdf_name_from_line_ending(enum pdf_line_ending end);
- /** Class-aware wrapper for `::pdf_needs_password()`. */
- FZ_FUNCTION int pdf_needs_password(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_new_action_from_link()`. */
- FZ_FUNCTION PdfObj pdf_new_action_from_link(const PdfDocument& doc, const char *uri);
- /** Class-aware wrapper for `::pdf_new_array()`. */
- FZ_FUNCTION PdfObj pdf_new_array(const PdfDocument& doc, int initialcap);
- /** Class-aware wrapper for `::pdf_new_buffer_processor()`. */
- FZ_FUNCTION PdfProcessor pdf_new_buffer_processor(const FzBuffer& buffer, int ahxencode, int newlines);
- /** Class-aware wrapper for `::pdf_new_cmap()`. */
- FZ_FUNCTION PdfCmap pdf_new_cmap();
- /** Class-aware wrapper for `::pdf_new_color_filter()`. */
- FZ_FUNCTION PdfProcessor pdf_new_color_filter(const PdfDocument& doc, const PdfProcessor& chain, int struct_parents, const FzMatrix& transform, PdfFilterOptions& options, void *copts);
- /* Class-aware wrapper for `pdf_new_crypt()`
- is not available because returned wrapper class for `pdf_crypt`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_new_date()`. */
- FZ_FUNCTION PdfObj pdf_new_date(const PdfDocument& doc, int64_t time);
- /** Class-aware wrapper for `::pdf_new_dest_from_link()`. */
- FZ_FUNCTION PdfObj pdf_new_dest_from_link(const PdfDocument& doc, const char *uri, int is_remote);
- /** Class-aware wrapper for `::pdf_new_dict()`. */
- FZ_FUNCTION PdfObj pdf_new_dict(const PdfDocument& doc, int initialcap);
- /** Class-aware wrapper for `::pdf_new_display_list_from_annot()`. */
- FZ_FUNCTION FzDisplayList pdf_new_display_list_from_annot(const PdfAnnot& annot);
- /* Class-aware wrapper for `pdf_new_encrypt()`
- is not available because returned wrapper class for `pdf_crypt`
- is non-copyable. */
- /* Class-aware wrapper for `pdf_new_font_desc()`
- is not available because returned wrapper class for `pdf_font_desc`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_new_graft_map()`. */
- FZ_FUNCTION PdfGraftMap pdf_new_graft_map(const PdfDocument& dst);
- /** Class-aware wrapper for `::pdf_new_identity_cmap()`. */
- FZ_FUNCTION PdfCmap pdf_new_identity_cmap(int wmode, int bytes);
- /** Class-aware wrapper for `::pdf_new_indirect()`. */
- FZ_FUNCTION PdfObj pdf_new_indirect(const PdfDocument& doc, int num, int gen);
- /** Class-aware wrapper for `::pdf_new_int()`. */
- FZ_FUNCTION PdfObj pdf_new_int(int64_t i);
- /** Class-aware wrapper for `::pdf_new_link()`. */
- FZ_FUNCTION FzLink pdf_new_link(const PdfPage& page, const FzRect& rect, const char *uri, const PdfObj& obj);
- /* Class-aware wrapper for `pdf_new_local_xref()`
- is not available because returned wrapper class for `pdf_xref`
- is non-copyable. */
- /* Class-aware wrapper for `pdf_new_mark_bits()`
- is not available because returned wrapper class for `pdf_mark_bits`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_new_matrix()`. */
- FZ_FUNCTION PdfObj pdf_new_matrix(const PdfDocument& doc, const FzMatrix& mtx);
- /** Class-aware wrapper for `::pdf_new_name()`. */
- FZ_FUNCTION PdfObj pdf_new_name(const char *str);
- /* Class-aware wrapper for `pdf_new_outline_iterator()`
- is not available because returned wrapper class for `fz_outline_iterator`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_new_output_processor()`. */
- FZ_FUNCTION PdfProcessor pdf_new_output_processor(const FzOutput& out, int ahxencode, int newlines);
- /** Class-aware wrapper for `::pdf_new_pdf_device()`. */
- FZ_FUNCTION FzDevice pdf_new_pdf_device(const PdfDocument& doc, const FzMatrix& topctm, const PdfObj& resources, const FzBuffer& contents);
- /** Class-aware wrapper for `::pdf_new_pixmap_from_annot()`. */
- FZ_FUNCTION FzPixmap pdf_new_pixmap_from_annot(const PdfAnnot& annot, const FzMatrix& ctm, const FzColorspace& cs, const FzSeparations& seps, int alpha);
- /** Class-aware wrapper for `::pdf_new_pixmap_from_page_contents_with_separations_and_usage()`. */
- FZ_FUNCTION FzPixmap pdf_new_pixmap_from_page_contents_with_separations_and_usage(const PdfPage& page, const FzMatrix& ctm, const FzColorspace& cs, const FzSeparations& seps, int alpha, const char *usage, ::fz_box_type box);
- /** Class-aware wrapper for `::pdf_new_pixmap_from_page_contents_with_usage()`. */
- FZ_FUNCTION FzPixmap pdf_new_pixmap_from_page_contents_with_usage(const PdfPage& page, const FzMatrix& ctm, const FzColorspace& cs, int alpha, const char *usage, ::fz_box_type box);
- /** Class-aware wrapper for `::pdf_new_pixmap_from_page_with_separations_and_usage()`. */
- FZ_FUNCTION FzPixmap pdf_new_pixmap_from_page_with_separations_and_usage(const PdfPage& page, const FzMatrix& ctm, const FzColorspace& cs, const FzSeparations& seps, int alpha, const char *usage, ::fz_box_type box);
- /** Class-aware wrapper for `::pdf_new_pixmap_from_page_with_usage()`. */
- FZ_FUNCTION FzPixmap pdf_new_pixmap_from_page_with_usage(const PdfPage& page, const FzMatrix& ctm, const FzColorspace& cs, int alpha, const char *usage, ::fz_box_type box);
- /** Class-aware wrapper for `::pdf_new_point()`. */
- FZ_FUNCTION PdfObj pdf_new_point(const PdfDocument& doc, const FzPoint& point);
- /** Class-aware wrapper for `::pdf_new_processor()`. */
- FZ_FUNCTION void *pdf_new_processor(int size);
- /** Class-aware wrapper for `::pdf_new_real()`. */
- FZ_FUNCTION PdfObj pdf_new_real(float f);
- /** Class-aware wrapper for `::pdf_new_rect()`. */
- FZ_FUNCTION PdfObj pdf_new_rect(const PdfDocument& doc, const FzRect& rect);
- /** Class-aware wrapper for `::pdf_new_run_processor()`. */
- FZ_FUNCTION PdfProcessor pdf_new_run_processor(const PdfDocument& doc, const FzDevice& dev, const FzMatrix& ctm, int struct_parent, const char *usage, const PdfGstate& gstate, const FzDefaultColorspaces& default_cs, FzCookie& cookie, const PdfGstate& fill_gstate, const PdfGstate& stroke_gstate);
- /** Class-aware wrapper for `::pdf_new_sanitize_filter()`. */
- FZ_FUNCTION PdfProcessor pdf_new_sanitize_filter(const PdfDocument& doc, const PdfProcessor& chain, int struct_parents, const FzMatrix& transform, PdfFilterOptions& options, void *sopts);
- /* Class-aware wrapper for `pdf_new_stext_page_from_annot()`
- is not available because returned wrapper class for `fz_stext_page`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_new_string()`. */
- FZ_FUNCTION PdfObj pdf_new_string(const char *str, size_t len);
- /** Class-aware wrapper for `::pdf_new_text_string()`. */
- FZ_FUNCTION PdfObj pdf_new_text_string(const char *s);
- /** Class-aware wrapper for `::pdf_new_uri_from_explicit_dest()`. */
- FZ_FUNCTION char *pdf_new_uri_from_explicit_dest(const FzLinkDest& dest);
- /** Class-aware wrapper for `::pdf_new_uri_from_path_and_explicit_dest()`. */
- FZ_FUNCTION char *pdf_new_uri_from_path_and_explicit_dest(const char *path, const FzLinkDest& dest);
- /** Class-aware wrapper for `::pdf_new_uri_from_path_and_named_dest()`. */
- FZ_FUNCTION char *pdf_new_uri_from_path_and_named_dest(const char *path, const char *name);
- /** Class-aware wrapper for `::pdf_new_utf8_from_pdf_stream_obj()`. */
- FZ_FUNCTION char *pdf_new_utf8_from_pdf_stream_obj(const PdfObj& src);
- /** Class-aware wrapper for `::pdf_new_utf8_from_pdf_string()`. */
- FZ_FUNCTION char *pdf_new_utf8_from_pdf_string(const char *srcptr, size_t srclen);
- /** Class-aware wrapper for `::pdf_new_utf8_from_pdf_string_obj()`. */
- FZ_FUNCTION char *pdf_new_utf8_from_pdf_string_obj(const PdfObj& src);
- /** Class-aware wrapper for `::pdf_new_xobject()`. */
- FZ_FUNCTION PdfObj pdf_new_xobject(const PdfDocument& doc, const FzRect& bbox, const FzMatrix& matrix, const PdfObj& res, const FzBuffer& buffer);
- /** Class-aware wrapper for `::pdf_next_annot()`. */
- FZ_FUNCTION PdfAnnot pdf_next_annot(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_next_widget()`. */
- FZ_FUNCTION PdfAnnot pdf_next_widget(const PdfAnnot& previous);
- /** Class-aware wrapper for `::pdf_nuke_annots()`. */
- FZ_FUNCTION void pdf_nuke_annots(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_nuke_links()`. */
- FZ_FUNCTION void pdf_nuke_links(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_nuke_page()`. */
- FZ_FUNCTION void pdf_nuke_page(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_obj_is_dirty()`. */
- FZ_FUNCTION int pdf_obj_is_dirty(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_obj_is_incremental()`. */
- FZ_FUNCTION int pdf_obj_is_incremental(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_obj_marked()`. */
- FZ_FUNCTION int pdf_obj_marked(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_obj_memo()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_obj_memo(::pdf_obj *obj, int bit)` => `(int, int memo)`
- */
- FZ_FUNCTION int pdf_obj_memo(const PdfObj& obj, int bit, int *memo);
- /** Class-aware wrapper for `::pdf_obj_num_is_stream()`. */
- FZ_FUNCTION int pdf_obj_num_is_stream(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_obj_parent_num()`. */
- FZ_FUNCTION int pdf_obj_parent_num(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_obj_refs()`. */
- FZ_FUNCTION int pdf_obj_refs(const PdfObj& ref);
- /** Class-aware wrapper for `::pdf_objcmp()`. */
- FZ_FUNCTION int pdf_objcmp(const PdfObj& a, const PdfObj& b);
- /** Class-aware wrapper for `::pdf_objcmp_deep()`. */
- FZ_FUNCTION int pdf_objcmp_deep(const PdfObj& a, const PdfObj& b);
- /** Class-aware wrapper for `::pdf_objcmp_resolve()`. */
- FZ_FUNCTION int pdf_objcmp_resolve(const PdfObj& a, const PdfObj& b);
- /** Class-aware wrapper for `::pdf_object_exists()`. */
- FZ_FUNCTION int pdf_object_exists(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_open_contents_stream()`. */
- FZ_FUNCTION FzStream pdf_open_contents_stream(const PdfDocument& doc, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_open_crypt()`. */
- FZ_FUNCTION FzStream pdf_open_crypt(const FzStream& chain, const PdfCrypt& crypt, int num, int gen);
- /** Class-aware wrapper for `::pdf_open_crypt_with_filter()`. */
- FZ_FUNCTION FzStream pdf_open_crypt_with_filter(const FzStream& chain, const PdfCrypt& crypt, const PdfObj& name, int num, int gen);
- /** Class-aware wrapper for `::pdf_open_document()`. */
- FZ_FUNCTION PdfDocument pdf_open_document(const char *filename);
- /** Class-aware wrapper for `::pdf_open_document_with_stream()`. */
- FZ_FUNCTION PdfDocument pdf_open_document_with_stream(const FzStream& file);
- /** Class-aware wrapper for `::pdf_open_inline_stream()`. */
- FZ_FUNCTION FzStream pdf_open_inline_stream(const PdfDocument& doc, const PdfObj& stmobj, int length, const FzStream& chain, const FzCompressionParams& params);
- /** Class-aware wrapper for `::pdf_open_raw_stream()`. */
- FZ_FUNCTION FzStream pdf_open_raw_stream(const PdfObj& ref);
- /** Class-aware wrapper for `::pdf_open_raw_stream_number()`. */
- FZ_FUNCTION FzStream pdf_open_raw_stream_number(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_open_stream()`. */
- FZ_FUNCTION FzStream pdf_open_stream(const PdfObj& ref);
- /** Class-aware wrapper for `::pdf_open_stream_number()`. */
- FZ_FUNCTION FzStream pdf_open_stream_number(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_open_stream_with_offset()`. */
- FZ_FUNCTION FzStream pdf_open_stream_with_offset(const PdfDocument& doc, int num, const PdfObj& dict, int64_t stm_ofs);
- /** Class-aware wrapper for `::pdf_page_associated_file()`. */
- FZ_FUNCTION PdfObj pdf_page_associated_file(const PdfPage& page, int idx);
- /** Class-aware wrapper for `::pdf_page_contents()`. */
- FZ_FUNCTION PdfObj pdf_page_contents(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_page_event_close()`. */
- FZ_FUNCTION void pdf_page_event_close(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_page_event_open()`. */
- FZ_FUNCTION void pdf_page_event_open(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_page_from_fz_page()`. */
- FZ_FUNCTION PdfPage pdf_page_from_fz_page(const FzPage& ptr);
- /** Class-aware wrapper for `::pdf_page_group()`. */
- FZ_FUNCTION PdfObj pdf_page_group(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_page_has_transparency()`. */
- FZ_FUNCTION int pdf_page_has_transparency(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_page_label()`. */
- FZ_FUNCTION void pdf_page_label(const PdfDocument& doc, int page, char *buf, size_t size);
- /** Class-aware wrapper for `::pdf_page_label_imp()`. */
- FZ_FUNCTION void pdf_page_label_imp(const FzDocument& doc, int chapter, int page, char *buf, size_t size);
- /** Class-aware wrapper for `::pdf_page_obj_transform()`. */
- FZ_FUNCTION void pdf_page_obj_transform(const PdfObj& pageobj, FzRect& outbox, FzMatrix& outctm);
- /** Class-aware wrapper for `::pdf_page_obj_transform_box()`. */
- FZ_FUNCTION void pdf_page_obj_transform_box(const PdfObj& pageobj, FzRect& outbox, FzMatrix& out, ::fz_box_type box);
- /** Class-aware wrapper for `::pdf_page_presentation()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_page_presentation(::pdf_page *page, ::fz_transition *transition)` => `(fz_transition *, float duration)`
- */
- FZ_FUNCTION FzTransition pdf_page_presentation(const PdfPage& page, FzTransition& transition, float *duration);
- /** Class-aware wrapper for `::pdf_page_resources()`. */
- FZ_FUNCTION PdfObj pdf_page_resources(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_page_separations()`. */
- FZ_FUNCTION FzSeparations pdf_page_separations(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_page_transform()`. */
- FZ_FUNCTION void pdf_page_transform(const PdfPage& page, FzRect& mediabox, FzMatrix& ctm);
- /** Class-aware wrapper for `::pdf_page_transform_box()`. */
- FZ_FUNCTION void pdf_page_transform_box(const PdfPage& page, FzRect& mediabox, FzMatrix& ctm, ::fz_box_type box);
- /** Class-aware wrapper for `::pdf_page_write()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_page_write(::pdf_document *doc, ::fz_rect mediabox, ::pdf_obj **presources, ::fz_buffer **pcontents)` => `(fz_device *)`
- */
- FZ_FUNCTION FzDevice pdf_page_write(const PdfDocument& doc, const FzRect& mediabox, PdfObj& presources, FzBuffer& pcontents);
- /** Class-aware wrapper for `::pdf_parse_array()`. */
- FZ_FUNCTION PdfObj pdf_parse_array(const PdfDocument& doc, const FzStream& f, const PdfLexbuf& buf);
- /** Class-aware wrapper for `::pdf_parse_date()`. */
- FZ_FUNCTION int64_t pdf_parse_date(const char *s);
- /** Class-aware wrapper for `::pdf_parse_default_appearance()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_parse_default_appearance(const char *da, float color[4])` => `(const char *font, float size, int n)`
- */
- FZ_FUNCTION void pdf_parse_default_appearance(const char *da, const char **font, float *size, int *n, float color[4]);
- /** Class-aware wrapper for `::pdf_parse_default_appearance_unmapped()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_parse_default_appearance_unmapped(const char *da, char *font_name, int font_name_len, float color[4])` => `(float size, int n)`
- */
- FZ_FUNCTION void pdf_parse_default_appearance_unmapped(const char *da, char *font_name, int font_name_len, float *size, int *n, float color[4]);
- /** Class-aware wrapper for `::pdf_parse_dict()`. */
- FZ_FUNCTION PdfObj pdf_parse_dict(const PdfDocument& doc, const FzStream& f, const PdfLexbuf& buf);
- /** Class-aware wrapper for `::pdf_parse_ind_obj()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_parse_ind_obj(::pdf_document *doc, ::fz_stream *f)` => `(pdf_obj *, int num, int gen, int64_t stm_ofs, int try_repair)`
- */
- FZ_FUNCTION PdfObj pdf_parse_ind_obj(const PdfDocument& doc, const FzStream& f, int *num, int *gen, int64_t *stm_ofs, int *try_repair);
- /** Class-aware wrapper for `::pdf_parse_journal_obj()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_parse_journal_obj(::pdf_document *doc, ::fz_stream *stm, ::fz_buffer **ostm)` => `(pdf_obj *, int onum, int newobj)`
- */
- FZ_FUNCTION PdfObj pdf_parse_journal_obj(const PdfDocument& doc, const FzStream& stm, int *onum, FzBuffer& ostm, int *newobj);
- /** Class-aware wrapper for `::pdf_parse_stm_obj()`. */
- FZ_FUNCTION PdfObj pdf_parse_stm_obj(const PdfDocument& doc, const FzStream& f, const PdfLexbuf& buf);
- /** Class-aware wrapper for `::pdf_parse_write_options()`. */
- FZ_FUNCTION PdfWriteOptions pdf_parse_write_options(PdfWriteOptions& opts, const char *args);
- /** Class-aware wrapper for `::pdf_pin_document()`. */
- FZ_FUNCTION PdfDocument pdf_pin_document(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_preview_signature_as_display_list()`. */
- FZ_FUNCTION FzDisplayList pdf_preview_signature_as_display_list(float w, float h, ::fz_text_language lang, const PdfPkcs7Signer& signer, int appearance_flags, const FzImage& graphic, const char *reason, const char *location);
- /** Class-aware wrapper for `::pdf_preview_signature_as_pixmap()`. */
- FZ_FUNCTION FzPixmap pdf_preview_signature_as_pixmap(int w, int h, ::fz_text_language lang, const PdfPkcs7Signer& signer, int appearance_flags, const FzImage& graphic, const char *reason, const char *location);
- /** Class-aware wrapper for `::pdf_print_crypt()`. */
- FZ_FUNCTION void pdf_print_crypt(const FzOutput& out, const PdfCrypt& crypt);
- /** Class-aware wrapper for `::pdf_print_default_appearance()`. */
- FZ_FUNCTION void pdf_print_default_appearance(char *buf, int nbuf, const char *font, float size, int n, const float *color);
- /** Class-aware wrapper for `::pdf_print_encrypted_obj()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_print_encrypted_obj(::fz_output *out, ::pdf_obj *obj, int tight, int ascii, ::pdf_crypt *crypt, int num, int gen)` => int sep
- */
- FZ_FUNCTION void pdf_print_encrypted_obj(const FzOutput& out, const PdfObj& obj, int tight, int ascii, const PdfCrypt& crypt, int num, int gen, int *sep);
- /** Class-aware wrapper for `::pdf_print_font()`. */
- FZ_FUNCTION void pdf_print_font(const FzOutput& out, const PdfFontDesc& fontdesc);
- /** Class-aware wrapper for `::pdf_print_obj()`. */
- FZ_FUNCTION void pdf_print_obj(const FzOutput& out, const PdfObj& obj, int tight, int ascii);
- /** Class-aware wrapper for `::pdf_process_annot()`. */
- FZ_FUNCTION void pdf_process_annot(const PdfProcessor& proc, const PdfAnnot& annot, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_process_contents()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_process_contents(::pdf_processor *proc, ::pdf_document *doc, ::pdf_obj *res, ::pdf_obj *stm, ::fz_cookie *cookie, ::pdf_obj **out_res)` =>
- */
- FZ_FUNCTION void pdf_process_contents(const PdfProcessor& proc, const PdfDocument& doc, const PdfObj& res, const PdfObj& stm, FzCookie& cookie, PdfObj& out_res);
- /** Class-aware wrapper for `::pdf_process_glyph()`. */
- FZ_FUNCTION void pdf_process_glyph(const PdfProcessor& proc, const PdfDocument& doc, const PdfObj& resources, const FzBuffer& contents);
- /** Class-aware wrapper for `::pdf_process_raw_contents()`. */
- FZ_FUNCTION void pdf_process_raw_contents(const PdfProcessor& proc, const PdfDocument& doc, const PdfObj& stmobj, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_processor_pop_resources()`. */
- FZ_FUNCTION PdfObj pdf_processor_pop_resources(const PdfProcessor& proc);
- /** Class-aware wrapper for `::pdf_processor_push_resources()`. */
- FZ_FUNCTION void pdf_processor_push_resources(const PdfProcessor& proc, const PdfObj& res);
- /** Class-aware wrapper for `::pdf_progressive_advance()`. */
- FZ_FUNCTION PdfObj pdf_progressive_advance(const PdfDocument& doc, int pagenum);
- /** Class-aware wrapper for `::pdf_purge_local_resources()`. */
- FZ_FUNCTION void pdf_purge_local_resources(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_purge_locals_from_store()`. */
- FZ_FUNCTION void pdf_purge_locals_from_store(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_purge_object_from_store()`. */
- FZ_FUNCTION void pdf_purge_object_from_store(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_read_journal()`. */
- FZ_FUNCTION void pdf_read_journal(const PdfDocument& doc, const FzStream& stm);
- /* Class-aware wrapper for `pdf_read_ocg()`
- is not available because returned wrapper class for `pdf_ocg_descriptor`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_rearrange_pages()`. */
- FZ_FUNCTION void pdf_rearrange_pages(const PdfDocument& doc, int count, const int *pages, ::pdf_clean_options_structure structure);
- /** Class-aware wrapper for `::pdf_rearrange_pages2()`. */
- /** Swig-friendly wrapper for pdf_rearrange_pages(). */
- FZ_FUNCTION void pdf_rearrange_pages2(const PdfDocument& doc, const std::vector<int> &pages, ::pdf_clean_options_structure structure);
- /** Class-aware wrapper for `::pdf_recolor_page()`. */
- FZ_FUNCTION void pdf_recolor_page(const PdfDocument& doc, int pagenum, PdfRecolorOptions& opts);
- /** Class-aware wrapper for `::pdf_recolor_shade()`. */
- /**
- Recolor a shade.
- */
- FZ_FUNCTION PdfObj pdf_recolor_shade(const PdfObj& shade, ::pdf_shade_recolorer *reshade, void *opaque);
- /** Class-aware wrapper for `::pdf_redact_page()`. */
- FZ_FUNCTION int pdf_redact_page(const PdfDocument& doc, const PdfPage& page, PdfRedactOptions& opts);
- /** Class-aware wrapper for `::pdf_redo()`. */
- FZ_FUNCTION void pdf_redo(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_remove_item()`. */
- FZ_FUNCTION void pdf_remove_item(::fz_store_drop_fn *drop, const PdfObj& key);
- /** Class-aware wrapper for `::pdf_remove_output_intents()`. */
- FZ_FUNCTION void pdf_remove_output_intents(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_repair_obj()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_repair_obj(::pdf_document *doc, ::pdf_lexbuf *buf, ::pdf_obj **encrypt, ::pdf_obj **id, ::pdf_obj **page, ::pdf_obj **root)` => `(int, int64_t stmofsp, int64_t stmlenp, int64_t tmpofs)`
- */
- FZ_FUNCTION int pdf_repair_obj(const PdfDocument& doc, const PdfLexbuf& buf, int64_t *stmofsp, int64_t *stmlenp, PdfObj& encrypt, PdfObj& id, PdfObj& page, int64_t *tmpofs, PdfObj& root);
- /** Class-aware wrapper for `::pdf_repair_xref()`. */
- FZ_FUNCTION void pdf_repair_xref(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_replace_xref()`. */
- FZ_FUNCTION void pdf_replace_xref(const PdfDocument& doc, const PdfXrefEntry& entries, int n);
- /** Class-aware wrapper for `::pdf_reset_form()`. */
- FZ_FUNCTION void pdf_reset_form(const PdfDocument& doc, const PdfObj& fields, int exclude);
- /** Class-aware wrapper for `::pdf_reset_processor()`. */
- FZ_FUNCTION void pdf_reset_processor(const PdfProcessor& proc);
- /** Class-aware wrapper for `::pdf_resolve_indirect()`. */
- /**
- Resolve an indirect object (or chain of objects).
-
- This can cause xref reorganisations (solidifications etc) due to
- repairs, so all held pdf_xref_entries should be considered
- invalid after this call (other than the returned one).
- */
- FZ_FUNCTION PdfObj pdf_resolve_indirect(const PdfObj& ref);
- /** Class-aware wrapper for `::pdf_resolve_indirect_chain()`. */
- FZ_FUNCTION PdfObj pdf_resolve_indirect_chain(const PdfObj& ref);
- /** Class-aware wrapper for `::pdf_resolve_link()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_resolve_link(::pdf_document *doc, const char *uri)` => `(int, float xp, float yp)`
- */
- FZ_FUNCTION int pdf_resolve_link(const PdfDocument& doc, const char *uri, float *xp, float *yp);
- /* Class-aware wrapper for `pdf_resolve_link_dest()`
- is not available because returned wrapper class for `fz_link_dest`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_rewrite_images()`. */
- FZ_FUNCTION void pdf_rewrite_images(const PdfDocument& doc, PdfImageRewriterOptions& opts);
- /** Class-aware wrapper for `::pdf_run_annot()`. */
- FZ_FUNCTION void pdf_run_annot(const PdfAnnot& annot, const FzDevice& dev, const FzMatrix& ctm, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_run_document_structure()`. */
- FZ_FUNCTION void pdf_run_document_structure(const PdfDocument& doc, const FzDevice& dev, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_run_glyph()`. */
- FZ_FUNCTION void pdf_run_glyph(const PdfDocument& doc, const PdfObj& resources, const FzBuffer& contents, const FzDevice& dev, const FzMatrix& ctm, void *gstate, const FzDefaultColorspaces& default_cs, void *fill_gstate, void *stroke_gstate);
- /** Class-aware wrapper for `::pdf_run_page()`. */
- FZ_FUNCTION void pdf_run_page(const PdfPage& page, const FzDevice& dev, const FzMatrix& ctm, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_run_page_annots()`. */
- FZ_FUNCTION void pdf_run_page_annots(const PdfPage& page, const FzDevice& dev, const FzMatrix& ctm, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_run_page_annots_with_usage()`. */
- FZ_FUNCTION void pdf_run_page_annots_with_usage(const PdfPage& page, const FzDevice& dev, const FzMatrix& ctm, const char *usage, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_run_page_contents()`. */
- FZ_FUNCTION void pdf_run_page_contents(const PdfPage& page, const FzDevice& dev, const FzMatrix& ctm, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_run_page_contents_with_usage()`. */
- FZ_FUNCTION void pdf_run_page_contents_with_usage(const PdfPage& page, const FzDevice& dev, const FzMatrix& ctm, const char *usage, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_run_page_widgets()`. */
- FZ_FUNCTION void pdf_run_page_widgets(const PdfPage& page, const FzDevice& dev, const FzMatrix& ctm, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_run_page_widgets_with_usage()`. */
- FZ_FUNCTION void pdf_run_page_widgets_with_usage(const PdfPage& page, const FzDevice& dev, const FzMatrix& ctm, const char *usage, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_run_page_with_usage()`. */
- FZ_FUNCTION void pdf_run_page_with_usage(const PdfPage& page, const FzDevice& dev, const FzMatrix& ctm, const char *usage, FzCookie& cookie);
- /** Class-aware wrapper for `::pdf_sample_shade_function()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_sample_shade_function(int n, int funcs, ::pdf_function **func, float t0, float t1)` => `(float samples)`
- */
- FZ_FUNCTION void pdf_sample_shade_function(float *samples, int n, int funcs, PdfFunction& func, float t0, float t1);
- /** Class-aware wrapper for `::pdf_save_document()`. */
- FZ_FUNCTION void pdf_save_document(const PdfDocument& doc, const char *filename, PdfWriteOptions& opts);
- /** Class-aware wrapper for `::pdf_save_journal()`. */
- FZ_FUNCTION void pdf_save_journal(const PdfDocument& doc, const char *filename);
- /** Class-aware wrapper for `::pdf_save_snapshot()`. */
- FZ_FUNCTION void pdf_save_snapshot(const PdfDocument& doc, const char *filename);
- /** Class-aware wrapper for `::pdf_select_layer_config()`. */
- FZ_FUNCTION void pdf_select_layer_config(const PdfDocument& doc, int config_num);
- /** Class-aware wrapper for `::pdf_select_layer_config_ui()`. */
- FZ_FUNCTION void pdf_select_layer_config_ui(const PdfDocument& doc, int ui);
- /** Class-aware wrapper for `::pdf_serialise_journal()`. */
- FZ_FUNCTION void pdf_serialise_journal(const PdfDocument& doc, const FzOutput& out);
- /** Class-aware wrapper for `::pdf_set_annot_active()`. */
- FZ_FUNCTION void pdf_set_annot_active(const PdfAnnot& annot, int active);
- /** Class-aware wrapper for `::pdf_set_annot_appearance()`. */
- FZ_FUNCTION void pdf_set_annot_appearance(const PdfAnnot& annot, const char *appearance, const char *state, const FzMatrix& ctm, const FzRect& bbox, const PdfObj& res, const FzBuffer& contents);
- /** Class-aware wrapper for `::pdf_set_annot_appearance_from_display_list()`. */
- FZ_FUNCTION void pdf_set_annot_appearance_from_display_list(const PdfAnnot& annot, const char *appearance, const char *state, const FzMatrix& ctm, const FzDisplayList& list);
- /** Class-aware wrapper for `::pdf_set_annot_author()`. */
- FZ_FUNCTION void pdf_set_annot_author(const PdfAnnot& annot, const char *author);
- /** Class-aware wrapper for `::pdf_set_annot_border()`. */
- FZ_FUNCTION void pdf_set_annot_border(const PdfAnnot& annot, float width);
- /** Class-aware wrapper for `::pdf_set_annot_border_effect()`. */
- FZ_FUNCTION void pdf_set_annot_border_effect(const PdfAnnot& annot, enum pdf_border_effect effect);
- /** Class-aware wrapper for `::pdf_set_annot_border_effect_intensity()`. */
- FZ_FUNCTION void pdf_set_annot_border_effect_intensity(const PdfAnnot& annot, float intensity);
- /** Class-aware wrapper for `::pdf_set_annot_border_style()`. */
- FZ_FUNCTION void pdf_set_annot_border_style(const PdfAnnot& annot, enum pdf_border_style style);
- /** Class-aware wrapper for `::pdf_set_annot_border_width()`. */
- FZ_FUNCTION void pdf_set_annot_border_width(const PdfAnnot& annot, float width);
- /** Class-aware wrapper for `::pdf_set_annot_callout_line()`. */
- FZ_FUNCTION void pdf_set_annot_callout_line(const PdfAnnot& annot, ::fz_point callout[3], int n);
- /** Class-aware wrapper for `::pdf_set_annot_callout_line2()`. */
- /** SWIG-friendly wrapper for pdf_set_annot_callout_line(). */
- FZ_FUNCTION void pdf_set_annot_callout_line2(const PdfAnnot& annot, std::vector<fz_point> &callout);
- /** Class-aware wrapper for `::pdf_set_annot_callout_point()`. */
- FZ_FUNCTION void pdf_set_annot_callout_point(const PdfAnnot& annot, const FzPoint& p);
- /** Class-aware wrapper for `::pdf_set_annot_callout_style()`. */
- FZ_FUNCTION void pdf_set_annot_callout_style(const PdfAnnot& annot, enum pdf_line_ending style);
- /** Class-aware wrapper for `::pdf_set_annot_color()`. */
- FZ_FUNCTION void pdf_set_annot_color(const PdfAnnot& annot, int n, const float *color);
- /** Class-aware wrapper for `::pdf_set_annot_contents()`. */
- FZ_FUNCTION void pdf_set_annot_contents(const PdfAnnot& annot, const char *text);
- /** Class-aware wrapper for `::pdf_set_annot_creation_date()`. */
- FZ_FUNCTION void pdf_set_annot_creation_date(const PdfAnnot& annot, int64_t time);
- /** Class-aware wrapper for `::pdf_set_annot_default_appearance()`. */
- FZ_FUNCTION void pdf_set_annot_default_appearance(const PdfAnnot& annot, const char *font, float size, int n, const float *color);
- /** Class-aware wrapper for `::pdf_set_annot_field_value()`. */
- FZ_FUNCTION int pdf_set_annot_field_value(const PdfDocument& doc, const PdfAnnot& widget, const char *text, int ignore_trigger_events);
- /** Class-aware wrapper for `::pdf_set_annot_filespec()`. */
- FZ_FUNCTION void pdf_set_annot_filespec(const PdfAnnot& annot, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_set_annot_flags()`. */
- FZ_FUNCTION void pdf_set_annot_flags(const PdfAnnot& annot, int flags);
- /** Class-aware wrapper for `::pdf_set_annot_hidden_for_editing()`. */
- FZ_FUNCTION void pdf_set_annot_hidden_for_editing(const PdfAnnot& annot, int hidden);
- /** Class-aware wrapper for `::pdf_set_annot_hot()`. */
- FZ_FUNCTION void pdf_set_annot_hot(const PdfAnnot& annot, int hot);
- /** Class-aware wrapper for `::pdf_set_annot_icon_name()`. */
- FZ_FUNCTION void pdf_set_annot_icon_name(const PdfAnnot& annot, const char *name);
- /** Class-aware wrapper for `::pdf_set_annot_ink_list()`. */
- FZ_FUNCTION void pdf_set_annot_ink_list(const PdfAnnot& annot, int n, const int *count, FzPoint& v);
- /** Class-aware wrapper for `::pdf_set_annot_intent()`. */
- FZ_FUNCTION void pdf_set_annot_intent(const PdfAnnot& annot, enum pdf_intent it);
- /** Class-aware wrapper for `::pdf_set_annot_interior_color()`. */
- FZ_FUNCTION void pdf_set_annot_interior_color(const PdfAnnot& annot, int n, const float *color);
- /** Class-aware wrapper for `::pdf_set_annot_is_open()`. */
- FZ_FUNCTION void pdf_set_annot_is_open(const PdfAnnot& annot, int is_open);
- /** Class-aware wrapper for `::pdf_set_annot_language()`. */
- FZ_FUNCTION void pdf_set_annot_language(const PdfAnnot& annot, ::fz_text_language lang);
- /** Class-aware wrapper for `::pdf_set_annot_line()`. */
- FZ_FUNCTION void pdf_set_annot_line(const PdfAnnot& annot, const FzPoint& a, const FzPoint& b);
- /** Class-aware wrapper for `::pdf_set_annot_line_caption()`. */
- FZ_FUNCTION void pdf_set_annot_line_caption(const PdfAnnot& annot, int cap);
- /** Class-aware wrapper for `::pdf_set_annot_line_caption_offset()`. */
- FZ_FUNCTION void pdf_set_annot_line_caption_offset(const PdfAnnot& annot, const FzPoint& offset);
- /** Class-aware wrapper for `::pdf_set_annot_line_end_style()`. */
- FZ_FUNCTION void pdf_set_annot_line_end_style(const PdfAnnot& annot, enum pdf_line_ending e);
- /** Class-aware wrapper for `::pdf_set_annot_line_ending_styles()`. */
- FZ_FUNCTION void pdf_set_annot_line_ending_styles(const PdfAnnot& annot, enum pdf_line_ending start_style, enum pdf_line_ending end_style);
- /** Class-aware wrapper for `::pdf_set_annot_line_leader()`. */
- FZ_FUNCTION void pdf_set_annot_line_leader(const PdfAnnot& annot, float ll);
- /** Class-aware wrapper for `::pdf_set_annot_line_leader_extension()`. */
- FZ_FUNCTION void pdf_set_annot_line_leader_extension(const PdfAnnot& annot, float lle);
- /** Class-aware wrapper for `::pdf_set_annot_line_leader_offset()`. */
- FZ_FUNCTION void pdf_set_annot_line_leader_offset(const PdfAnnot& annot, float llo);
- /** Class-aware wrapper for `::pdf_set_annot_line_start_style()`. */
- FZ_FUNCTION void pdf_set_annot_line_start_style(const PdfAnnot& annot, enum pdf_line_ending s);
- /** Class-aware wrapper for `::pdf_set_annot_modification_date()`. */
- FZ_FUNCTION void pdf_set_annot_modification_date(const PdfAnnot& annot, int64_t time);
- /** Class-aware wrapper for `::pdf_set_annot_opacity()`. */
- FZ_FUNCTION void pdf_set_annot_opacity(const PdfAnnot& annot, float opacity);
- /** Class-aware wrapper for `::pdf_set_annot_popup()`. */
- FZ_FUNCTION void pdf_set_annot_popup(const PdfAnnot& annot, const FzRect& rect);
- /** Class-aware wrapper for `::pdf_set_annot_quad_points()`. */
- FZ_FUNCTION void pdf_set_annot_quad_points(const PdfAnnot& annot, int n, FzQuad& qv);
- /** Class-aware wrapper for `::pdf_set_annot_quadding()`. */
- FZ_FUNCTION void pdf_set_annot_quadding(const PdfAnnot& annot, int q);
- /** Class-aware wrapper for `::pdf_set_annot_rect()`. */
- FZ_FUNCTION void pdf_set_annot_rect(const PdfAnnot& annot, const FzRect& rect);
- /** Class-aware wrapper for `::pdf_set_annot_resynthesised()`. */
- FZ_FUNCTION void pdf_set_annot_resynthesised(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_set_annot_rich_contents()`. */
- FZ_FUNCTION void pdf_set_annot_rich_contents(const PdfAnnot& annot, const char *plain, const char *rich);
- /** Class-aware wrapper for `::pdf_set_annot_rich_defaults()`. */
- FZ_FUNCTION void pdf_set_annot_rich_defaults(const PdfAnnot& annot, const char *style);
- /** Class-aware wrapper for `::pdf_set_annot_stamp_image()`. */
- FZ_FUNCTION void pdf_set_annot_stamp_image(const PdfAnnot& annot, const FzImage& image);
- /** Class-aware wrapper for `::pdf_set_annot_stamp_image_obj()`. */
- FZ_FUNCTION void pdf_set_annot_stamp_image_obj(const PdfAnnot& annot, const PdfObj& ref);
- /** Class-aware wrapper for `::pdf_set_annot_vertex()`. */
- FZ_FUNCTION void pdf_set_annot_vertex(const PdfAnnot& annot, int i, const FzPoint& p);
- /** Class-aware wrapper for `::pdf_set_annot_vertices()`. */
- FZ_FUNCTION void pdf_set_annot_vertices(const PdfAnnot& annot, int n, FzPoint& v);
- /** Class-aware wrapper for `::pdf_set_choice_field_value()`. */
- FZ_FUNCTION int pdf_set_choice_field_value(const PdfAnnot& widget, const char *value);
- /** Class-aware wrapper for `::pdf_set_cmap_wmode()`. */
- FZ_FUNCTION void pdf_set_cmap_wmode(const PdfCmap& cmap, int wmode);
- /** Class-aware wrapper for `::pdf_set_default_hmtx()`. */
- FZ_FUNCTION void pdf_set_default_hmtx(const PdfFontDesc& font, int w);
- /** Class-aware wrapper for `::pdf_set_default_vmtx()`. */
- FZ_FUNCTION void pdf_set_default_vmtx(const PdfFontDesc& font, int y, int w);
- /** Class-aware wrapper for `::pdf_set_doc_event_callback()`. */
- FZ_FUNCTION void pdf_set_doc_event_callback(const PdfDocument& doc, ::pdf_doc_event_cb *event_cb, ::pdf_free_doc_event_data_cb *free_event_data_cb, void *data);
- /** Class-aware wrapper for `::pdf_set_document_language()`. */
- FZ_FUNCTION void pdf_set_document_language(const PdfDocument& doc, ::fz_text_language lang);
- /** Class-aware wrapper for `::pdf_set_field_value()`. */
- FZ_FUNCTION int pdf_set_field_value(const PdfDocument& doc, const PdfObj& field, const char *text, int ignore_trigger_events);
- /** Class-aware wrapper for `::pdf_set_font_wmode()`. */
- FZ_FUNCTION void pdf_set_font_wmode(const PdfFontDesc& font, int wmode);
- /** Class-aware wrapper for `::pdf_set_int()`. */
- FZ_FUNCTION void pdf_set_int(const PdfObj& obj, int64_t i);
- /** Class-aware wrapper for `::pdf_set_layer_config_as_default()`. */
- FZ_FUNCTION void pdf_set_layer_config_as_default(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_set_obj_memo()`. */
- FZ_FUNCTION void pdf_set_obj_memo(const PdfObj& obj, int bit, int memo);
- /** Class-aware wrapper for `::pdf_set_obj_parent()`. */
- FZ_FUNCTION void pdf_set_obj_parent(const PdfObj& obj, int num);
- /** Class-aware wrapper for `::pdf_set_page_box()`. */
- FZ_FUNCTION void pdf_set_page_box(const PdfPage& page, ::fz_box_type box, const FzRect& rect);
- /** Class-aware wrapper for `::pdf_set_page_labels()`. */
- FZ_FUNCTION void pdf_set_page_labels(const PdfDocument& doc, int index, ::pdf_page_label_style style, const char *prefix, int start);
- /** Class-aware wrapper for `::pdf_set_populating_xref_trailer()`. */
- FZ_FUNCTION void pdf_set_populating_xref_trailer(const PdfDocument& doc, const PdfObj& trailer);
- /** Class-aware wrapper for `::pdf_set_str_len()`. */
- FZ_FUNCTION void pdf_set_str_len(const PdfObj& obj, size_t newlen);
- /** Class-aware wrapper for `::pdf_set_text_field_value()`. */
- FZ_FUNCTION int pdf_set_text_field_value(const PdfAnnot& widget, const char *value);
- /** Class-aware wrapper for `::pdf_set_usecmap()`. */
- FZ_FUNCTION void pdf_set_usecmap(const PdfCmap& cmap, const PdfCmap& usecmap);
- /** Class-aware wrapper for `::pdf_set_widget_editing_state()`. */
- FZ_FUNCTION void pdf_set_widget_editing_state(const PdfAnnot& widget, int editing);
- /** Class-aware wrapper for `::pdf_sign_signature()`. */
- FZ_FUNCTION void pdf_sign_signature(const PdfAnnot& widget, const PdfPkcs7Signer& signer, int appearance_flags, const FzImage& graphic, const char *reason, const char *location);
- /** Class-aware wrapper for `::pdf_sign_signature_with_appearance()`. */
- FZ_FUNCTION void pdf_sign_signature_with_appearance(const PdfAnnot& widget, const PdfPkcs7Signer& signer, int64_t date, const FzDisplayList& disp_list);
- /** Class-aware wrapper for `::pdf_signature_appearance_signed()`. */
- FZ_FUNCTION FzDisplayList pdf_signature_appearance_signed(const FzRect& rect, ::fz_text_language lang, const FzImage& img, const char *left_text, const char *right_text, int include_logo);
- /** Class-aware wrapper for `::pdf_signature_appearance_unsigned()`. */
- FZ_FUNCTION FzDisplayList pdf_signature_appearance_unsigned(const FzRect& rect, ::fz_text_language lang);
- /** Class-aware wrapper for `::pdf_signature_byte_range()`. */
- FZ_FUNCTION int pdf_signature_byte_range(const PdfDocument& doc, const PdfObj& signature, const FzRange& byte_range);
- /** Class-aware wrapper for `::pdf_signature_contents()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_signature_contents(::pdf_document *doc, ::pdf_obj *signature)` => `(size_t, char *contents)`
- */
- FZ_FUNCTION size_t pdf_signature_contents(const PdfDocument& doc, const PdfObj& signature, char **contents);
- /** Class-aware wrapper for `::pdf_signature_drop_distinguished_name()`. */
- FZ_FUNCTION void pdf_signature_drop_distinguished_name(const PdfPkcs7DistinguishedName& name);
- /** Class-aware wrapper for `::pdf_signature_error_description()`. */
- FZ_FUNCTION char *pdf_signature_error_description(::pdf_signature_error err);
- /** Class-aware wrapper for `::pdf_signature_format_distinguished_name()`. */
- FZ_FUNCTION char *pdf_signature_format_distinguished_name(const PdfPkcs7DistinguishedName& name);
- /* Class-aware wrapper for `pdf_signature_get_signatory()`
- is not available because returned wrapper class for `pdf_pkcs7_distinguished_name`
- is non-copyable. */
- /* Class-aware wrapper for `pdf_signature_get_widget_signatory()`
- is not available because returned wrapper class for `pdf_pkcs7_distinguished_name`
- is non-copyable. */
- /** Class-aware wrapper for `::pdf_signature_hash_bytes()`. */
- FZ_FUNCTION FzStream pdf_signature_hash_bytes(const PdfDocument& doc, const PdfObj& signature);
- /** Class-aware wrapper for `::pdf_signature_incremental_change_since_signing()`. */
- FZ_FUNCTION int pdf_signature_incremental_change_since_signing(const PdfDocument& doc, const PdfObj& signature);
- /** Class-aware wrapper for `::pdf_signature_info()`. */
- FZ_FUNCTION char *pdf_signature_info(const char *name, const PdfPkcs7DistinguishedName& dn, const char *reason, const char *location, int64_t date, int include_labels);
- /** Class-aware wrapper for `::pdf_signature_is_signed()`. */
- FZ_FUNCTION int pdf_signature_is_signed(const PdfDocument& doc, const PdfObj& field);
- /** Class-aware wrapper for `::pdf_signature_set_value()`. */
- FZ_FUNCTION void pdf_signature_set_value(const PdfDocument& doc, const PdfObj& field, const PdfPkcs7Signer& signer, int64_t stime);
- /** Class-aware wrapper for `::pdf_sort_cmap()`. */
- FZ_FUNCTION void pdf_sort_cmap(const PdfCmap& cmap);
- /** Class-aware wrapper for `::pdf_sort_dict()`. */
- FZ_FUNCTION void pdf_sort_dict(const PdfObj& dict);
- /** Class-aware wrapper for `::pdf_specifics()`. */
- FZ_FUNCTION PdfDocument pdf_specifics(const FzDocument& doc);
- /** Class-aware wrapper for `::pdf_sprint_obj()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_sprint_obj(char *buf, size_t cap, ::pdf_obj *obj, int tight, int ascii)` => `(char *, size_t len)`
- */
- FZ_FUNCTION char *pdf_sprint_obj(char *buf, size_t cap, size_t *len, const PdfObj& obj, int tight, int ascii);
- /** Class-aware wrapper for `::pdf_store_item()`. */
- FZ_FUNCTION void pdf_store_item(const PdfObj& key, void *val, size_t itemsize);
- /** Class-aware wrapper for `::pdf_string_from_annot_type()`. */
- FZ_FUNCTION const char *pdf_string_from_annot_type(enum pdf_annot_type type);
- /** Class-aware wrapper for `::pdf_string_from_intent()`. */
- FZ_FUNCTION const char *pdf_string_from_intent(enum pdf_intent intent);
- /** Class-aware wrapper for `::pdf_string_from_line_ending()`. */
- FZ_FUNCTION const char *pdf_string_from_line_ending(enum pdf_line_ending end);
- /** Class-aware wrapper for `::pdf_structure_type()`. */
- FZ_FUNCTION ::fz_structure pdf_structure_type(const PdfObj& role_map, const PdfObj& tag);
- /** Class-aware wrapper for `::pdf_subset_fonts()`. */
- FZ_FUNCTION void pdf_subset_fonts(const PdfDocument& doc, int pages_len, const int *pages);
- /** Class-aware wrapper for `::pdf_subset_fonts2()`. */
- /** Swig-friendly wrapper for pdf_subset_fonts(). */
- FZ_FUNCTION void pdf_subset_fonts2(const PdfDocument& doc, const std::vector<int> &pages);
- /** Class-aware wrapper for `::pdf_sync_annots()`. */
- FZ_FUNCTION void pdf_sync_annots(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_sync_links()`. */
- FZ_FUNCTION void pdf_sync_links(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_sync_open_pages()`. */
- FZ_FUNCTION void pdf_sync_open_pages(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_sync_page()`. */
- FZ_FUNCTION void pdf_sync_page(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_text_widget_format()`. */
- FZ_FUNCTION int pdf_text_widget_format(const PdfAnnot& tw);
- /** Class-aware wrapper for `::pdf_text_widget_max_len()`. */
- FZ_FUNCTION int pdf_text_widget_max_len(const PdfAnnot& tw);
- /** Class-aware wrapper for `::pdf_to_bool()`. */
- FZ_FUNCTION int pdf_to_bool(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_to_bool_default()`. */
- FZ_FUNCTION int pdf_to_bool_default(const PdfObj& obj, int def);
- /** Class-aware wrapper for `::pdf_to_date()`. */
- FZ_FUNCTION int64_t pdf_to_date(const PdfObj& time);
- /** Class-aware wrapper for `::pdf_to_gen()`. */
- FZ_FUNCTION int pdf_to_gen(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_to_int()`. */
- FZ_FUNCTION int pdf_to_int(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_to_int64()`. */
- FZ_FUNCTION int64_t pdf_to_int64(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_to_int_default()`. */
- FZ_FUNCTION int pdf_to_int_default(const PdfObj& obj, int def);
- /** Class-aware wrapper for `::pdf_to_matrix()`. */
- FZ_FUNCTION FzMatrix pdf_to_matrix(const PdfObj& array);
- /** Class-aware wrapper for `::pdf_to_name()`. */
- FZ_FUNCTION const char *pdf_to_name(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_to_num()`. */
- FZ_FUNCTION int pdf_to_num(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_to_point()`. */
- FZ_FUNCTION FzPoint pdf_to_point(const PdfObj& array, int offset);
- /** Class-aware wrapper for `::pdf_to_quad()`. */
- FZ_FUNCTION FzQuad pdf_to_quad(const PdfObj& array, int offset);
- /** Class-aware wrapper for `::pdf_to_real()`. */
- FZ_FUNCTION float pdf_to_real(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_to_real_default()`. */
- FZ_FUNCTION float pdf_to_real_default(const PdfObj& obj, float def);
- /** Class-aware wrapper for `::pdf_to_rect()`. */
- FZ_FUNCTION FzRect pdf_to_rect(const PdfObj& array);
- /** Class-aware wrapper for `::pdf_to_str_buf()`. */
- FZ_FUNCTION char *pdf_to_str_buf(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_to_str_len()`. */
- FZ_FUNCTION size_t pdf_to_str_len(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_to_string()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_to_string(::pdf_obj *obj)` => `(const char *, size_t sizep)`
- */
- FZ_FUNCTION const char *pdf_to_string(const PdfObj& obj, size_t *sizep);
- /** Class-aware wrapper for `::pdf_to_text_string()`. */
- FZ_FUNCTION const char *pdf_to_text_string(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_toggle_layer_config_ui()`. */
- FZ_FUNCTION void pdf_toggle_layer_config_ui(const PdfDocument& doc, int ui);
- /** Class-aware wrapper for `::pdf_toggle_widget()`. */
- FZ_FUNCTION int pdf_toggle_widget(const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_tos_get_text()`. */
- FZ_FUNCTION FzText pdf_tos_get_text(const PdfTextObjectState& tos);
- /** Class-aware wrapper for `::pdf_tos_make_trm()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_tos_make_trm(::pdf_text_object_state *tos, ::pdf_text_state *text, ::pdf_font_desc *fontdesc, int cid, ::fz_matrix *trm)` => `(int, float adv)`
- */
- FZ_FUNCTION int pdf_tos_make_trm(const PdfTextObjectState& tos, const PdfTextState& text, const PdfFontDesc& fontdesc, int cid, FzMatrix& trm, float *adv);
- /** Class-aware wrapper for `::pdf_tos_move_after_char()`. */
- FZ_FUNCTION void pdf_tos_move_after_char(const PdfTextObjectState& tos);
- /** Class-aware wrapper for `::pdf_tos_newline()`. */
- FZ_FUNCTION void pdf_tos_newline(const PdfTextObjectState& tos, float leading);
- /** Class-aware wrapper for `::pdf_tos_reset()`. */
- FZ_FUNCTION void pdf_tos_reset(const PdfTextObjectState& tos, int render);
- /** Class-aware wrapper for `::pdf_tos_restore()`. */
- FZ_FUNCTION void pdf_tos_restore(const PdfTextObjectState& tos, ::fz_matrix save[2]);
- /** Class-aware wrapper for `::pdf_tos_save()`. */
- FZ_FUNCTION void pdf_tos_save(const PdfTextObjectState& tos, ::fz_matrix save[2]);
- /** Class-aware wrapper for `::pdf_tos_set_matrix()`. */
- FZ_FUNCTION void pdf_tos_set_matrix(const PdfTextObjectState& tos, float a, float b, float c, float d, float e, float f);
- /** Class-aware wrapper for `::pdf_tos_translate()`. */
- FZ_FUNCTION void pdf_tos_translate(const PdfTextObjectState& tos, float tx, float ty);
- /** Class-aware wrapper for `::pdf_trailer()`. */
- FZ_FUNCTION PdfObj pdf_trailer(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_undo()`. */
- FZ_FUNCTION void pdf_undo(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_undoredo_state()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_undoredo_state(::pdf_document *doc)` => `(int, int steps)`
- */
- FZ_FUNCTION int pdf_undoredo_state(const PdfDocument& doc, int *steps);
- /** Class-aware wrapper for `::pdf_undoredo_step()`. */
- FZ_FUNCTION const char *pdf_undoredo_step(const PdfDocument& doc, int step);
- /** Class-aware wrapper for `::pdf_unmark_obj()`. */
- FZ_FUNCTION void pdf_unmark_obj(const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_update_annot()`. */
- FZ_FUNCTION int pdf_update_annot(const PdfAnnot& annot);
- /** Class-aware wrapper for `::pdf_update_default_colorspaces()`. */
- FZ_FUNCTION FzDefaultColorspaces pdf_update_default_colorspaces(const FzDefaultColorspaces& old_cs, const PdfObj& res);
- /** Class-aware wrapper for `::pdf_update_object()`. */
- FZ_FUNCTION void pdf_update_object(const PdfDocument& doc, int num, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_update_page()`. */
- FZ_FUNCTION int pdf_update_page(const PdfPage& page);
- /** Class-aware wrapper for `::pdf_update_stream()`. */
- FZ_FUNCTION void pdf_update_stream(const PdfDocument& doc, const PdfObj& ref, const FzBuffer& buf, int compressed);
- /** Class-aware wrapper for `::pdf_update_widget()`. */
- FZ_FUNCTION int pdf_update_widget(const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_update_xobject()`. */
- FZ_FUNCTION void pdf_update_xobject(const PdfDocument& doc, const PdfObj& xobj, const FzRect& bbox, const FzMatrix& mat, const PdfObj& res, const FzBuffer& buffer);
- /** Class-aware wrapper for `::pdf_validate_change_history()`. */
- FZ_FUNCTION int pdf_validate_change_history(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_validate_changes()`. */
- FZ_FUNCTION int pdf_validate_changes(const PdfDocument& doc, int version);
- /** Class-aware wrapper for `::pdf_validate_signature()`. */
- FZ_FUNCTION int pdf_validate_signature(const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_verify_embedded_file_checksum()`. */
- FZ_FUNCTION int pdf_verify_embedded_file_checksum(const PdfObj& fs);
- /** Class-aware wrapper for `::pdf_version()`. */
- FZ_FUNCTION int pdf_version(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_walk_tree()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_walk_tree(::pdf_obj *tree, ::pdf_obj *kid_name, void (*arrive)(::fz_context *, ::pdf_obj *, void *, ::pdf_obj **), void (*leave)(::fz_context *, ::pdf_obj *, void *), void *arg, ::pdf_obj **names, ::pdf_obj **values)` => `()`
- */
- FZ_FUNCTION void pdf_walk_tree(const PdfObj& tree, const PdfObj& kid_name, void (*arrive)(::fz_context *, ::pdf_obj *, void *, ::pdf_obj **), void (*leave)(::fz_context *, ::pdf_obj *, void *), void *arg, PdfObj& names, PdfObj& values);
- /** Class-aware wrapper for `::pdf_was_pure_xfa()`. */
- FZ_FUNCTION int pdf_was_pure_xfa(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_was_repaired()`. */
- FZ_FUNCTION int pdf_was_repaired(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_widget_is_readonly()`. */
- FZ_FUNCTION int pdf_widget_is_readonly(const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_widget_is_signed()`. */
- FZ_FUNCTION int pdf_widget_is_signed(const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_widget_type()`. */
- FZ_FUNCTION enum pdf_widget_type pdf_widget_type(const PdfAnnot& widget);
- /** Class-aware wrapper for `::pdf_write_digest()`. */
- FZ_FUNCTION void pdf_write_digest(const FzOutput& out, const PdfObj& byte_range, const PdfObj& field, size_t digest_offset, size_t digest_length, const PdfPkcs7Signer& signer);
- /** Class-aware wrapper for `::pdf_write_document()`. */
- FZ_FUNCTION void pdf_write_document(const PdfDocument& doc, const FzOutput& out, PdfWriteOptions& opts);
- /** Class-aware wrapper for `::pdf_write_journal()`. */
- FZ_FUNCTION void pdf_write_journal(const PdfDocument& doc, const FzOutput& out);
- /** Class-aware wrapper for `::pdf_write_snapshot()`. */
- FZ_FUNCTION void pdf_write_snapshot(const PdfDocument& doc, const FzOutput& out);
- /** Class-aware wrapper for `::pdf_xobject_bbox()`. */
- FZ_FUNCTION FzRect pdf_xobject_bbox(const PdfObj& xobj);
- /** Class-aware wrapper for `::pdf_xobject_colorspace()`. */
- FZ_FUNCTION FzColorspace pdf_xobject_colorspace(const PdfObj& xobj);
- /** Class-aware wrapper for `::pdf_xobject_isolated()`. */
- FZ_FUNCTION int pdf_xobject_isolated(const PdfObj& xobj);
- /** Class-aware wrapper for `::pdf_xobject_knockout()`. */
- FZ_FUNCTION int pdf_xobject_knockout(const PdfObj& xobj);
- /** Class-aware wrapper for `::pdf_xobject_matrix()`. */
- FZ_FUNCTION FzMatrix pdf_xobject_matrix(const PdfObj& xobj);
- /** Class-aware wrapper for `::pdf_xobject_resources()`. */
- FZ_FUNCTION PdfObj pdf_xobject_resources(const PdfObj& xobj);
- /** Class-aware wrapper for `::pdf_xobject_transparency()`. */
- FZ_FUNCTION int pdf_xobject_transparency(const PdfObj& xobj);
- /** Class-aware wrapper for `::pdf_xref_ensure_incremental_object()`. */
- FZ_FUNCTION int pdf_xref_ensure_incremental_object(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_xref_ensure_local_object()`. */
- FZ_FUNCTION void pdf_xref_ensure_local_object(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_xref_entry_map()`. */
- FZ_FUNCTION void pdf_xref_entry_map(const PdfDocument& doc, void (*fn)(::fz_context *, ::pdf_xref_entry *, int , ::pdf_document *, void *), void *arg);
- /** Class-aware wrapper for `::pdf_xref_is_incremental()`. */
- FZ_FUNCTION int pdf_xref_is_incremental(const PdfDocument& doc, int num);
- /** Class-aware wrapper for `::pdf_xref_len()`. */
- FZ_FUNCTION int pdf_xref_len(const PdfDocument& doc);
- /** Class-aware wrapper for `::pdf_xref_obj_is_unsaved_signature()`. */
- FZ_FUNCTION int pdf_xref_obj_is_unsaved_signature(const PdfDocument& doc, const PdfObj& obj);
- /** Class-aware wrapper for `::pdf_xref_remove_unsaved_signature()`. */
- FZ_FUNCTION void pdf_xref_remove_unsaved_signature(const PdfDocument& doc, const PdfObj& field);
- /** Class-aware wrapper for `::pdf_xref_store_unsaved_signature()`. */
- FZ_FUNCTION void pdf_xref_store_unsaved_signature(const PdfDocument& doc, const PdfObj& field, const PdfPkcs7Signer& signer);
- /** Class-aware wrapper for `::pdf_zugferd_profile()`.
-
- This function has out-params. Python/C# wrappers look like:
- `pdf_zugferd_profile(::pdf_document *doc)` => `(enum pdf_zugferd_profile, float version)`
- */
- FZ_FUNCTION enum pdf_zugferd_profile pdf_zugferd_profile(const PdfDocument& doc, float *version);
- /** Class-aware wrapper for `::pdf_zugferd_profile_to_string()`. */
- FZ_FUNCTION const char *pdf_zugferd_profile_to_string(enum pdf_zugferd_profile profile);
- /** Class-aware wrapper for `::pdf_zugferd_xml()`. */
- FZ_FUNCTION FzBuffer pdf_zugferd_xml(const PdfDocument& doc);
- /* Class-aware wrapper for `pdf_dict_getl()`. `keys` must be null-terminated list of
- `pdf_obj*`'s, not `PdfObj*`'s, so that conventional
- use with `PDF_NAME()` works. */
- FZ_FUNCTION PdfObj pdf_dict_getlv( PdfObj& dict, va_list keys);
- /* Class-aware wrapper for `pdf_dict_getl()`. `...` must be null-terminated list of
- `pdf_obj*`'s, not `PdfObj*`'s, so that conventional
- use with `PDF_NAME()` works. [We use pointer `dict` arg because variadic
- args do not with with reference args.] */
- FZ_FUNCTION PdfObj pdf_dict_getl( PdfObj* dict, ...);
- } /* End of namespace mupdf. */
- #endif
|