PurePDF Version 2.0

Developed or developing a new product in PureBasic? Tell the world about it.
Intrigued
Enthusiast
Enthusiast
Posts: 501
Joined: Thu Jun 02, 2005 3:55 am
Location: U.S.A.

Post by Intrigued »

LuckyLuke wrote:@Intrigued :
Do you have the following files installed in the UserLibraries
  • mem
    pdf
    pdfDraw
Or try these downloads :
PurePDF
PDFDraw

Or can you send me the files mentioned above from your UserLibraries ?
That seems to have fixed the problem (downloading, installing the .exes you offered up).

Another point...

I noticed that when I type in pdf... no intellisense menu comes up. I have to add the underscore and then I have to guess at the first letter of any of the functions, then the intellisense pops up.

Now, with the ipf functions no underscore is needed and the intellisense brings up all of the functions.

Can you make the pdf functions intellisense menu show all pdf functions and make it so that we do not have to type the underscore to see such functions? (again, I like how the ipf functions intellisense works and would like to see that duplicated to the pdf intellisense (again, adding in all of the functions to that intellisense menu).

If so... that would be a big help as I learn how to use your plugin!

Thanks in any case,
Intrigued - Registered PureBasic, lifetime updates user
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Post by LuckyLuke »

@Thorsten1867
The ipf functions (Internal pdf functions) are provided to create extension libraries. Be carefull using them because they might screw up the pdf. The pdfDraw is a good example on using the ipf functions.

@Intrigued
Sorry. I can't help you with this. Maybe a question for the IDE creator ?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

LuckyLuke wrote:PDFDraw, the first extension library is available here.
It contains the following functions :
  • pdf_Circle()
    pdf_Ellipse()
    pdf_Rotate()
    pdf_Sector()
    pdf_SetDash()
I have a problem. "pdf missing". The PBOSL_Version is PBOSL_PurePDF. Is there a check of libname?
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Post by LuckyLuke »

@tv-soft
There is no check of libname.
Guess you have to recompile pdfDraw with PBOSL_PurePDF installed.

Question : How can I add changes to the PBOSL_PurePDF if needed ?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

LuckyLuke wrote: Question : How can I add changes to the PBOSL_PurePDF if needed ?
I have create a account on webPM (it's CVS like, very easy) for you, see PM.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Post by Thorsten1867 »

I've edit my program to use the new version of PurePdf and I'm missing 'pdf_DisplayPreferences("HideToolbar,DisplayDocTitle")' and 'pdf_IncludeJS("print(true);")'.

Can I hope, that you insert it again?
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

hi LuckyLuke,

fixed the pdf_save command when the complete path is given :

and here comes the problem i have :oops:

when i recompiled your lib i get pdf_GetErrorCode()=8 "Can't open image file : " and the text is missing :
any help is welcome ...

Code: Select all

%PDF-1.5
3 0 obj
<</Type /Page
/Parent 1 0 R
/Resources 2 0 R
/Contents 4 0 R>>
endobj
4 0 obj
<</Length 91>>
stream
2 J
0.57 w
BT /F1 16.00 Tf ET
28.35 813.54 113.39 -28.35 re S BT 31.19 794.57 Td () Tj ET

endstream
endobj
1 0 obj
<</Type /Pages
/Kids [3 0 R ]
/Count 1
/MediaBox [0 0 595.28 841.89]
>>
endobj
5 0 obj
<</Type /Font
/BaseFont /Helvetica-Bold
/Subtype /Type1
/Encoding /WinAnsiEncoding
>>
endobj
2 0 obj
<<
/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
/Font <<
/F1 5 0 R
>>
>>
endobj
6 0 obj
<<
/Producer 
/CreationDate 
>>
endobj
7 0 obj
<<
/Type /Catalog
/Pages 1 0 R
/OpenAction [3 0 R /FitH null]
/PageLayout /OneColumn
>>
endobj
xref
0 8
0000000000 65535 f 
0000000226 00000 n 
0000000414 00000 n 
0000000009 00000 n 
0000000087 00000 n 
0000000313 00000 n 
0000000503 00000 n 
0000000552 00000 n 
trailer
<<
/Size 8
/Root 7 0 R
/Info 6 0 R
>>
startxref
655
%%EOF 

Code: Select all

ProcedureDLL pdf_Save(FileName$) ;Output PDF to filename.
  ipf_Close()
  If IsFilename(GetFilePart(Filename$)) = 1
    If CreateFile(0, FileName$)
      WriteData(pdfBuffer\pData, pdfBuffer\lCurSize)
      FreeMemory(pdfBuffer\pData)
      CloseFile(0)
    Else
      pdfError = 15
    EndIf      
  Else
    pdfError = 14
  EndIf
EndProcedure
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

Hi,

i found it :idea:

remove the ProcedureDLL.s

Code: Select all

Procedure.s ipf_Escape(String$) ;Add \ before (, ) And \.

Procedure.s ipf_TextString(String$) ;Format a text string.
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Post by LuckyLuke »

A new version of PurePDF is available :
- pdf_GetErrorMessage() added.
- pdf_Save : possible to specify complete path.
- pdf_Write : modified for PDFMisc library.
Download : PurePDF 2.01

A new extension lib is available :
- pdf_Bookmark()
- pdf_DisplayPreferences()
- pdf_IncludeJS()
- pdf_MulticellBlt()
- pdf_SubWrite()
Download : PDFMisc 1.00

@ABBKlaus :

Code: Select all

ProcedureDLL.s ipf_Escape(String$) ;Add \ before (, ) And \. 
ProcedureDLL.s ipf_TextString(String$) ;Format a text string.
are needed for some extension libraries. Please don't remove them.
The new version should solve the problems you mentioned; if not please feel free to contact me.

@Thorsten1867 :
The functions are available again now. (pdfMisc)
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

the PBOSL_PurePDF also updated, the extension libs coming soon...
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Post by LuckyLuke »

A new version of PDFDraw is available :
- pdf_MirrorH()
- pdf_MirrorV()
- pdf_ScaleX()
- pdf_ScaleXY()
- pdf_ScaleY()
- pdf_Skew()
- pdf_SkewX()
- pdf_SkewY()
- pdf_StartTransform()
- pdf_StopTransform()
- pdf_Translate()
- pdf_TranslateX()
- pdf_TranslateY()
Download : PDFDraw 1.01
techjunkie
Addict
Addict
Posts: 1126
Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:

Post by techjunkie »

Wow! This is great stuff! I love your PurePDF library!

:D

Keep up the good work!
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

PBOSL_pdfDraw also updatet to 1.01 :D
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Post by Thorsten1867 »

I think, I've found two bugs:
"pdf_Ln(5)" -> the height is always 0
"pdf_SetRightMargin(25)" -> doesn't work (only "pdf_SetMargins(25, 15, 25)" works correct)
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Post by LuckyLuke »

New version (2.02) available at www.smollies.be. Will add it to PBOSL soon.

Solves pdf_SetRightMargin() bug and pdf_BookMark() bug.
Post Reply