Re: [fpc-pascal] How do I test the testfppdf on Windows?
On 2016-03-05 20:24, Ralf Quint wrote: > "The font 'Times' contains a bad /BBox"... I found the problem and fixed this locally. I'm busy cleaning up the fix, then test against all available PDF viewers I have. This fix should be in the repo in a day or two. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On 2016-03-18 10:51, Michael Van Canneyt wrote: > Please, only fpcunit tests. I was maybe unclear in my request. The unit tests are implemented with the FPCUnit API - and always will be (even though both FPCUnit and FPTest have compatibility interfaces with each other). I'm simply asking for the two program files to be added - for convenience. Similar to what the *.lpi files are added to FCL, even though Free Pascal doesn't include Lazarus IDE. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On 2016-03-18 10:16, Michael Van Canneyt wrote: > There is already a test added, see my private mail to you from this morning. Ah, I see it now. Thanks. At the time of my message I was still kick-starting my brain with my first cup of coffee. ;-) ps: What is FPC's policy on using unittest frameworks? Does it only allow FPCUnit based test projects in FCL. The unittest units for fcl-pdf are already FPCUnit and FPTest compatible. All that is missing is the Console and GUI project files for FPTest support (located in the Wisa repository). Adding those two files, if possible, would be greatly appreciated. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Fri, 18 Mar 2016, Jesus Reyes A. wrote: En Thu, 17 Mar 2016 21:10:03 -0600, silvioprog escribió: On Tue, Mar 15, 2016 at 4:38 AM, Michael Van Canneyt wrote: [...] I have (hopefully) fixed this. rev. 33255. The crash was fixed after upgrade my FPC. But it still generating five empty pages even applying the Jesus Reyes' patch. :-/ --Silvio Clécio I took a look at the pdf file you posted on march 5. I think I know why your file looks so odd, all numeric values non-integers are written in the pdf file using COMMA :) Hah ! You think you've tested everything, and then this kind of thing pops up :-) I committed a quick fix which should fix the comma issue, but it still needs to be adapted. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On 2016-03-18 07:57, Michael Van Canneyt wrote: > You think you've tested everything, and then this kind of thing pops up :-) Indeed. If you haven't yet, I'll extend the unit tests for that too. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Fri, 18 Mar 2016, Graeme Geldenhuys wrote: On 2016-03-18 10:16, Michael Van Canneyt wrote: There is already a test added, see my private mail to you from this morning. Ah, I see it now. Thanks. At the time of my message I was still kick-starting my brain with my first cup of coffee. ;-) ps: What is FPC's policy on using unittest frameworks? Does it only allow FPCUnit based test projects in FCL. The unittest units for fcl-pdf are already FPCUnit and FPTest compatible. All that is missing is the Console and GUI project files for FPTest support (located in the Wisa repository). Adding those two files, if possible, would be greatly appreciated. Please, only fpcunit tests. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
En Thu, 17 Mar 2016 21:10:03 -0600, silvioprog escribió: On Tue, Mar 15, 2016 at 4:38 AM, Michael Van Canneyt wrote: [...] I have (hopefully) fixed this. rev. 33255. The crash was fixed after upgrade my FPC. But it still generating five empty pages even applying the Jesus Reyes' patch. :-/ --Silvio Clécio I took a look at the pdf file you posted on march 5. I think I know why your file looks so odd, all numeric values non-integers are written in the pdf file using COMMA :) This is an extract of some stream on your file: /F3 23 Tf 0 0 0 RG BT 70,87 785,31 TD (Basic Shapes) Tj ET 1 0 0 RG 0,21 0,7 0,27 rg 1 J 3 w 85,04 615,23 113,39 56,69 re An this is how it should look: /F3 23 Tf 0 0 0 RG BT 70.87 785.31 TD (Basic Shapes) Tj ET 1 0 0 RG 0.21 0.7 0.27 rg 1 J 3 w 85.04 615.23 113.39 56.69 re so your locale is playing a role here, numeric conversions in the pdf library should be made locale agnostic. try to change your decimalseparator to "." before and try again. Jesus Reyes A. -- Usando el cliente de correo de Opera: http://www.opera.com/mail/___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Tue, Mar 15, 2016 at 4:38 AM, Michael Van Canneyt wrote: [...] > I have (hopefully) fixed this. rev. 33255. The crash was fixed after upgrade my FPC. But it still generating five empty pages even applying the Jesus Reyes' patch. :-/ -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Fri, 18 Mar 2016, Graeme Geldenhuys wrote: On 2016-03-18 07:57, Michael Van Canneyt wrote: You think you've tested everything, and then this kind of thing pops up :-) Indeed. If you haven't yet, I'll extend the unit tests for that too. There is already a test added, see my private mail to you from this morning. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Mon, 14 Mar 2016, silvioprog wrote: On Fri, Mar 11, 2016 at 4:35 AM, Michael Van Canneyt wrote: On Thu, 10 Mar 2016, silvioprog wrote: On Sat, Mar 5, 2016 at 3:38 PM, silvioprog wrote: [...] ... however, when I try to run the project, I get a SIGSEGV: This patch (by Gilson Nunes) fix the SIGSEGV: http://bugs.freepascal.org/view.php?id=29812. Improved and applied, thank you. However, the example still making empty pages on Windows. (I'll ask Gilson to help us to fix this problem ...) Did you try the patch by Jesus Reyes ? Not yet, because I get a new error: An unhandled exception occurred at $0041EECF: EListError: List index (0) out of bounds I have (hopefully) fixed this. rev. 33255. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Fri, Mar 11, 2016 at 4:35 AM, Michael Van Canneyt wrote: > > On Thu, 10 Mar 2016, silvioprog wrote: > > On Sat, Mar 5, 2016 at 3:38 PM, silvioprog wrote: >> [...] >> >> ... however, when I try to run the project, I get a SIGSEGV: >>> >>> >> This patch (by Gilson Nunes) fix the SIGSEGV: >> http://bugs.freepascal.org/view.php?id=29812. >> > > Improved and applied, thank you. > > >> However, the example still making empty pages on Windows. (I'll ask Gilson >> to help us to fix this problem ...) >> > > Did you try the patch by Jesus Reyes ? Not yet, because I get a new error: An unhandled exception occurred at $0041EECF: EListError: List index (0) out of bounds $0041EECF $00432EAA TPDFDOCUMENT__INDEXOFGLOBALXREF, line 2746 of C:/dev/git/freepascal/packages/fcl-pdf/src/fppdf.pp $00432F15 TPDFDOCUMENT__FINDGLOBALXREF, line 2759 of C:/dev/git/freepascal/packages/fcl-pdf/src/fppdf.pp $004348A5 TPDFDOCUMENT__GLOBALXREFBYNAME, line 3212 of C:/dev/git/freepascal/packages/fcl-pdf/src/fppdf.pp $0043341A TPDFDOCUMENT__CREATEPREFERENCESENTRY, line 2858 of C:/dev/git/freepascal/packages/fcl-pdf/src/fppdf.pp $00434B42 TPDFDOCUMENT__STARTDOCUMENT, line 3242 of C:/dev/git/freepascal/packages/fcl-pdf/src/fppdf.pp $0040177F SETUPDOCUMENT, line 22 of testfppdf.lpr $00402BF4 main, line 427 of testfppdf.lpr -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Thu, 10 Mar 2016, silvioprog wrote: On Sat, Mar 5, 2016 at 3:38 PM, silvioprog wrote: [...] ... however, when I try to run the project, I get a SIGSEGV: This patch (by Gilson Nunes) fix the SIGSEGV: http://bugs.freepascal.org/view.php?id=29812. Improved and applied, thank you. However, the example still making empty pages on Windows. (I'll ask Gilson to help us to fix this problem ...) Did you try the patch by Jesus Reyes ? Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On 11/03/2016 02:49, silvioprog wrote: However, the example still making empty pages on Windows. (I'll ask Gilson to help us to fix this problem ...) I'm back at work on Monday, then I'll take a look at all the issues raised. Regards, Graeme ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, Mar 5, 2016 at 3:38 PM, silvioprog wrote: [...] > ... however, when I try to run the project, I get a SIGSEGV: > This patch (by Gilson Nunes) fix the SIGSEGV: http://bugs.freepascal.org/view.php?id=29812. However, the example still making empty pages on Windows. (I'll ask Gilson to help us to fix this problem ...) -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Wed, 9 Mar 2016, Jesus Reyes A. wrote: Please do, I'd welcome any hints as to what could be wrong ! (evince is one of the readers that was used to test, BTW) Michael. The problem of evince not showing some texts it's because the compressed font file stream size is written with an incorrect value. There is an option to enable font file compression (poCompressFonts) but in the code, compression is always enabled, the compressed stream size is returned in the function that writes down the compressed stream, too late because the /length item was already written using the uncompressed size. The attached patch addresses both problems and makes sure length1 item is not written down if not needed. I will wait till Graeme comes back and discuss this with him: The solution with 'Hidden' property does look very much like a hack :/ This however doesn't fix the Cyrillic and other texts :( Well: in each case thank you very much for identifying the problem, this is a great help ! Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sun, 06 Mar 2016 03:15:06 -0600, Michael Van Canneyt wrote: Forgot to say, this is how it now looks the generated document: http://ctrlv.in/724645 Jesus Reyes A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sun, 06 Mar 2016 03:15:06 -0600, Michael Van Canneyt wrote: On Sat, 5 Mar 2016, Jesus Reyes A. wrote: On Sat, 05 Mar 2016 14:03:49 -0600, Michael Van Canneyt wrote: This is what I get with the normal test font: http://www.freepascal.org/~michael/test.pdf Can you please try with the original font too, please ? (freesans is freely available) If that works, it would mean there is something wrong with the Arial font handling. Michael. your file looks like the one I produced here when using "Visor de documentos" which happen to be evince, this is what it looks http://ctrlv.in/722669 the only change I did was adding JRAXX at the end of every P.WriteText'd string where XX is the index of each instance. Seems only latin text is working. Strange, because if I recall correctly it was tested with Cyrillic, and that worked ? Later I will try with other readers. Please do, I'd welcome any hints as to what could be wrong ! (evince is one of the readers that was used to test, BTW) Michael. The problem of evince not showing some texts it's because the compressed font file stream size is written with an incorrect value. There is an option to enable font file compression (poCompressFonts) but in the code, compression is always enabled, the compressed stream size is returned in the function that writes down the compressed stream, too late because the /length item was already written using the uncompressed size. The attached patch addresses both problems and makes sure length1 item is not written down if not needed. This however doesn't fix the Cyrillic and other texts :( Jesus Reyes A.Index: fppdf.pp === --- fppdf.pp(revisión: 33164) +++ fppdf.pp(copia de trabajo) @@ -396,8 +396,10 @@ private FKey: TPDFName; FObj: TPDFObject; +FHidden: Boolean; protected procedure Write(const AStream: TStream);override; +property Hidden : Boolean read FHidden write FHidden; public constructor Create(Const ADocument : TPDFDocument; const AKey: string; const AValue: TPDFObject); destructor Destroy; override; @@ -2397,10 +2399,13 @@ procedure TPDFDictionaryItem.Write(const AStream: TStream); begin - FKey.Write(AStream); - TPDFObject.WriteString(' ', AStream); - FObj.Write(AStream); - TPDFObject.WriteString(CRLF, AStream); + if not FHidden then + begin +FKey.Write(AStream); +TPDFObject.WriteString(' ', AStream); +FObj.Write(AStream); +TPDFObject.WriteString(CRLF, AStream); + end; end; constructor TPDFDictionaryItem.Create(Const ADocument : TPDFDocument;const AKey: string; const AValue: TPDFObject); @@ -2484,7 +2489,7 @@ var ISize,i, NumImg, NumFnt: integer; Value: string; - M : TMemoryStream; + M, Buf : TMemoryStream; E : TPDFDictionaryItem; D : TPDFDictionary; begin @@ -2520,18 +2525,29 @@ if Pos('Length1', E.FKey.Name) > 0 then begin M:=TMemoryStream.Create; +Buf:=TMemoryStream.Create; try Value:=E.FKey.Name; NumFnt:=StrToInt(Copy(Value, Succ(Pos(' ', Value)), Length(Value) - Pos(' ', Value))); m.LoadFromFile(Document.FontFiles[NumFnt]); + // write buffer with compressed (if requested) fontfile stream + ISize := TPDFEmbeddedFont.WriteEmbeddedFont(Document, M, Buf); + D:=Document.GlobalXRefs[AObject].Dict; + // if compression was enabled write Filter + if poCompressFonts in Document.Options then + begin +D.AddName('Filter','FlateDecode'); +LastElement.Write(AStream); + end; // write fontfile stream length in xobject dictionary - D:=Document.GlobalXRefs[AObject].Dict; - D.AddInteger('Length',M.Size); + D.AddInteger('Length',ISize); LastElement.Write(AStream); WriteString('>>', AStream); // write fontfile stream in xobject dictionary - TPDFEmbeddedFont.WriteEmbeddedFont(Document, M, AStream); + Buf.Position := 0; + Buf.SaveToStream(AStream); finally + Buf.Free; M.Free; end; end; @@ -3099,8 +3115,8 @@ begin FDict:=CreateGlobalXRef.Dict; - FDict.AddName('Filter','FlateDecode'); FDict.AddInteger('Length1 '+IntToStr(EmbeddedFontNum),StrToInt(FontDef.FOriginalSize)); + FDict.LastElement.Hidden := not (poCompressFonts in Options); end; procedure TPDFDocument.CreateImageEntry(ImgWidth, ImgHeight, NumImg: integer); ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sun, Mar 6, 2016 at 6:30 AM, Luca Olivetti wrote: > El 06/03/16 a les 10:15, Michael Van Canneyt ha escrit: > >> Strange, because if I recall correctly it was tested with Cyrillic, and >> that worked ? >> >> Later I will try with other readers. >>> >> >> Please do, I'd welcome any hints as to what could be wrong ! >> >> (evince is one of the readers that was used to test, BTW) >> > > With okular I see this at the bottom of the first page > > > http://ctrlv.in/722862 > > > These are the details of my okular: > versió 0.23.2 > S'utilitza la «KDE Development Platform» 4.14.15 Same problem here. -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
El 06/03/16 a les 10:15, Michael Van Canneyt ha escrit: Strange, because if I recall correctly it was tested with Cyrillic, and that worked ? Later I will try with other readers. Please do, I'd welcome any hints as to what could be wrong ! (evince is one of the readers that was used to test, BTW) With okular I see this at the bottom of the first page http://ctrlv.in/722862 These are the details of my okular: versió 0.23.2 S'utilitza la «KDE Development Platform» 4.14.15 Bye -- Luca ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, 5 Mar 2016, silvioprog wrote: Hm. This is strange, the code does not use interfaces at all. The compilation hints/warnings do not really present me with a hint as to what could be wrong. Attached patch to fix warns/hints. (need to test it with FPC 2.6, I tested only in 3.0) Applied in rev. 33176. I added a fix for 2.6 compilation: no Default() intrinsic. Thanks for the patch. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sun, 6 Mar 2016, Graeme Geldenhuys wrote: On 05/03/2016 19:30, silvioprog wrote: Attached patch to fix warns/hints. (need to test it with FPC 2.6, I tested only in 3.0) Incidently, fppdf was only developed and tested with FPC 2.6.4 (FPC 3.0 was never used). I did some fixes for 3.0 prior to committing, and the test suites ran fine after that. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On 05/03/2016 19:30, silvioprog wrote: Attached patch to fix warns/hints. (need to test it with FPC 2.6, I tested only in 3.0) Incidently, fppdf was only developed and tested with FPC 2.6.4 (FPC 3.0 was never used). Regards, Graeme ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, 5 Mar 2016, Jesus Reyes A. wrote: On Sat, 05 Mar 2016 14:03:49 -0600, Michael Van Canneyt wrote: This is what I get with the normal test font: http://www.freepascal.org/~michael/test.pdf Can you please try with the original font too, please ? (freesans is freely available) If that works, it would mean there is something wrong with the Arial font handling. Michael. your file looks like the one I produced here when using "Visor de documentos" which happen to be evince, this is what it looks http://ctrlv.in/722669 the only change I did was adding JRAXX at the end of every P.WriteText'd string where XX is the index of each instance. Seems only latin text is working. Strange, because if I recall correctly it was tested with Cyrillic, and that worked ? Later I will try with other readers. Please do, I'd welcome any hints as to what could be wrong ! (evince is one of the readers that was used to test, BTW) Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On 05/03/2016 20:30, silvioprog wrote: "The font 'Times' contains a bad /BBox." Can you please try with the original font too, please ? (freesans is freely available) Yes. Do you downloaded it from http://ftp.gnu.org/gnu/freefont/freefont-ttf.zip ? If so, even using this file above I get same problem (Windows 7 64 bits). :-/ I don't have the code with me so can't check now. But if the issue is with Times related text, then FreeFont-ttf.zip should have nothing to do with the issue you are experiencing. From memory, the FreeFont font is used for the Unicode text only. I'll take a look on my return in a week's time (if Michael doesn't beat me to it). I'll retest with the latest Adobe Reader - clearly it is more strict than older Adobe Reader versions. If anybody knows of a online PDF validator (not a PDF Achive format validator), that would help a huge amount. Regards, Graeme ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, 05 Mar 2016 14:03:49 -0600, Michael Van Canneyt wrote: This is what I get with the normal test font: http://www.freepascal.org/~michael/test.pdf Can you please try with the original font too, please ? (freesans is freely available) If that works, it would mean there is something wrong with the Arial font handling. Michael. your file looks like the one I produced here when using "Visor de documentos" which happen to be evince, this is what it looks http://ctrlv.in/722669 the only change I did was adding JRAXX at the end of every P.WriteText'd string where XX is the index of each instance. Seems only latin text is working. Later I will try with other readers. Jesus Reyes A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, 5 Mar 2016, silvioprog wrote: On Sat, Mar 5, 2016 at 5:24 PM, Ralf Quint wrote: On 3/5/2016 12:03 PM, Michael Van Canneyt wrote: This is what I get with the normal test font: http://www.freepascal.org/~michael/test.pdf FYI, Opening up this document with the latest Adobe Reader DC (15.10.20059.40980, on Windows 8.1/64), I get an error message saying "The font 'Times' contains a bad /BBox"... Same problem here too. :-/ Hmh. I can reproduce this error, but the file displays using Adobe Acrobat Reader 9. OK, some more debugging/validation seems in order :/ Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, Mar 5, 2016 at 5:24 PM, Ralf Quint wrote: > On 3/5/2016 12:03 PM, Michael Van Canneyt wrote: > >> >> This is what I get with the normal test font: >> http://www.freepascal.org/~michael/test.pdf >> >> FYI, > > Opening up this document with the latest Adobe Reader DC > (15.10.20059.40980, on Windows 8.1/64), I get an error message saying > > "The font 'Times' contains a bad /BBox"... Same problem here too. :-/ -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, Mar 5, 2016 at 5:03 PM, Michael Van Canneyt wrote: > > On Sat, 5 Mar 2016, silvioprog wrote: > > Hm. I tried many PDF readers on the file. All unix based (okular, >>> openoffice), but also the Google docs PDF viewer and Firefox PDF reader. >>> All displayed the PDF just fine. >>> >>> >> Now I tried on Google PDF viewer, no errors, but: >> >> https://dl.dropboxusercontent.com/u/135304375/print.png >> >> (sent a print just to you see how it is showed for me) >> > > Hm. Strange. > > >> >> Can you send me the PDF you got ? >>> >> >> >> It's a pleasure :-) >> >> https://dl.dropboxusercontent.com/u/135304375/test.pdf >> > > Seems empty here too. > > This is what I get with the normal test font: > http://www.freepascal.org/~michael/test.pdf It open fine on Chrome, but on Adobe Reader: "The font 'Times' contains a bad /BBox." Can you please try with the original font too, please ? > (freesans is freely available) > Yes. Do you downloaded it from http://ftp.gnu.org/gnu/freefont/freefont-ttf.zip ? If so, even using this file above I get same problem (Windows 7 64 bits). :-/ > If that works, it would mean there is something wrong with the Arial font > handling. Same problem, and it persists even after install the font in my system. :-( -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On 3/5/2016 12:03 PM, Michael Van Canneyt wrote: This is what I get with the normal test font: http://www.freepascal.org/~michael/test.pdf FYI, Opening up this document with the latest Adobe Reader DC (15.10.20059.40980, on Windows 8.1/64), I get an error message saying "The font 'Times' contains a bad /BBox"... Ralf --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, 5 Mar 2016, silvioprog wrote: Hm. I tried many PDF readers on the file. All unix based (okular, openoffice), but also the Google docs PDF viewer and Firefox PDF reader. All displayed the PDF just fine. Now I tried on Google PDF viewer, no errors, but: https://dl.dropboxusercontent.com/u/135304375/print.png (sent a print just to you see how it is showed for me) Hm. Strange. Can you send me the PDF you got ? It's a pleasure :-) https://dl.dropboxusercontent.com/u/135304375/test.pdf Seems empty here too. This is what I get with the normal test font: http://www.freepascal.org/~michael/test.pdf Can you please try with the original font too, please ? (freesans is freely available) If that works, it would mean there is something wrong with the Arial font handling. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, Mar 5, 2016 at 3:58 PM, Michael Van Canneyt wrote: > On Sat, 5 Mar 2016, silvioprog wrote: > >> On Sat, Mar 5, 2016 at 3:38 PM, silvioprog wrote: >> >>> Hello, >>> >>> I just created the folder "fonts" and copied the >>> "C:\Windows\Fonts\arial.ttf" into that, so I changed the line >>> "D.AddFont('FreeSans.ttf', 'FreeSans-12' to "D.AddFont('arial.ttf', >>> 'Arial", however, when I try to run the project, I get a SIGSEGV: >>> >>> >> To fix the SIGSEGV, I just disabled the heap (-gh) unit. >> > > Hehe =-) > > >> Now I put all freetype binaries into my example folder, and after run the >> test, I got a "test.pdf" file about 654KB, but I can't open it on my Adobe >> Reader XI (latest version): >> >> "An error exists on this page. Acrobat may not display the page correctly. >> Please contact the person who created the PDF document to correct the >> problem." >> >> And got five empty pages. >> > > Hm. I tried many PDF readers on the file. All unix based (okular, > openoffice), but also the Google docs PDF viewer and Firefox PDF reader. > All displayed the PDF just fine. > Now I tried on Google PDF viewer, no errors, but: https://dl.dropboxusercontent.com/u/135304375/print.png (sent a print just to you see how it is showed for me) > Can you send me the PDF you got ? It's a pleasure :-) https://dl.dropboxusercontent.com/u/135304375/test.pdf . -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, Mar 5, 2016 at 3:56 PM, Michael Van Canneyt wrote: > > On Sat, 5 Mar 2016, silvioprog wrote: > >> Hello, >> >> I just created the folder "fonts" and copied the >> "C:\Windows\Fonts\arial.ttf" into that, so I changed the line >> "D.AddFont('FreeSans.ttf', 'FreeSans-12' to "D.AddFont('arial.ttf', >> 'Arial", however, when I try to run the project, I get a SIGSEGV: >> >> #0 >> >> WRPR_$SYSTEM_$$_TINTERFACEDOBJECT_$_IUNKNOWN_$_2_$_SYSTEM$_$TINTERFACEDOBJECT_$__$$__RELEASE$$LONGINT >> at :0 >> #1 ?? at :0 >> #2 ?? at :0 >> #3 ?? at :0 >> #4 >> >> WRPR_$SYSTEM_$$_TINTERFACEDOBJECT_$_IUNKNOWN_$_2_$_SYSTEM$_$TINTERFACEDOBJECT_$__$$__RELEASE$$LONGINT >> at :0 >> #5 ?? at :0 >> >> I also get some warnings and hints in the compilation: >> > > Hm. This is strange, the code does not use interfaces at all. > The compilation hints/warnings do not really present me with a hint as to > what could be wrong. > Attached patch to fix warns/hints. (need to test it with FPC 2.6, I tested only in 3.0) > Any chance to get a better stack backtrace ? Yes. I'm trying to get that, it seems more related to the TComponent class, that uses interfaces. -- Silvio Clécio 0001-Remove-warnings-and-hints.patch Description: Binary data ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, 5 Mar 2016, silvioprog wrote: On Sat, Mar 5, 2016 at 3:38 PM, silvioprog wrote: Hello, I just created the folder "fonts" and copied the "C:\Windows\Fonts\arial.ttf" into that, so I changed the line "D.AddFont('FreeSans.ttf', 'FreeSans-12' to "D.AddFont('arial.ttf', 'Arial", however, when I try to run the project, I get a SIGSEGV: To fix the SIGSEGV, I just disabled the heap (-gh) unit. Hehe =-) Now I put all freetype binaries into my example folder, and after run the test, I got a "test.pdf" file about 654KB, but I can't open it on my Adobe Reader XI (latest version): "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem." And got five empty pages. Hm. I tried many PDF readers on the file. All unix based (okular, openoffice), but also the Google docs PDF viewer and Firefox PDF reader. All displayed the PDF just fine. Can you send me the PDF you got ? Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, 5 Mar 2016, silvioprog wrote: Hello, I just created the folder "fonts" and copied the "C:\Windows\Fonts\arial.ttf" into that, so I changed the line "D.AddFont('FreeSans.ttf', 'FreeSans-12' to "D.AddFont('arial.ttf', 'Arial", however, when I try to run the project, I get a SIGSEGV: #0 WRPR_$SYSTEM_$$_TINTERFACEDOBJECT_$_IUNKNOWN_$_2_$_SYSTEM$_$TINTERFACEDOBJECT_$__$$__RELEASE$$LONGINT at :0 #1 ?? at :0 #2 ?? at :0 #3 ?? at :0 #4 WRPR_$SYSTEM_$$_TINTERFACEDOBJECT_$_IUNKNOWN_$_2_$_SYSTEM$_$TINTERFACEDOBJECT_$__$$__RELEASE$$LONGINT at :0 #5 ?? at :0 I also get some warnings and hints in the compilation: Hm. This is strange, the code does not use interfaces at all. The compilation hints/warnings do not really present me with a hint as to what could be wrong. Any chance to get a better stack backtrace ? Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How do I test the testfppdf on Windows?
On Sat, Mar 5, 2016 at 3:38 PM, silvioprog wrote: > Hello, > > I just created the folder "fonts" and copied the > "C:\Windows\Fonts\arial.ttf" into that, so I changed the line > "D.AddFont('FreeSans.ttf', 'FreeSans-12' to "D.AddFont('arial.ttf', > 'Arial", however, when I try to run the project, I get a SIGSEGV: > To fix the SIGSEGV, I just disabled the heap (-gh) unit. Now I put all freetype binaries into my example folder, and after run the test, I got a "test.pdf" file about 654KB, but I can't open it on my Adobe Reader XI (latest version): "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem." And got five empty pages. -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] How do I test the testfppdf on Windows?
Hello, I just created the folder "fonts" and copied the "C:\Windows\Fonts\arial.ttf" into that, so I changed the line "D.AddFont('FreeSans.ttf', 'FreeSans-12' to "D.AddFont('arial.ttf', 'Arial", however, when I try to run the project, I get a SIGSEGV: #0 WRPR_$SYSTEM_$$_TINTERFACEDOBJECT_$_IUNKNOWN_$_2_$_SYSTEM$_$TINTERFACEDOBJECT_$__$$__RELEASE$$LONGINT at :0 #1 ?? at :0 #2 ?? at :0 #3 ?? at :0 #4 WRPR_$SYSTEM_$$_TINTERFACEDOBJECT_$_IUNKNOWN_$_2_$_SYSTEM$_$TINTERFACEDOBJECT_$__$$__RELEASE$$LONGINT at :0 #5 ?? at :0 I also get some warnings and hints in the compilation: Compile Project, Target: testfppdf.exe: Success, Warnings: 5, Hints: 10 fpparsettf.pp(768,45) Hint: Converting the operands to "Int64" before doing the subtract could prevent overflow errors. fpparsettf.pp(846,25) Hint: Local variable "N" does not seem to be initialized fpparsettf.pp(858,21) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors. fpparsettf.pp(866,19) Warning: Implicit string type conversion with potential data loss from "WideString" to "AnsiString" fpparsettf.pp(831,3) Note: Local variable "FMT" is assigned but never used fppdf.pp(1003,28) Hint: Local variable "Buffer" does not seem to be initialized fppdf.pp(982,3) Note: Local variable "I" not used fppdf.pp(2008,3) Note: Local variable "cs" not used fppdf.pp(2054,44) Warning: Implicit string type conversion with potential data loss from "UnicodeString" to "AnsiString" fppdf.pp(2641,3) Note: Local variable "lFontIndex" not used fppdf.pp(3001,5) Note: User defined: The 1000 value is a work-around until I can figure out the character spacing problem. fppdf.pp(3006,31) Warning: Implicit string type conversion from "AnsiString" to "WideString" fppdf.pp(3007,35) Warning: Implicit string type conversion from "AnsiString" to "WideString" fppdf.pp(3092,37) Warning: Implicit string type conversion with potential data loss from "WideString" to "AnsiString" testfppdf.lpr(46,11) Hint: Local proc "EmptyPage" is not used Lazarus 1.7 rUnknown FPC 3.1.1 i386-win32-win32/win64 -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal