I've got a severe issue when using PB 5.10 b5, that causes a severe problem with your excellent PurePDF.
Your PurePDF works 'great' with PB version 5.0, and I really! really!! appreciate this program.
But when I installed PB 5.10 in parallel with 5.0 to test it, it always displays garbage when using PB 5.10.
After some experimentation, I discovered that with PB 5.10, it only works with Compiler Option
Create unicode executable checked. In doing this test, I also realized that I had just totally
messed up one of my special programs data base. Because using unicode messed up some of the
special characters I was using in the data base. I can not use unicode with out a major major rewrite
of not only that program, but several other programs that I wrote. My lack of understanding in some of this
stuff hurts me from time to time. But can you shed some light on this issue, and if there is something
that I can do, or that can be done about this issue? I can not use unicode. I just don't understand what they
did to version 5.10 that is causing this problem, and I'm desperately hoping that it's something simple that
you can see or fix with PurePDF to make it work like in version PB 5.0.
I attached some test code that runs great in PB 5.0 with or with out Create unicode executable checked.
But will only work with Create unicode executable checked when using PB 5.10.
Thank you sincerely! for your help.
Code: Select all
;#################################################################################################
;IMPORTANT NOTE when using PurePDF:
;PB 5.0 has no problem, but with PB 5.10, you have to compile with create unicode executable, even
;if your not using unicode. If you don't, the text is all garbled!
;#################################################################################################
Global swt$ = "Test PDF Creation with Page Break"
Global lsa=4 ;left side adjust
Global y = 5; initial Y position
Global tl=y;top y position
Procedure Header()
pdf_Line(lsa+1,y,204,y):y=y+6
pdf_SetFont("Lucida Console","",9);, #PB_Font_Default)
pdf_Text(lsa+60,y, swt$):y=y+6 ; 0,y is the line position
pdf_Line(lsa+1,y,204,y):y=y+1
pdf_Line(lsa+1,y,204,y):y=y+4
EndProcedure
Procedure Footer()
Protected txt.s
pdf_SetY(-15)
pdf_SetFont("Arial","I",8)
pdf_SetTextColor(128)
txt.s = "Page " + Str(pdf_GetPageNo())
pdf_Cell(0,10,txt,0,0,#PDF_ALIGN_CENTER)
EndProcedure
Procedure PdfTestsheet()
If pdf_Create()
pdf_SetProcFooter(@Footer())
pdf_SetProcHeader(@Header())
pdf_AliasNbPages()
pdf_AcceptPageBreak()
pdf_SetFont("Lucida Console","",10);, #PB_Font_Default)
For p=1 To 2
y=5
pdf_AddPage();this line is needed between sections
pdf_SetY(10);this part really isn't needed here because I use yhe x and y value to poaition the text.
;But out side of a For Next loop like in this example, I need to set the x and y values to start at page top again
;or it will be at the bottom on the next page. eg: y=5
For x= 1 To 25
pdf_Text(lsa+5,y, "Line "+Str(x)+" Test line Test line Test line Test line Test line Test line Test line")
y=y+4
Next x
pdf_Text(lsa+5,y, "Line "+Str(x)+" Need Footer entered and then Page Break Here"):y=y+4
;The data I need to put is line by line, varies in number of lines, and the line length can change.
;So I can't really use cells as in your nice examples.
;I need to create page breaks between sections.
;************************************************************************************
;Here I want to put the footer page number, and then go to and start on the next page.
;************************************************************************************
pdf_Line(lsa+1,y,204,y):y=y+1
pdf_Line(lsa+1,y,204,y)
bl=y;bottom line
;Debug Str(bl)
;vertical lines tl = top line y
pdf_Line(lsa+1,tl,lsa+1,bl)
pdf_Line(lsa+200,tl,lsa+200,bl)
Next p
Define file$="Test PDF Creation With Page Break.pdf"
pdf_Save(file$)
RunProgram(file$)
Else
err=pdf_GetErrorCode()
MessageRequester("PrintTestsheet() error: ",Str(err),0)
EndIf
EndProcedure
PdfTestsheet()