It is currently Wed Jun 19, 2013 10:39 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 303 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13, 14, 15 ... 21  Next
Author Message
 Post subject: Re: PurePDF Version 2.0
PostPosted: Tue Aug 31, 2010 10:49 pm 
Offline
User
User

Joined: Mon Aug 30, 2010 11:51 am
Posts: 22
Thanks Klaus,

I got the decoding part to work :D

but i don't understand how to pass the content of a file to encode function :?:


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Wed Sep 01, 2010 8:03 am 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1071
Location: Germany
Code:
If ReadFile(0,"C:\somefile.txt")
  ASCII85.MEM_DataStructure
  ASCII85\pData=AllocateMemory(Lof(0))
  ASCII85\lCurSize=Lof(0)
  ASCII85\lMaxSize=Lof(0)
  ReadData(0,ASCII85\pData,Lof(0))
  CloseFile(0)
 
  Characters_per_line=60
  If pdf_ASCII85_Encode(@ASCII85,Characters_per_line)
    Message$=Chr(13)+Chr(13)+"Buffer = "+Str(ASCII85\lCurSize)+" Bytes !"
    Encoded_ASCII85$=PeekS(ASCII85\pData,-1,#PB_Ascii)
    MessageRequester("ASCII85 Encode",Encoded_ASCII85$+Message$)
   
    BufferLen=4096
    Buffer=AllocateMemory(BufferLen)
    If pdf_ASCII85_Decode(ASCII85\pData,ASCII85\lCurSize,Buffer,@OutBufferLen)=0
      Message$=Chr(13)+Chr(13)+"Buffer = "+Str(OutBufferLen)+" Bytes !"
      Decoded_ASCII85$=PeekS(Buffer,-1,#PB_Ascii)
      MessageRequester("ASCII85 Decoded",Decoded_ASCII85$+Message$)
    EndIf
  EndIf
EndIf

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Mon Oct 04, 2010 1:16 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Sep 11, 2004 11:54 am
Posts: 416
Location: UK
Hi,
I have used the pdf library with a lot of success. Many thanks.

In one application I have a full page background picture over which I print text and also place a logo, which is in PNG format. This works very well except I cannot find how to make the borders to the logo transparent, so my logo appears in a rectangular white box. The docs for pdf_Image() say that I need to specify a transparent colour, but I don't know how to do this. Can it be done with MS Paint or Paint.net?

Any suggestions are most welcome.

RichardL


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Mon Oct 04, 2010 4:52 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1071
Location: Germany
i think the documenation is wrong on that part because it says :

Quote:
but are not supported:
- interlacing
- alpha channel


BR Klaus

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Sat Nov 27, 2010 12:37 am 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1579
Location: Germany
Regarding the images I have some questions and ideas:
- Is it possible to add a paperless format or is something like this already implemented?
- We can add images by full filename or memory address, I think it would be good to just pass a PureBasic ImageNr as well. Is there a restriction or could this be done easily?
- How can I add an image so that it always fits best the paper size and without loss of resolution?


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Thu Feb 24, 2011 4:15 pm 
Offline
New User
New User

Joined: Thu Feb 24, 2011 4:07 pm
Posts: 1
How to change a space between lines in PurePDF? I want to change a space between lines in document with PurePDF but i cannot find a way to do it. I used Chunk and Paragraph for output text but they haven't any properties to change space between lines. Please help.

Sorry for my bad English =)


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Thu Feb 24, 2011 7:05 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1071
Location: Germany
With this PurePDF it could look like this :

Code:
pdf_Create()
pdf_AddPage()
pdf_SetMargins(30,10,30)
pdf_SetFont("Arial","",12)

txt$ = "Test"
pdf_SetX(30)
pdf_Write(5,txt$)
pdf_Ln(4)
pdf_Write(5,txt$)
pdf_Ln(5)
pdf_Write(5,txt$)
pdf_Ln(6)
pdf_Write(5,txt$)
pdf_Ln(7)
pdf_Write(5,txt$)

pdf_Save("Test.pdf")


But i guess you are looking for the purepdf Flash/Actionscript library for creating PDF files ;-)
http://code.google.com/p/purepdf/

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Sun Feb 27, 2011 10:01 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
lol

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Thu Mar 10, 2011 9:41 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1071
Location: Germany
small update, PurePDF V2.20 :
Quote:
- added pdf_GetMultiCellNewLines()
- fixed pdf_Cell() removes newlines and linefeeds at the end of each line

Download :
PurePDF V2.20 (for PB4.5x x86)

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Fri Mar 11, 2011 3:14 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 525
Location: Germany
Super! Danke, das sollte meine Probleme beheben.

_________________
PS: Sorry for my bad English. My native language is German.

My PureBasic-Project: EasySetup - SetupMaker for your programs
[Windows 7 x64] [PB V5.0x]


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Mon May 30, 2011 10:01 am 
Offline
Addict
Addict

Joined: Tue Feb 22, 2011 1:16 pm
Posts: 1480
ABBKlaus wrote:
small update, PurePDF V2.20

I downloaded this version, but the Help file for it says it's V2.08 still. :)

Also, got a question: I used this code to add a very tall image (5000 pixels high) to a new PDF file, but the image only went on the first page, and not continued over any next pages. How could I do that?

Code:
pdf_Create()
pdf_AddPage()
pdf_Image("1280x5000.png",0,0,200)
pdf_Save("test.pdf")

_________________
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Mon Jun 06, 2011 1:28 pm 
Offline
Addict
Addict

Joined: Tue Feb 22, 2011 1:16 pm
Posts: 1480
Is it possible to open a PDF with this lib and save the doc as plain text back to disk?

_________________
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Sat Jun 25, 2011 5:54 pm 
Offline
User
User
User avatar

Joined: Wed Nov 16, 2005 7:51 pm
Posts: 88
Location: France
Hi, I just tested this lib and I find it very useful, but I am unable to create a PDF with an RTF file and its formatting. Is this possible? and if yes, how to do that? Thanks.

_________________
PureBasicien tu es, PureBasicien tu resteras.


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Sat Jun 25, 2011 6:23 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue May 20, 2008 2:12 am
Posts: 650
Location: Cologne, Germany
Hi ABBKlaus,

any change to have this Lib for Mac OS X also??? :-)

Edit: Please :P

_________________
Regards,
JamiroKwai

---
5.10-x64/x86 - MacBook Pro, Mountain Lion
My Blog (German): http://www.quadworks.de


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Tue Jul 19, 2011 5:27 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
I've tried outputing unicode text using PurePDF and although it writes the ascii characters correctly, the unicode characters out of the normal ascii range are not displayed.

Is this a bug or a known restriction?

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 303 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13, 14, 15 ... 21  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye