jonathanp Posted January 19, 2009 Share Posted January 19, 2009 Hi, I've used FPDF a few times and found it great for creating pdfs for my clients (invoices, shipping notes etc.) but now I have a requirement where PDFs will be uploaded to a site and need to have multiple versions created i.e. they will be uploaded as A4 size but an A5 or custom size may be required. Does anyone know if FPDF can either open and change a PDF's page size reliably and re-save, or if I can open the master copy and transfer all content to a new document which has the correct page size set? The master file will probably never have images etc, just be plain text. Also, I've seen mention of FPDF+FPDI around but there's very little documentation I can find for it. Any help will be greatly appreciated. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/141503-use-fpdf-to-create-new-smaller-pdf-from-master-copy/ Share on other sites More sharing options...
DeanWhitehouse Posted January 19, 2009 Share Posted January 19, 2009 I have no experience in using the pdf functions but surely you can just create the PDF the size they with the data you have instead of creating it a set size then trying to read it and resize. I'm not sure if that is what you meant. Quote Link to comment https://forums.phpfreaks.com/topic/141503-use-fpdf-to-create-new-smaller-pdf-from-master-copy/#findComment-740681 Share on other sites More sharing options...
jonathanp Posted January 19, 2009 Author Share Posted January 19, 2009 Hi Blade, Do you mean get the data out of the master pdf (that will be the only place the data/content is available from) and insert it into a brand new fpdf instance? I'll look into it, not sure how to get the content out though. Has anyone had any experience with a pdf2html type app on debian/other distro - I've just found one which works ok on Windows but creates crap html and includes the <hr /> and page number at the bottom of each page - obviously in a smaller document where there are more pages I don't want this content. Quote Link to comment https://forums.phpfreaks.com/topic/141503-use-fpdf-to-create-new-smaller-pdf-from-master-copy/#findComment-740687 Share on other sites More sharing options...
DeanWhitehouse Posted January 19, 2009 Share Posted January 19, 2009 No, I got from the opening post that you create the master pdf there ? If so why not use the information from that page and create a smaller pdf instead as well as/instead of the master pdf. Or are you trying to use a current pdf and shrink it. Quote Link to comment https://forums.phpfreaks.com/topic/141503-use-fpdf-to-create-new-smaller-pdf-from-master-copy/#findComment-740692 Share on other sites More sharing options...
jonathanp Posted January 19, 2009 Author Share Posted January 19, 2009 That's right, I'll be using a current PDF which is uploaded to the app, and then need to create copies from it. Quote Link to comment https://forums.phpfreaks.com/topic/141503-use-fpdf-to-create-new-smaller-pdf-from-master-copy/#findComment-740740 Share on other sites More sharing options...
DeanWhitehouse Posted January 19, 2009 Share Posted January 19, 2009 OK Maybe http://uk.php.net/manual/en/function.pdf-fit-pdi-page.php or http://uk.php.net/manual/en/function.pdf-process-pdi.php Quote Link to comment https://forums.phpfreaks.com/topic/141503-use-fpdf-to-create-new-smaller-pdf-from-master-copy/#findComment-740745 Share on other sites More sharing options...
jonathanp Posted January 19, 2009 Author Share Posted January 19, 2009 I'll check those out now, many thanks Blade. Will update this topic if I find an answer. Quote Link to comment https://forums.phpfreaks.com/topic/141503-use-fpdf-to-create-new-smaller-pdf-from-master-copy/#findComment-740775 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.