C#: Cover Images are not viewed in ePub document - c#

I am creating an application to generate books as ePub. I am allowing the user to upload front and back cover. It is placed in the same folder of the HTML documents.
I am using ePubSharp library file to convert to eBook. But the Cover Pages are not displayed in the ePub document. I need the user to define the front cover and back cover of the document. I don't know what is the issue. Can anyone have any solution?

Related

iTextSharp Read Text from Layer

I'm using iTextSharp to interact with multi-layered PDF files from C# (VS2012). the PDF file is kind of a map, with plots on one layer and text on another.
what I want to do is, give the PDF path and layer name (the layer which has text) to application, it will search for text on the layer and create external hyperlinks on text. (I have a Dictionary with words and links). I'm able to open the PDF, read how many pages it has, and also find the required layer. But I'm kind of stuck and unable to find how to do next things i.e. read text on found layer and create hyperlinks.
Please guide me.
Thanks.

How to merge different document types and show as stack in .NET application

Suppose in .NET (don't care what language) I want to show a user a PDF, Word and Excel file together. I am trying to replicate a document process where a user might have a PDF file and he would like to attach a WORD file and an Excel file let's say to make a stack of documents (that I would save in some directory). Then he would like to click on a button and see a stack of these documents in 1 application of some sort.
How can I display the stack of documents WITHOUT first opening WORD, then openinig EXCEL and then openining ADOBE ACROBAT - this would be really annoying for the user. I would like one unified application or some idea to mimic one in .NET that can just show all 3 documents as if they were printed one after the other on paper. (I hope I am explaining this clearly)
The only thing I can think of to do this would be to leverage some sort of PDF conversion process to create one PDF file containing all three of these documents in "printed" (page-by-page) form, and then show that. The one application I can think of that could show all of these files is a web browser with appropriate Office and Acrobat viewer plugins, and you might find it difficult to leverage that, as browser preference and other user OS settings can cause various strategies for application launching to fail.
I would convert the documents in PDF and develop a pdf viewer inside your application.
I would use a ready made library for that, don't reinvent the wheel.
For example: http://www.quickpdflibrary.com/products/quickpdf/index.php

Image Quirk with PDF generated by WKHtmlToPDF

Using WKHtmlToPDF to generate PDFs for my company's web-based mapping service.
Essentially, I take a template HTML file, inject an image into a div, save the HTML to disk and use WKHtmlToPDF to render to PDF.
Now, on most templates it works a treat. On one particular one though, where the image should be (int the pdf) is a grey area. HOWEVER, if I right click on the grey area, and select "Save Image As...", the saved image is correct.
Linked are the created PDF and the HTML on which it is based. Help required most urgently, and hints appreciated.
Zip File Containing HTML and PDF
I was having an issue where a particular image was not being printed to the PDF. Other images on the same page were. The src of the missing image is from a CDN, but had no extension, i.e. src="\\path/to/image?param". Using the aforementioned -n switch (disable Javascript), the image shows up in the resulting PDF. Thanks Jordaan.
Don't know WHY this worked, but adding the "--disable-smart-shrinking" option, and/or removing the "-n"(Disable Javascript) option, fixed it.

Convert MsWord first page to Image

I have an msword document that consists of some pages, i need convert only the first page to image and save it. Each page can consist of images, tables, text, etc. But i can't use clipboard buffer or any commercial software.
May be anybody know some other ways ?
You can turn on the "Generate thumbnail for Document" option and word will generate an image for you (that Windows 7 uses to show the large icon view of the document.
In word 2010, click File-Info
then the Properties Drop down
Then Advanced properties
Then Summary tab
and finally SHOW PREVIEW PICTURE
And what's worse, you can't automate it! Ugh, Something about a security risk.
When you do that, there will be an extra WMF file embedded within the DOCX that you can extract.
Print your first page to the Microsoft Office Document Image Writer.
It will give you a TIFF image.
EDIT
Alternatively, print to the Microsoft XPS Document Writer and then convert XPS to an image.

iTextSharp or XSL-FO to create a PDF dynamically with fillable forms?

This is my first stackoverflow question.
After days of research, I am still lost on how this can be done, if its even possible.
I am trying to create a PDF document using either iTextSharp or XSL-FO (FO.NET is what I am using currently). Creating the documnet is no problem. I need this documnet to have fields that the user can still fill in.
I am aware of the ability to create a PDF form using acrobat, then using iTextSharp to fill in those fields. This can then be saved and the user can open the document and edit it.
The problem with this is, anytime the PDF "template" needs to be changed, someone has to edit the PDF document, then change the backend logic to handle the new field.
I am looking for a 100% dynamic solution.
Ideally I would use XSL and FO to create this document without the need for an exisiting PDF document. I have found no way to create a fillable form using FO.NET, or even iTextSharp, without already having an exisiting PDF "template".
Thanks in advance.
I believe both the RenderX XEP and Antenna House FO processors support PDF Forms. They aren't free and additional output modules may be required for PDF Forms.

Categories

Resources