php-general Digest 28 Dec 2006 10:45:39 -0000 Issue 4538
Topics (messages 246245 through 246252):
Re: Simple PDF manipulation
246245 by: tg-php.gryffyndevelopment.com
246246 by: Peter Lauri
PHP & podcasts
246247 by: Skip Evans
246248 by: Stut
246249 by: Skip Evans
246250 by: Skip Evans
246251 by: Stut
246252 by: Skip Evans
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Yeah, this is exactly what we do at my work. We have a license for PDFLib and
essentually we load blank forms and then say take this text and position it at
this location. Kind of like putting words on a clear piece of acetate and
overlaying it on top of a piece of paper.
If I recall, we had issues trying to do this with fpdf and some other PHP PDF
libraries, but PDFlib allowed us to do it and it's what we've used ever since.
Actually, tedd.. did you use PDFlib or another library or maybe something in
PHP5 (that we don't use yet)? We may be moving off of PDFlib at some point and
I may be looking for alternatives. This is the main function we need.
Ignorant question, but I havn't even thought of researching it yet and figured
I'd ask while the topic was at hand.
-TG
= = = Original message = = =
Interesting, that's a good idea. I was not aware that it was possible
to load an existing PDF into memory and then add stuff to it.
On Dec 27, 2006, at 7:28 AM, tedd wrote:
> At 6:32 AM -0800 12/27/06, Brian Dunning wrote:
>> Let's say I have a complicated PDF document, like a Christmas
>> card, that was made in Illustrator -- too complicated to easily
>> create from scratch using PDFlib. Is there a way to use PHP make
>> simple text changes - like changing "Dear XXX" to "Dear John"?
>> I've opened the files with a text editor and cannot locate the
>> simple text, it appears to be encoded somehow. The PDF has no
>> security or encryption in it. Thanks....
>
> Brian:
>
> I'm not saying that there is/isn't a way to do this, but I tried
> and failed.
>
> In my investigation, I found that the insides of a PDF file are not
> conducive to a simple search and replace mechanism. The text is
> encoded in some fashion that is not easy to decode and reassemble.
>
> The solution I came up with was to combine the existing PDF file
> with my coding and write over (on top of) the old to produce the
> new PDF that I wanted. In your case, take your Christmas Card with
> a big space where "xxx" appears and then write over that space with
> "John" in your new code.
>
> I wish someone would show me a simpler way to do this.
>
> hth's
>
> tedd
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
--- End Message ---
--- Begin Message ---
FPDF might do the same thing, won't it?
Best regards,
Peter Lauri
www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 27, 2006 11:11 PM
To: [email protected]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Simple PDF manipulation
Yeah, this is exactly what we do at my work. We have a license for PDFLib
and essentually we load blank forms and then say take this text and position
it at this location. Kind of like putting words on a clear piece of acetate
and overlaying it on top of a piece of paper.
If I recall, we had issues trying to do this with fpdf and some other PHP
PDF libraries, but PDFlib allowed us to do it and it's what we've used ever
since.
Actually, tedd.. did you use PDFlib or another library or maybe something in
PHP5 (that we don't use yet)? We may be moving off of PDFlib at some point
and I may be looking for alternatives. This is the main function we need.
Ignorant question, but I havn't even thought of researching it yet and
figured I'd ask while the topic was at hand.
-TG
= = = Original message = = =
Interesting, that's a good idea. I was not aware that it was possible
to load an existing PDF into memory and then add stuff to it.
On Dec 27, 2006, at 7:28 AM, tedd wrote:
> At 6:32 AM -0800 12/27/06, Brian Dunning wrote:
>> Let's say I have a complicated PDF document, like a Christmas
>> card, that was made in Illustrator -- too complicated to easily
>> create from scratch using PDFlib. Is there a way to use PHP make
>> simple text changes - like changing "Dear XXX" to "Dear John"?
>> I've opened the files with a text editor and cannot locate the
>> simple text, it appears to be encoded somehow. The PDF has no
>> security or encryption in it. Thanks....
>
> Brian:
>
> I'm not saying that there is/isn't a way to do this, but I tried
> and failed.
>
> In my investigation, I found that the insides of a PDF file are not
> conducive to a simple search and replace mechanism. The text is
> encoded in some fashion that is not easy to decode and reassemble.
>
> The solution I came up with was to combine the existing PDF file
> with my coding and write over (on top of) the old to produce the
> new PDF that I wanted. In your case, take your Christmas Card with
> a big space where "xxx" appears and then write over that space with
> "John" in your new code.
>
> I wish someone would show me a simpler way to do this.
>
> hth's
>
> tedd
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hey all,
I'm doing some maintenance work on a site that
features podcasts and some of them work and some
of them don't.
I've never worked with podcasts before, and while
I'm figuring out how they work I was wondering if
anyone knew of any good tutorial sites on them and
perhaps even programming them in PHP.
I've done some Googling but haven't found anything
really good.
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
--- End Message ---
--- Begin Message ---
Skip Evans wrote:
I'm doing some maintenance work on a site that features podcasts and
some of them work and some of them don't.
I've never worked with podcasts before, and while I'm figuring out how
they work I was wondering if anyone knew of any good tutorial sites on
them and perhaps even programming them in PHP.
I've done some Googling but haven't found anything really good.
"Programming podcasts" makes no sense. A podcast is a media file that is
made available for download. I assume that when you say 'programming
them in PHP' you mean developing a site to publicise your podcast.
Given that assumption your easiest route is to find a blogging package
that supports podcasts. There's a list that will get you started here...
http://www.podcastingnews.com/topics/Podcasting_Software.html
If you're wanting to do something more custom you first need to
understand that there is nothing particularly special about podcasts.
They are literally just files that are published on a website.
I Googled for info on publishing a podcast and came up with dozens of
good tutorials and references. Try harder.
If I've misunderstood what you're trying to do, please elaborate.
-Stut
--- End Message ---
--- Begin Message ---
The site plays the podcasts with a code snippet
like this:
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="410" height="100" id="movie" align="">
<param name="movie"
value="audioqueue-mini.swf?urls=<?php echo $urls
?>&titles=<?php echo $titles ?>&delim=<?php echo
$delim ?><?php echo (isset($skip)) ? "&skip=$skip"
: '' ?>">
<embed src="audioqueue-mini.swf?urls=<?php echo
$urls ?>&titles=<?php echo $titles ?>&delim=<?php
echo $delim ?>" quality="high" width="410"
height="100" name="movie" align=""
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</object>
Where the $urls variable is a string of URLs. The
ones that work all end in .mp3 + some delimiter +
another URL that ends in .mp3, etc, etc.
However, some show up with no such extension, and
in fact no extension of any kind and these don't
work.
So I suspect that the original programmers code is
somehow building URLs that do not in fact connect
to the podcast files and that is the main problem.
However, having not worked with podcasts before I
wasn't absolutely sure this was the problem.
The URLs are all supposed to come from the live
feeds so I am a bit baffled why some work and some
don't.
Skip
Stut wrote:
Skip Evans wrote:
I'm doing some maintenance work on a site that features podcasts and
some of them work and some of them don't.
I've never worked with podcasts before, and while I'm figuring out how
they work I was wondering if anyone knew of any good tutorial sites on
them and perhaps even programming them in PHP.
I've done some Googling but haven't found anything really good.
"Programming podcasts" makes no sense. A podcast is a media file that is
made available for download. I assume that when you say 'programming
them in PHP' you mean developing a site to publicise your podcast.
Given that assumption your easiest route is to find a blogging package
that supports podcasts. There's a list that will get you started here...
http://www.podcastingnews.com/topics/Podcasting_Software.html
If you're wanting to do something more custom you first need to
understand that there is nothing particularly special about podcasts.
They are literally just files that are published on a website.
I Googled for info on publishing a podcast and came up with dozens of
good tutorials and references. Try harder.
If I've misunderstood what you're trying to do, please elaborate.
-Stut
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
--- End Message ---
--- Begin Message ---
Yes, Brian, this is all very helpful! Thanks very
much!
Skip
Brian Dunning wrote:
Hi Skip - Best is the iTunes Podcast docs:
http://www.apple.com/itunes/store/podcaststechspecs.html
Use RSS Validator to figure out exactly what's wrong with the ones you
have that aren't working:
http://feedvalidator.org/
You can take a look at mine for an example. Note that I am using all of
the iTunes extensions, which any serious podcaster should do:
http://skeptoid.com/podcast.xml
In my case I have all the episodes in MySQL and PHP just retrieves them
in order and outputs them, formatting according to the RSS spec.
Hope this helps... :)
On Dec 27, 2006, at 2:46 PM, Skip Evans wrote:
Hey all,
I'm doing some maintenance work on a site that features podcasts and
some of them work and some of them don't.
I've never worked with podcasts before, and while I'm figuring out
how they work I was wondering if anyone knew of any good tutorial
sites on them and perhaps even programming them in PHP.
I've done some Googling but haven't found anything really good.
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
--- End Message ---
--- Begin Message ---
Skip Evans wrote:
The URLs are all supposed to come from the live feeds so I am a bit
baffled why some work and some don't.
Are you sure that all the URLs in the feeds are still working? Remember
that links go bad.
Beyond that it's difficult to help with this specific problem without
seeing some code and the XML feeds that the code is using.
-Stut
--- End Message ---
--- Begin Message ---
I think what is going on is that somehow when the
code goes to the podcast feeds to get the URLs
it's getting the wrong things because they're not
even media files, some times they just look like
incomplete URLs.
When you go to the site itself the streams work
fine and result in proper media file URLs.
I should dig deeper into the code to see exactly
how it's getting the URLs.
I think that should probably be next.
Skip
Stut wrote:
Skip Evans wrote:
The URLs are all supposed to come from the live feeds so I am a bit
baffled why some work and some don't.
Are you sure that all the URLs in the feeds are still working? Remember
that links go bad.
Beyond that it's difficult to help with this specific problem without
seeing some code and the XML feeds that the code is using.
-Stut
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
--- End Message ---