#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    5
    Rep Power
    0

    'asp 0106 : 80020005'


    َAll right ,
    you are guys my last chance , so please try to help me please ,

    here you are the whole story :
    i'm using FPDF with asp to generate pdf files , till now every thing is fine , the pdf works well.
    but , i want to add a font , a ttf file , because some characters don't show up properly , and here you are the .js file amien.js:
    Code:
    xtype='TrueType'; xname='Amien-01'; xdesc=lib.newArray('Ascent',1016,'Descent',-231,'CapHeight',1016,'Flags',32,'FontBBox','[-104 -231 714 1016]','ItalicAngle',0,'StemV',70,'MissingWidth',1000); xup=0; xut=0; xcw=lib.newArray( lib.chr(0),1000,lib.chr(1),1000,lib.chr(2),1000,lib.chr(3),1000,lib.chr(4),1000,lib.chr(5),1000,lib.chr(6),1000,lib.chr(7),1000,lib.chr(8),1000,lib.chr(9),1000,lib.chr(10),1000,lib.chr(11),1000,lib.chr(12),1000,lib.chr(13),1000,lib.chr(14),1000,lib.chr(15),1000,lib.chr(16),1000,lib.chr(17),1000,lib.chr(18),1000,lib.chr(19),1000,lib.chr(20),1000,lib.chr(21),1000, lib.chr(22),1000,lib.chr(23),1000,lib.chr(24),1000,lib.chr(25),1000,lib.chr(26),1000,lib.chr(27),1000,lib.chr(28),1000,lib.chr(29),1000,lib.chr(30),1000,lib.chr(31),1000,' ',1000,'!',1000,'"',1000,'#',1000,'x',1000,'%',1000,'&',1000,'\'',1000,'(',1000,')',1000,'*',1000,'+',1000, ',',1000,'-',1000,'.',1000,'/',1000,'0',1000,'1',1000,'2',1000,'3',1000,'4',1000,'5',1000,'6',1000,'7',1000,'8',1000,'9',1000,':',1000,';',1000,'<',1000,'=',1000,'>',1000,'?',1000,'@',1000,'A',1000, 'B',1000,'C',1000,'D',1000,'E',1000,'F',1000,'G',1000,'H',1000,'I',1000,'J',1000,'K',1000,'L',1000,'M',1000,'N',1000,'O',1000,'P',1000,'Q',1000,'R',1000,'S',1000,'T',1000,'U',1000,'V',1000,'W',1000, 'X',1000,'Y',1000,'Z',1000,'[',1000,'\\',1000,']',1000,'^',1000,'_',1000,'`',1000,'a',1000,'b',1000,'c',1000,'d',1000,'e',1000,'f',1000,'g',1000,'h',1000,'i',1000,'j',1000,'k',1000,'l',1000,'m',1000, 'n',1000,'o',1000,'p',1000,'q',1000,'r',1000,'s',1000,'t',1000,'u',1000,'v',1000,'w',1000,'x',1000,'y',1000,'z',1000,'{',1000,'|',1000,'}',1000,'~',1000,lib.chr(127),1000,lib.chr(128),1000,lib.chr(129),1000,lib.chr(130),1000,lib.chr(131),1000, lib.chr(132),1000,lib.chr(133),1000,lib.chr(134),1000,lib.chr(135),1000,lib.chr(136),1000,lib.chr(137),1000,lib.chr(138),1000,lib.chr(139),1000,lib.chr(140),1000,lib.chr(141),1000,lib.chr(142),1000,lib.chr(143),1000,lib.chr(144),1000,lib.chr(145),1000,lib.chr(146),1000,lib.chr(147),1000,lib.chr(148),1000,lib.chr(149),1000,lib.chr(150),1000,lib.chr(151),1000,lib.chr(152),1000,lib.chr(153),1000, lib.chr(154),1000,lib.chr(155),1000,lib.chr(156),1000,lib.chr(157),1000,lib.chr(158),1000,lib.chr(159),1000,lib.chr(160),1000,lib.chr(161),1000,lib.chr(162),1000,lib.chr(163),1000,lib.chr(164),1000,lib.chr(165),1000,lib.chr(166),1000,lib.chr(167),1000,lib.chr(168),1000,lib.chr(169),1000,lib.chr(170),1000,lib.chr(171),1000,lib.chr(172),1000,lib.chr(173),1000,lib.chr(174),1000,lib.chr(175),1000, lib.chr(176),1000,lib.chr(177),1000,lib.chr(178),1000,lib.chr(179),1000,lib.chr(180),1000,lib.chr(181),1000,lib.chr(182),1000,lib.chr(183),1000,lib.chr(184),1000,lib.chr(185),1000,lib.chr(186),1000,lib.chr(187),1000,lib.chr(188),1000,lib.chr(189),1000,lib.chr(190),1000,lib.chr(191),1000,lib.chr(192),1000,lib.chr(193),1000,lib.chr(194),1000,lib.chr(195),1000,lib.chr(196),1000,lib.chr(197),1000, lib.chr(198),1000,lib.chr(199),1000,lib.chr(200),1000,lib.chr(201),1000,lib.chr(202),1000,lib.chr(203),1000,lib.chr(204),1000,lib.chr(205),1000,lib.chr(206),1000,lib.chr(207),1000,lib.chr(208),1000,lib.chr(209),1000,lib.chr(210),1000,lib.chr(211),1000,lib.chr(212),1000,lib.chr(213),1000,lib.chr(214),1000,lib.chr(215),1000,lib.chr(216),1000,lib.chr(217),1000,lib.chr(218),1000,lib.chr(219),1000, lib.chr(220),1000,lib.chr(221),1000,lib.chr(222),1000,lib.chr(223),1000,lib.chr(224),1000,lib.chr(225),1000,lib.chr(226),1000,lib.chr(227),1000,lib.chr(228),1000,lib.chr(229),1000,lib.chr(230),1000,lib.chr(231),1000,lib.chr(232),1000,lib.chr(233),1000,lib.chr(234),1000,lib.chr(235),1000,lib.chr(236),1000,lib.chr(237),1000,lib.chr(238),1000,lib.chr(239),1000,lib.chr(240),1000,lib.chr(241),1000, lib.chr(242),1000,lib.chr(243),1000,lib.chr(244),1000,lib.chr(245),1000,lib.chr(246),1000,lib.chr(247),1000,lib.chr(248),1000,lib.chr(249),1000,lib.chr(250),1000,lib.chr(251),1000,lib.chr(252),1000,lib.chr(253),1000,lib.chr(254),1000,lib.chr(255),1000); xenc='cp1252'; xdiff=''; xfile='Amien_01.ttf'; xoriginalsize=24136;

    and this is the asp code :

    Code:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!-- #include file="fpdf.asp " --> <% Set pdf=CreateJsObject("FPDF") set objInformations = server.createobject("ADODB.RECORDSET") pdf.CreatePDF() pdf.AddFont "amien" pdf.SetPath("fpdf/") pdf.Open() pdf.AddPage() '---------------------------------------------------------------------- ' EntÍte du document '---------------------------------------------------------------------- pdf.SetFont "amien", "",6 pdf.SetTextColor 0,0,0 pdf.Cell 0,5, "الاتحاد المغربي" ,"",1,"L" pdf.Cell 0,5,"","",1,"C" pdf.Close() pdf.Output() %>

    the result is :

    <p>Objet Response</font> <font face="Arial" size=2>error 'ASP 0106 : 80020005'</font>
    <p>
    <font face="Arial" size=2>Types non correspondants</font>
    <p>
    <font face="Arial" size=2>/ing2010/ing_scripts/fr/pdf/fpdf.asp </font><font face="Arial" size=2>, line 892</font>
    <p>
    <font face="Arial" size=2>Un type de donn&#233;es non pris en charge s'est pr&#233;sent&#233;.
    </font>



    please please please help me out of this nightmare
    i'm waiting for your answers pleaaaaaaase
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,443
    Rep Power
    4539
    Your posted code is missing all line breaks and is unreadable, try reposting the code and identify any asp errors and what line they might occur on, all you showed was some html string including an error message.

    If you have any 'on error resume next' statements in your asp code take them out while debugging.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    5
    Rep Power
    0
    hello Doug ,
    thank you for answering me ,
    here you are the code test.asp :

    Code:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
     
     
    <!-- #include file="fpdf.asp " -->
    <%
       Set pdf=CreateJsObject("FPDF")
       set objInformations = server.createobject("ADODB.RECORDSET")
       pdf.CreatePDF()
       pdf.SetPath("fpdf/")
       pdf.Open()
       pdf.AddPage()
      
     
    'Here the code for adding the font and it's the cause of the 
    'problem
    	pdf.AddFont "amien"
    	'pdf.SetFont "amien", "",6
    	pdf.SetTextColor 0,0,0
    'here is the arabic text that i want to display in pdf
    	pdf.Cell 0,5, "الاتحاد المغربي" ,"",1,"L"
    	pdf.Close()
    	
    	
    	pdf.Output()
    %>
    this link will show this code too (test.asp) : http://www.mediafire.com/?hd92z3ca3npufh2

    the code of the font amien.js is here :

    Code:
    xtype='TrueType';
    xname='Amien-01';
    xdesc=lib.newArray('Ascent',1016,'Descent',-231,'CapHeight',1016,'Flags',32,'FontBBox','[-104 -231 714 1016]','ItalicAngle',0,'StemV',70,'MissingWidth',1000);
    xup=0;
    xut=0;
    xcw=lib.newArray(lib.chr(0),1000,lib.chr(1),1000,lib.chr(2),
    1000,lib.chr(3),1000,lib.chr(4),1000,lib.chr(5),1000,lib.chr(6),
    1000,lib.chr(7),1000,lib.chr(8),1000,lib.chr(9),1000,lib.chr(10),1000,lib.chr(11),1000,lib.chr(12),1000,lib.chr(13),1000,
    lib.chr(14),1000,lib.chr(15),1000,lib.chr(16),1000,lib.chr(17),
    1000,lib.chr(18),1000,lib.chr(19),1000,lib.chr(20),1000,
    lib.chr(21),1000,lib.chr(22),1000,lib.chr(23),1000,lib.chr(24),
    1000,lib.chr(25),1000,lib.chr(26),1000,lib.chr(27),1000,
    lib.chr(28),1000,lib.chr(29),1000,lib.chr(30),1000,lib.chr(31),
    1000,'',1000,'!',1000,'"',1000,'#',1000,'x',1000,'%',1000,'&',
    1000,'\'',1000,'(',1000,')',1000,'*',1000,'+',1000,',',1000,'',1000,
    '.',1000,'/',1000,'0',1000,'1',1000,'2',1000,'3',1000,'4',1000,'5',
    1000,'6',1000,'7',1000,'8',1000,'9',1000,':',1000,';',1000,'<',
    1000,'=',1000,'>',1000,'?',1000,'@',1000,'A',1000,'B',1000,'C',
    1000,'D',1000,'E',1000,'F',1000,'G',1000,'H',1000,'I',1000,'J',
    1000,'K',1000,'L',1000,'M',1000,'N',1000,'O',1000,'P',1000,'Q',
    1000,'R',1000,'S',1000,'T',1000,'U',1000,'V',1000,'W',1000,'X',
    1000,'Y',1000,'Z',1000,'[',1000,'\\',1000,']',1000,'^',1000,'_',
    1000,'`',1000,'a',1000,'b',1000,'c',1000,'d',1000,'e',1000,'f',
    1000,'g',1000,'h',1000,'i',1000,'j',1000,'k',1000,'l',1000,'m',1000,
    'n',1000,'o',1000,'p',1000,'q',1000,'r',1000,'s',1000,'t',1000,'u',
    1000,'v',1000,'w',1000,'x',1000,'y',1000,'z',1000,'{',1000,'|',
    1000,'}',1000,'~',1000,lib.chr(127),1000,lib.chr(128),1000,
    lib.chr(129),1000,lib.chr(130),1000,lib.chr(131),1000,
    lib.chr(132),1000,lib.chr(133),1000,lib.chr(134),1000,
    lib.chr(135),1000,lib.chr(136),1000,lib.chr(137),1000,
    lib.chr(138),1000,lib.chr(139),1000,lib.chr(140),1000,
    lib.chr(141),1000,lib.chr(142),1000,lib.chr(143),1000,
    lib.chr(144),1000,lib.chr(145),1000,lib.chr(146),1000,
    lib.chr(147),1000,lib.chr(148),1000,lib.chr(149),1000,
    lib.chr(150),1000,lib.chr(151),1000,lib.chr(152),1000,
    lib.chr(153),1000,lib.chr(154),1000,lib.chr(155),1000,
    lib.chr(156),1000,lib.chr(157),1000,lib.chr(158),1000,
    lib.chr(159),1000,lib.chr(160),1000,lib.chr(161),1000,
    lib.chr(162),1000,lib.chr(163),1000,lib.chr(164),1000,
    lib.chr(165),1000,lib.chr(166),1000,lib.chr(167),1000,
    lib.chr(168),1000,lib.chr(169),1000,lib.chr(170),1000,
    lib.chr(171),1000,lib.chr(172),1000,lib.chr(173),1000,
    lib.chr(174),1000,lib.chr(175),1000,lib.chr(176),1000,
    lib.chr(177),1000,lib.chr(178),1000,lib.chr(179),1000,
    lib.chr(180),1000,lib.chr(181),1000,lib.chr(182),1000,
    lib.chr(183),1000,lib.chr(184),1000,lib.chr(185),1000,
    lib.chr(186),1000,lib.chr(187),1000,lib.chr(188),1000,
    lib.chr(189),1000,lib.chr(190),1000,lib.chr(191),1000,
    lib.chr(192),1000,lib.chr(193),1000,lib.chr(194),1000,
    lib.chr(195),1000,lib.chr(196),1000,lib.chr(197),1000,
    lib.chr(198),1000,lib.chr(199),1000,lib.chr(200),1000,
    lib.chr(201),1000,lib.chr(202),1000,lib.chr(203),1000,
    lib.chr(204),1000,lib.chr(205),1000,lib.chr(206),1000,
    lib.chr(207),1000,lib.chr(208),1000,lib.chr(209),1000,
    lib.chr(210),1000,lib.chr(211),1000,lib.chr(212),1000,
    lib.chr(213),1000,lib.chr(214),1000,lib.chr(215),1000,
    lib.chr(216),1000,lib.chr(217),1000,lib.chr(218),1000,
    lib.chr(219),1000,lib.chr(220),1000,lib.chr(221),1000,
    lib.chr(222),1000,lib.chr(223),1000,lib.chr(224),1000,
    lib.chr(225),1000,lib.chr(226),1000,lib.chr(227),1000,
    lib.chr(228),1000,lib.chr(229),1000,lib.chr(230),1000,
    lib.chr(231),1000,lib.chr(232),1000,lib.chr(233),1000,
    lib.chr(234),1000,lib.chr(235),1000,lib.chr(236),1000,
    lib.chr(237),1000,lib.chr(238),1000,lib.chr(239),1000,
    lib.chr(240),1000,lib.chr(241),1000,lib.chr(242),1000,
    ib.chr(243),1000,lib.chr(244),1000,lib.chr(245),1000,
    lib.chr(246),1000,lib.chr(247),1000,lib.chr(248),1000,
    lib.chr(249),1000,lib.chr(250),1000,lib.chr(251),1000,
    lib.chr(252),1000,lib.chr(253),1000,lib.chr(254),1000,
    lib.chr(255),1000);
    xenc='cp1252';
    xdiff='';
    xfile='Amien_01.ttf';
    xoriginalsize=24136;
    the line 892 that generates the problem is :
    Code:
    if (!this.hasBinary){
    				Response.Write(this.buffer)}
    			else{
    				xfile=Server.MapPath(lib.fso.GetTempName())
    				xf=lib.fopen(xfile,"wb");
    				if(xf.number)this.Error("Unable to create output file: " + xfile);
    				lib.fwrite(xf,this.buffer);
    				lib.fclose(xf);
    				outB = Server.CreateObject("ADODB.Stream")
    				outB.Type = 1
    				outB.Open()
    				outB.LoadFromFile (xfile)
    'THIS IS THE LINE 891
    				Response.BinaryWrite(outB.Read())
    				outB.Close()
    				lib.fso.DeleteFile(xfile);
    				}
    fpdf.asp is in this link :http://www.mediafire.com/?krut876p02r388p

    i hope you can find something
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,443
    Rep Power
    4539
    I don't know an answer. If you have any 'on error resume next' statement in your code take it out for debugging.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo