I just downloaded the PurePDF lib and tested all tutorials, what a nice package -- thanks
I started "decoding" some HTML-Tags (<b>, </b> and <br>), which can be seen in the code below. But I would need a kind of a text flow and have no idea how to do this. I have an image on the top right position of a page and a loto of text which should be drawn on the page (except over the image).
It should look like that (t=text, *=image):
__________
tt ttttt . ******
ttttt tt . ******
tt ttttt . ******
ttttt tt
ttttt ttttt tttttt
tt tt ttt tttt ttt
tttttt
__________
Can this be done easily?
I have also another problem, some jpg files are not displayed in the resulting pdf file. PB is able to display these images with no problem and as there are no big differences in the jpg parameters (image size, DPI etc.) it seems to be that progressive encoding is not supported.
As I am not able to change the image sources, is it possible to do a trick do embed these jpg files into a pdf file without creating temporary files for each image?
Code: Select all
Procedure WriteText(Text.s)
Protected FlagBoldOn
Protected FlagBoldOff
Protected FlagBreak
Repeat
FlagBreak=FindString(Text,"<br>",FlagBreak)
If FlagBreak
WriteText(Left(Text,FlagBreak-1))
Text=Trim(Mid(Text,FlagBreak+4))
If Len(Text)
WriteText(Text)
EndIf
Break
EndIf
FlagBoldOn=FindString(Text,"<b>",FlagBoldOff)
If FlagBoldOn
pdf_Write(5,Left(Text,FindString(Text,"<b>",1) - 1))
FlagBoldOff=FindString(Text,"</b>",FlagBoldOn)
If FlagBoldOff=0
FlagBoldOff=Len(Text)
EndIf
pdf_SetFont(#FontFace,"B",14)
pdf_Write(5,Mid(Text,FlagBoldOn+3,FlagBoldOff-FlagBoldOn-3))
pdf_SetFont(#FontFace,"",12)
FlagBoldOff+4
Else
pdf_Write(5,Mid(Text,FlagBoldOff))
pdf_Ln()
Break
EndIf
ForEver
EndProcedure