I am using PSPDFKit as an image editor.
How do I create a new PSPDFDocument with a certain width/height? Also, how do I dynamically add pages to PDPDFDocument?
Maybe the answer is that I need to dynamically create a blank PDF myself every time I want to edit an image. I was hoping it was built in.
You can both create new empty files and add/remove documents using PSPDFProcessor. Use the HTML conversion with an empty string to get a blank page; and the generatePDFFromDocument: methods to modify existing documents.
Related
Before you dismiss this post as using LibreOffice documents THE WRONG WAY, let me explain what I'm trying to achieve. I am generating programatically ODT documents, which is mostly no big deal. I have hit the wall, however, trying to insert internal references into the documnt. It's quite simple to include an anchor in the content.xml with:
<text:reference-mark text:name="anchor"/>
inside <text:p> element. But when you want to reference it later LibreOffice inserts a reference with the page number. Obviously I don't know the page number where the anchor is, but I can easily include a reference to the anchor with
<text:reference-ref text:reference-format="page" text:ref-name="anchor"/>
The question is how to make LibreOffice recreate and insert page number on reading the document?
It turns out that LibreOffice does recreate page numbers provided there is actually any number included as contents of text:reference-ref
<text:reference-ref text:reference-format="page" text:ref-name="anchor">1</text:reference-ref>
When opened, upon a change of the file the page number is updated by LibreOffice.
Would it be possible to create and populate tables within ckeditor from uploaded files?
A user would choose a file from their machine in any format such as word, excel etc and it could display a formatted table in the editor....
It is pretty clear that one can create a table in CKEditor. Also, it is possible to add a table automatically. Now, if you want to automatically add a table based upon the content of an uploaded file, then:
create a form where the file can be uploaded
implement the feature with which one can upload the file
make sure you know where your files are, either using a database or a deterministic algorithm
implement a server-side functionality which prepares the content (table) data
use the prepared data as input at client-side
I'm creating a SharePoint site which will be used to dynamically store and display documents on various pages, among other things. Is the following possible?
My view is to have one central Document Library which will include all files. Files with have 'tags' or 'metadata' attached to them. On pages, i will add a document library (or similar) webpart and then call only those documents with a certain tag/metadata.
For example.
Document Library ('Folder') - Contains ('Project Document.xls' and 'Training Document.ppt')
On 'index.html' i will add 'Folder' to the page, but i only want to display 'Project Document.xls' not 'Training Document.ppt'.
I'm aware that you can set up target audiences but that requires a lot of user management.
Thanks for any advice.
If I understand you correctly, this sounds like something you could accomplish using a filter. The name of the file is stored as a column. Try editing the web part on that page and edit the current view. That view will be cached for that page without changing the view across the site. If you want to be able to dynamically choose the document you display then one option is to add an HTML Form web part (which contains a text box and submit button), connect it to the doc library web part and filter the name column based on the HTML Form web part.
I want a file download on my page where I look up the attachemnts to be displayed from another document based on the value of a field.
I tried a couple of things including returning the value obtained from NotesRichTextItem.GetEmbeddedObject but everyting I try I get the error java.util.Vector incompatible with [Lcom.ibm.xsp.model.FileRowData
What do I need to call to return a proper value to my file download control?
I realize I could proably display the attachment links using a repeat control but was hoping there was an easier way.
The FileDownload control requires a NotesDocumentDataSource. There's no way around that. So you could add a panel to you page, add a Notes Document DataSource to that panel that computes the UNID of that document, add a file download control bound to that panel and you are good to go. The FileDownload control will show all files in that document.
Keep in mind: an XPage is not bound to a (one) document and can contain as many data sources as needed.
If you want to construct the URLs yourself, check the cheatsheet
I need a way to convert my excel files to pdf that can have any no of rows. but the no of rows per each page is a constant and each page should have an image in the footer.
an example would be if i have 150 rows and the constants per page is 100 then i need to get a pdf file with two pages and each of these pages should have a footer image?
any idea how I can go about the same. I am thinking about writing a small program for the same. But I need suggestion regarding which tool to use for the conversion depending on the ease of use.
I am also thinking about maintaining a constants file that feeds in the required details. like no of rows, footer image location, file location etc.
Thanks. waiting for a reply.
Edit:
Well guys I have 1000 of such files and I cant possibly open each one of these files and add footer etc and saving it as pdf. I need to automate this.
Try the PDF Converter Services. It provides a web services based interface to carry out the conversion. You can also specify a watermark to add an image to the footer of each page.