I just went with the PurePDF source instead of the library and after being very happy exploring PurePDF's capabilities via the plentyful and well documented examples, now the next stumper:
[08:26:06] [COMPILER] Line 568: ProcedureDLL and ProcedureCDLL can't be used inside a module.
Is there any way around this (aside form de-modularizing my application, which is not an option)?
As always, any help is much appreciated!
Using PurePDF from within a module?
Using PurePDF from within a module?
PB 5.73 on Windows 10 & OS X High Sierra
Re: Using PurePDF from within a module?
Hi,
have you included the pb file and set the constant #PurePDF_Include to #True?
Bernd
have you included the pb file and set the constant #PurePDF_Include to #True?
Bernd
Re: Using PurePDF from within a module?
Yes, see the top of the relevant module below (if I hadn't, I would not see that error):
Code: Select all
Module IntakeReport
; TODO static warning re. unencrypted data in generated PDFs etc.
; TODO add open button?
UseModule Definitions
#PurePDF_Include=1
XIncludeFile "PurePDF.pb"
Global Statusbar, Frame_Search, String_ID, String_Last, String_First, ListIcon_Selection
...
PB 5.73 on Windows 10 & OS X High Sierra
Re: Using PurePDF from within a module?
Ok,
after try it by myself I see it.
The 'dirty' solution:
Place at top of PurePDF.pb
And replace all ProcedureDLL with ProcedureMacro.
But not that one from above
Then this work:
And the original stuff is working too.
Bernd
after try it by myself I see it.
The 'dirty' solution:
Place at top of PurePDF.pb
Code: Select all
CompilerIf Defined(PurePDF_Include,#PB_Constant)
Macro ProcedureMacro
Procedure
EndMacro
CompilerElse
Macro ProcedureMacro
ProcedureDLL
EndMacro
CompilerEndIf
But not that one from above

Then this work:
Code: Select all
Module Ferrari
#PurePDF_Include=1
XIncludeFile "PurePDF.pb"
Global Initialized = #False
Procedure Init() ; Private init procedure
If Initialized = #False
Initialized = #True
Debug "InitFerrari()"
EndIf
EndProcedure
Procedure CreateFerrari()
Init()
Debug "CreateFerrari()"
pdf_Create()
EndProcedure
EndModule
Bernd
Re: Using PurePDF from within a module?
Thank you, Bernd, for going the extra mile - much appreciated
PB 5.73 on Windows 10 & OS X High Sierra
-
- Enthusiast
- Posts: 542
- Joined: Tue Oct 14, 2014 12:09 pm
Re: Using PurePDF from within a module?
I make all you write on the topics but some function not work like PDF_GETY() 'the system respond me that's not a valid function)
Has someone an idea ?
Has someone an idea ?
-
- Enthusiast
- Posts: 542
- Joined: Tue Oct 14, 2014 12:09 pm
Re: Using PurePDF from within a module?
I find the solution by myself.
In fact at level
LIne 57 to 59 of Pure_Pdf.pb
You have to modify by
After Pure_Pdf works well on X64 without problems
In fact at level
LIne 57 to 59 of Pure_Pdf.pb
Code: Select all
CompilerIf Defined(PurePDF_Include,#PB_Constant)
XIncludeFile "PurePDF_res.pb"
CompilerEndIf
Because if you don't modify that PurePDF_res.pb is include only on the first module and not on the secondCompilerIf Defined(PurePDF_Include,#PB_Constant)
IncludeFile "PurePDF_res.pb"
CompilerEndIf
After Pure_Pdf works well on X64 without problems