Page 12 of 32

Re: PurePDF Version 2.0

Posted: Tue Aug 31, 2010 10:49 pm
by PureGuy
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 :?:

Re: PurePDF Version 2.0

Posted: Wed Sep 01, 2010 8:03 am
by ABBKlaus

Code: Select all

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

Re: PurePDF Version 2.0

Posted: Mon Oct 04, 2010 1:16 pm
by RichardL
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

Re: PurePDF Version 2.0

Posted: Mon Oct 04, 2010 4:52 pm
by ABBKlaus
i think the documenation is wrong on that part because it says :
but are not supported:
- interlacing
- alpha channel
BR Klaus

Re: PurePDF Version 2.0

Posted: Sat Nov 27, 2010 12:37 am
by c4s
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?

Re: PurePDF Version 2.0

Posted: Thu Feb 24, 2011 4:15 pm
by OddSoul
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 =)

Re: PurePDF Version 2.0

Posted: Thu Feb 24, 2011 7:05 pm
by ABBKlaus
With this PurePDF it could look like this :

Code: Select all

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/

Re: PurePDF Version 2.0

Posted: Sun Feb 27, 2011 10:01 pm
by DoubleDutch
lol

Re: PurePDF Version 2.0

Posted: Thu Mar 10, 2011 9:41 pm
by ABBKlaus
small update, PurePDF V2.20 :
- added pdf_GetMultiCellNewLines()
- fixed pdf_Cell() removes newlines and linefeeds at the end of each line
Download :
PurePDF V2.20 (for PB4.5x x86)

Re: PurePDF Version 2.0

Posted: Fri Mar 11, 2011 3:14 pm
by Thorsten1867
Super! Danke, das sollte meine Probleme beheben.

Re: PurePDF Version 2.0

Posted: Mon May 30, 2011 10:01 am
by MachineCode
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: Select all

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

Re: PurePDF Version 2.0

Posted: Mon Jun 06, 2011 1:28 pm
by MachineCode
Is it possible to open a PDF with this lib and save the doc as plain text back to disk?

Re: PurePDF Version 2.0

Posted: Sat Jun 25, 2011 5:54 pm
by Jacobus
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.

Re: PurePDF Version 2.0

Posted: Sat Jun 25, 2011 6:23 pm
by jamirokwai
Hi ABBKlaus,

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

Edit: Please :P

Re: PurePDF Version 2.0

Posted: Tue Jul 19, 2011 5:27 pm
by DoubleDutch
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?