News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Export C source as HTML or PDF file

Started by Pelle, March 16, 2005, 07:34:45 PM

Previous topic - Next topic

JohnF

Quote from: "Robert"Hi John:

Yes, go ahead, I have no objections.

Robert Wishlaw

Thanks.

John

Freddy

Hi Pelle!
When I try to compile this ADDIN using Pelles C 5.0 BETA I get the following error:
Quote
Building Export.obj.
C:\Arquivos de programas\PellesC\Include\addin.h(987): warning #2099: Missing type specifier.
C:\Arquivos de programas\PellesC\Include\addin.h(987): error #2001: Syntax error: expected ';' but found 'ADDIN_FIND_IN_FILES'.
C:\Arquivos de programas\PellesC\Include\addin.h(987): warning #2099: Missing type specifier.
*** Error code: 1 ***
Done.

I guess there is a little bug in addin.h?

Thanks

TimoVJL

#17
Updated to support form feed / page break too and RTF.

EDIT 2013-10-09: fix for CRLF (for Win7 WordPad?)
EDIT 2014-02-01: fix RTF font name.
May the source be with you

Robert

Hi Timovjl:

Thank you for the update.

Robert Wishlaw

John Z

#19
Looking for some information on creating PDF files I found an old add-in project created by multiple authors Pelle, Timo, and Robert, way back in 2005 for Pelles C version 3 (I think), then updated and added RTF by Timo in 2013.  https://forum.pellesc.de/index.php?topic=471.15

Of course it no longer worked with the newer version of Pelle C version 13.00.9 - Soooo I've minimally hacked it to get it functional for the current version.  While it will now work with plain text, UTF-8, and UTF-16 source pages it will only accurately produce output if the text code point is within the ANSI space.  This is OK for source code but some comments won't be displayed correctly when non-ANSI characters are used.  Could be fixed too but not sure it would be worth the effort.

Project ZIP include everything for a 64 bit version.

John Z

Robert

Quote from: John Z on January 15, 2026, 12:26:58 PMLooking for some information on creating PDF files I found an old add-in project created by multiple authors Pelle, Timo, and Robert, way back in 2005 for Pelles C version 3 (I think), then updated and added RTF by Timo in 2013.  https://forum.pellesc.de/index.php?topic=471.15

Of course it no longer worked with the newer version of Pelle C version 13.00.9 - Soooo I've minimally hacked it to get it functional for the current version.  While it will now work with plain text, UTF-8, and UTF-16 source pages it will only accurately produce output if the text code point is within the ANSI space.  This is OK for source code but some comments won't be displayed correctly when non-ANSI characters are used.  Could be fixed too but not sure it would be worth the effort.

Project ZIP include everything for a 64 bit version.

John Z

Hi John Z:

Wow! This takes me back to the "Realm of Long Long Ago".

About the HTML Export for UTF-8:
1. The HTML header requires more info for the page to render properly.
2. I think _setmode has to be used to get proper UTF-8 output. For details see
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setmode?view=msvc-170

Where can I get a zlib64.lib ?
Building Export64.dll.
POLINK: fatal error: File not found: 'zlib64.lib'.
*** Error code: 1 ***

Interesting.
Thanks.


John Z

#21
Hi Robert,

My apologizes, I didn't check that the project zip was complete.  I updated the post with a project zip that includes the libs. 

I'll look further into it (UTF-8) with the link you provided.

Hopefully good memories for you :)

John Z

Robert

Quote from: John Z on Yesterday at 11:45:34 AMHi Robert,

My apologizes, I didn't check that the project zip was complete.  I updated the post with a project zip that includes the libs. 

I'll look further into it (UTF-8) with the link you provided.

Hopefully good memories for you :)

John Z

Hi John Z:

Thanks, the zlib64 is good. Export is as expected with the limitations you have mentioned regarding UTF-8.

There is a separate but maybe connected problem with Pelles poide.exe IDE.

This code


#include <stdio.h>

/* entry point */
int main(void)
{
  printf("Hello, world!\n");
 
  return 0;
}


amended by adding a print in Tajik UTF-8


#include <stdio.h>

/* entry point */
int main(void)
{
  printf("Hello, world!\n");
  printf("Салом Ҷаҳон!\n");
 
  return 0;
}


is reloaded to the poide.exe IDE as


#include <stdio.h>

/* entry point */
int main(void)
{
  printf("Hello, world!\n");
  printf("????? ?????!!\n");
 
  return 0;
}


when the IDE is shut down and restarted.

TimoVJL

#23
zlib 1.3.1 project with missing header file, that dependecies forgot.

zlib 1.3.1 Release Notes
May the source be with you

Robert

Quote from: TimoVJL on Yesterday at 06:34:08 PMzlib 1.3.1 project with missing header file, that dependecies forgot.

zlib 1.3.1 Release Notes

Thanks Timo  8)

Robert

Hi John Z:

Very complex, very interesting.

I have had a look at Pelles and Timo's code comparing it with yours and have some ideas.

I will continue studying this and if I can get it to spit out anything intelligible, I'll let you know.