I use FPDF to generate my invoices. However, when I save more than one invoice in a file, the second is modified and loses information.
Indeed, the images disappear and blank pages are added.
$doc->render('doc/save/'.$doc.'.pdf','F'); ==> Registers correctly
$doc->render('doc/'.$doc.'.pdf','F'); ==> Blank pages are added and images disappear
Thanks you in advance
Related
Basically the title: When I remove a page at the beginning of a PDF file that has hyperlinks/cross-references, the hyperlinks/cross-references—which are defined with absolute (and not relative) page numbers—are messed.
For instance, when I open this paper in Wondershare PDFelement, when I hover on the internal cross-reference link on Figure 2, it shows me that the link should take me to page 8 (Go to page: 9) of the document (p. 826):
However, if I remove the first page of the document (which is a cover I want to get rid of), the link again takes me to the 8th page of the new document (p. 827).
The same is the case for citations.
Is there a way to prevent that from happening when removing a page from the PDF?
Thanks in advance.
The links in the PDF file are defined properly. If I remove the first page with Acrobat or our tools, the links still work correctly.
This might be a problem with your PDF editor, it might transform internally the page references to absolute page numbers.
Update:
Your annotation is the 505 object. Its /Dest entry (an array) specifies the link target and the first element is the destination page which is defined as a reference to the page object, the 72 object which is the following page. So no mater how pages are added or deleted the link will point to the correct destination page.
Your PDF viewer might turn internally this page reference into an absolute page number so when pages are deleted the link no longer points to the correct page.
My problem is that we have made an block that opens a page witha a mform on it. And we use the editor element to start the tinyMCE editor, on the page. But when we save the output, the images oploaded to the text field is only viewable to the admin (the person who uploaded it) and in the mdl_files it sets it to be a draft file. I have been through the documentation, and i might have lost the context on the new page, but im not sure.
In Moodle, files uploaded to a form (either to a filemanager element or a text editor) are stored in a temporary 'draft' area while the form is being edited.
This is so that the actual files are not changed until the form is submitted (e.g. if an admin changed the image embedded in some text, deleting the original, you do not want anyone viewing the page during the editing to see a broken image link).
When working with files embedded in a text editor in Moodle, you need to make sure you copy all existing files into the 'draft' area before you show the form, then copy the 'draft' images into the real area, after the form is submitted.
See https://docs.moodle.org/dev/Using_the_File_API_in_Moodle_forms#editor for details about how to do this.
Please also note that your plugin will also need a PLUGINTYPE_PLUGINNAME_pluginfile() function in its lib.php, in order to authenticate any file requests from the user's browser and return the file contents. See any of the core activities for examples of this (e.g. mod/data/lib.php - function data_pluginfile()).
I'm new at working with itext and I'm looking for help.
I'm creating a PDF document based on a PDF template which contains a form with acrofields. This form is composed by some fields on top page and a table and has only one page.
The PDF document generated will have one or more pages depending on table's size (if size content extends predefined size, table should continue in the second page). Also every page should display fields on the top with the same information.
I've tried to solve it following "AddExtraTable" example, but I didn't get to keep the fields on top in all pages, only in the first one.
I've tried also to solve it with PdfCopy. This approach displays the fields on top in all pages but table content is not properly displayed.
Can someone help me?
PS: I have to use itext 2.1.7 because of project requirements.
i want a multiple file uploader (not ajax) for my form.. The features i needed are:
1) ability to select multiple files at once
2) after selection it should display all the filenames (or image) with a button to remove any pic
3) should be able to set number of files limit, file type and file size limit
4) when i submit the form, i should get an array of these files which i can save one by one to a folder and corresponding file names to a database table.
fortunately yii has got the widget 'CMultiFileUpload' which serves almost all my purposes except that when i select multiple files and click open it only shows the first file name with a remove button.. i want it to show all the selected files at once..
Eg: i select 3 files (i can select multiple files by giving 'multiple'=>'multiple' attribute) and click open then it should show
[removebutton]file1
[removebutton]file2
[removebutton]file3
ll the ajax uploaders have all these functionalities but i cant/don't want to use an ajax uploader because, suppose someone uploads many files using ajax uploader and he then decides to cancel the actual form submission, all the files he uploaded will be there in my uploaded folder, which leads to wastage of space and i have only a limited amount of space in my server. is there any way that i can do this using 'CMultiFileUpload' or is there any other way by which i can do all this? Please help
hope this help your answer,the multi upload in yii http://www.yiiframework.com/wiki/176/uploading-multiple-images-with-cmultifileupload/
I am generating the PDF in that, i have merged first RDLC(Report) and second cristal report Total 2 pages are in my report,but after generating PDF it is showing three page, last page is blank so how to Delete blank page Using VB.NET... please help me out....
The reason for the third page is probably an element of the report overflowing invisibly somewhere. Try making it slightly less wide for starters and see if that helps.