.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

iTextSharp - Multiple Document Concatenation

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net
 

Hi,

I have built a routine which takes a byte() array and passes it to iTextSharp for rendering as a PDF.  This is working just fine.

However, in my application, users want to be able to select multiple documents and have the program render them as a single, combined PDF.

For the purpose of this discussion, let's say they chose two documents.  I form the byte() array containing the data of the first document and then, I increase the size of that byte() array and load the second document's data into one.  The result is that I have a single combined byte() array which I now want to render.

However, when the PDF viewer opens (in runtime), it's only showing me the first document (as if there is no more data in the byte() array to render).
My thinking is that perhaps it's picking up the End Of File (EOF) marker and therefore not rendering the data past that point in the byte() array.

Any thoughts on this?  Here's my code.

Prior to the For/Next construct, I have a dataset already containing a list of documentId's from a database that works with my EDM package.
A webservice call returns the byte() array for each document in my dataset into mb() and I use mbbnew() to build the combined byte() array for the documents requested by the user.

Just to be clear,


View Complete Post


More Related Resource Links

Need to link multiple External Content List items to a single document metadata column

  
I have an external content list - for my purposes, the data isn't any fancier than a list of terms provided by a web service (read only - I don't need update/delete functionality). I want to be able to link any subset of those terms to a single document metadata column (in other words, I need it to work like a normal content list that is defined to allow multiple values in a column) but SharePoint doesn't let me do that on an ECL. I need the content list to be externally driven since more values are going to be added to an outside system over time, but I think it's possible that I may not need a full-fledged ECL list to make this work this way in SharePoint. Just to clarify: I don't need the metadata values in my documents to maintain a PERSISTENT link to the web service (if someone changes an underlying value in the web service DB, it doesn't need to be updated in the document table too). I just want SharePoint to offer up an updated set of source values from the web service if somebody goes in and edits the document metadata. Any ideas for how I can make this work?

Document Set - Problem when uploading multiple files with "Launch forms in a dialog" disabled

  
Hello, Has anyone come across this before? I have a basic document library for which I have enabled "Allow management of content types" and disabled "Launch forms in a dialog".  Both of these settings are in the "Advanced Settings" page.  Also, the document library does not have versioning enabled and check out is not required. I added the OOTB "Document Set" content type to this document library and allowed OOTB "Document" content type documents in this document set.  This document set does not have any default content. The issue arises after I upload multiple files and click the "Done" button.  After I do this, the browser redirects to the top level of the site!  For example, if I uploaded to my document set at http://server/sites/anyname/doclib, I am redirected to http://server/. This issue has come up in both a standard server and an enterprise server. Steps to repeat issue: Create a document set Open the document set Select "Upload Multiple Documents" Drag and drop or browse for files Click "OK" Click "Done" Actually, this issue also occurs when "Launch forms in a dialog" is enabled.  In this case, you just have to navigate to the upload form directly (with all the necessary query string parameters, of course). Has anyone else seen this issu

Using a List View web part to display documents from multiple document libraries from different site

  
Hi there, I am trying to have one web part display documents (or list items) from different document libraries (or different lists) from different site collections. I have achieved this under a single site collection using Data View Web Part (using SPD). I have also achieved displaying a single document library (or a list) from a different site collection by using List View Web Part. but I am not sure how to get my head around displaying documents or list items from different document libraries or lists across site collections. I have thought of using SPSiteDataQuery or ListViewByQuery, but they all seem to focus one site collection at a time. If any of you have done this before, please share your best practice on this one with me. Much appreciated. Clark

Adding multiple users to a document library column by web service

  

I'm attempting to create some VB code to call a SharePoint Web Service to add a document and associated metadata to a document library. I can successfully add metadata to a text column but I'm having some problems getting multiple entries into a column which is specified to take multiple users (and does so when they are added manually) although I can get a single user in using the following snippet.

Dim info2 As MySharePoint.FieldInformation = New MySharePoint.FieldInformation()
info2.DisplayName = "Authors"
info2.InternalName = "Authors"
info2.Type = MySharePoint.FieldType.User
info2.Value = "1"

I'm hoping that someone will be able to advise me of the approach or syntax necessary to add multiple users to this Authors column e.g. Users 1 and 74. I note that

info2.Value = "1,74" or info2.Value = "1;74"

don't appear to work.


Locating documents with no checked in version across multiple sites and document libraries

  

I have searched and searched but have not found a solution anywhere. My problem is that we have a number of document libraries that require check out for editing and have mandatory fields. When users upload multiple documents the documents are kept checked out until a value is assigned to the field and the document is checked in. The issue is, that users may not complete the process and subsequently no other users can see the document.

We tried indexing the 'Checked out to' field and allowing for users to search based on this. However, this does not display documents with no checked in version and as such does not help...

Is there some way that we can make the search indexer crawl these documents or have a web part that lists documents checked out to the logged in user? We are using SharePoint Foundation 2010 which may make this more difficult.


Multiple Xpath expressions returned in document order

  
Hi all

I am using XQuery in SQL Server in my project. I need to retrieve multiple elements located in different places in the document and I need the retrieved elements in the document order.
My program should work with any XML file so I do not have a specific structure. It is just a function that gets multiple XPath expressions and return the retrieved elements in the document order.

For example
<Document>
   <Book ID="1"/>
   <Book ID="2"/>
   <Book ID="3">
       <Chapter ID="1"/>
   </Book>
</Document>

Assuming the previous xml is stored in column x in Table.

select x.query('
/Book[@ID="2"],
/Book/Chapter[@ID="1"],
(/Book[@ID="1"]
') as result
from Table where ID =1

the previous query will return the elements in the order they have in the query not the order they have in the document, the result is
  <Book ID="2"/>
<Chapter ID="1"/>
<Book ID="1"/>

When retrieving multiple elements using one Xpath expressions, SQL serve

Multiple templates for Document Repository

  

Hi,

We have a document repository in SharePoint 2010 and we need to have multiple document templates for it. From the Document Repository > Advanced Settings > Document Template - it only lets us have a single document as the template.

We would like users to have the option of selecting from multiple document templates, when they are creating a new document in the document repository.

Thanks,

Aritra Saha


Sharepoint2010:Upload multiple document and connect to outlook :owssupp.dll & stssync

  

My first question went un-answered but I solved in after some midnights, now this is my second question, I am beginning to think SharePoint2010 is fantastic but is lacking in real support.

I am using SharePoint2010 , accessing from internet on Windows7(64bit) and Office 2010(64bit) notebook, While trying to access iver internet, Multiple upload of documents and Connect to Outlook are greyed out even after placing the URL in the trusted sites. Afte rmuch digging up it points to OWSSUPP.DLL and STSSYNC, which are supposed to help in these function. In Office 2010 I can't find this DLL and IE8 (64bit) does not have the STSSYNC active X loaded in my managed-add-in nor did it prompt me to download this active x.

The big question here is can some one help be shed light on this, what's the point if all on OWSSUPP.DLL are talking on Office 2007 when Office 2010 is in the market.


External Data Fields in a Word Template saved as a content type in a document library with multiple

  

I have created a Word Template for a Document Library that has an External Data Column in it of Client Name which also adds Client Address1, Client Address2, Client City, Client State, & Client Zip.  Now this works fine for a Document library with that template as the Template.dotx file. 

I want to be able to make a bunch of Templates and have them all as Content Types in one Library.  When I do this I cannot get the External Data Quick Parts to work.

Anyone have any ideas?


Need to link multiple External Content List items to a single document metadata column

  

I have an external content list - for my purposes, the data isn't any fancier than a list of terms provided by a web service (read only - I don't need update/delete functionality). I want to be able to link any subset of those terms to a single document metadata column (in other words, I need it to work like a normal content list that is defined to allow multiple values in a column) but SharePoint doesn't let me do that on an ECL. I need the content list to be externally driven since more values are going to be added to an outside system over time, but I think it's possible that I may not need a full-fledged ECL list to make this work this way in SharePoint.

Just to clarify: I don't need the metadata values in my documents to maintain a PERSISTENT link to the web service (if someone changes an underlying value in the web service DB, it doesn't need to be updated in the document table too). I just want SharePoint to offer up an updated set of source values from the web service if somebody goes in and edits the document metadata.

Any ideas for how I can make this work?


failed to upload multiple files to a document library!

  

I have a document library. I have upload a lots of files by upload multiple documents function several days ago. When I tried to upload some files today. It always failed if I drag a folder into the upload multiple documents dialog.

Drag a folder with any number of files in it to the upload multiple documents dialog. Failed.
Drag files into the upload multiple documents dialog. Sucess.
Create a folder manually, then upload files into the new folder. success.

Anybody have some clues for this problem. Why today I always failed to upload files when I drag a folder?

Thanks very much.


Filter document library based on multiple lookup values

  

Hello,

I have a very unique requirement for MOSS 2007.
Lets say there is a list of projects; A, B, C, etc.
Then there are phases of the project: Design, Develop, QA, etc.
When the documents are uploaded to a document library, a project and phase is selected at the time of check-in.
I want to create a project page to show project documents by showing documents for each phase in a different web part: eg. Design web part, Develop web part, etc. all bringing documents from the document library.
So far, all good. This can be created by using web parts, views and filters, etc.
Now, I want to create a custom list with Username, Project, Phase. like this:
User1, Project A, Design
User1, Project A, Develop
User1, Project A, QA
User1, Project B, QA

Now, if User1 goes to this project page for Project A - the user sees documents in all 3 phases.
if user1 goes to Project B - the user sees only QA documents.
I will be ok with just showing and hiding web parts completely.
or showing the web parts, but filtering out the documents. either is fine.

I have tried a combination of filters, CAML, etc. but getting values from a custom list to apply the filter is where I am stumped. I want the custom list as it will be easier for the end user to manage permissions for each user for each project for each phas

Search multiple document library in Query

  

How to search multiple document library in a sitecollection. these document library has same named : DocLib1, DocLib2, DocLib3 ... they all in a same sitecollection.

How to search document via FullTextSqlQuery or other Search Objects?

If there is another sitecollection structured similiary with this one, how to search all these document library? Can we search all sites documents then use url for filter ?

Thanks a lot.

 


Multiple Fileupload into the sharepoint document library using Fileupload control inside gridview

  

Hi,

how to upload multiple files to the sahrepoint document library using fileupload control inside the gridview.?

this is my form design:

<div>

<asp:Gridview id="gridview" runat ="server" autogentatecolum="false">

<columns>

<asp:TemplateField Headertext="3DFinal" runat="Server">

<ItemTemplate>

<asp:FileUpload id="Fileupload1" runat ="Server"/>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField Headertext="2DFinal" runat="Server">

<ItemTemplate>

<asp:FileUpload id="Fileupload2" runat ="Server"/>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField Headertext="2Conceptaul" runat="Server">

<ItemTemplate>

<asp:FileUpload id="Fileupload3" runat ="Server"/>

</ItemTemplate>

</asp:TemplateField>

</columns>

</asp:GridView>

</div>

<div>

<asp:Button id="Save" runat="server" Text="Save" onClick="btsave-Click"/>

</div>

 

If i click the save button the files should go to the sharepoint document library?

i need to uplaod multiple files to the document libray using file upload inside the gridview..

any one know about this file

How to use DVWP to filter multiple columns in a document library

  

I am not new to SP, but newer to developing in SP, so I need some help please.

I am attempting to convert my company away from nested folders on SP. Elsewhere I saw a way to add multiple custom columns to a document library and then use a different web part (I thought the Form Web Part, but that only lets you filter on one column at a time) to filter the document library using those columns.

Ex: I have three columns:

* Market - with the checkbox choices being Employer, Public, Payer, and GovEduLab. A document could be a part of all, some or one of those markets.
* Product - with the checkbox choices being Care Solutions and Behavioral Solutions. A document could be a part of all, some or one of those markets.
* Process - again, checkbox choices being Account Planning, Commissions, Contracts, etc. And again, the doucment could be a part of all, some or one of those markets.

I want to create something that will allow the user to use some kind of "form" to filter find any document that is a Public-Care Solutions-Contract document and only show thsoe documents in the library.

This is what I have been trying to make it look like, but I am not tied to this:

<br

regarding multiple documents upload in document library

  

hi ,

I am using share point 2007 (out-of-box) .

I want to upload multiple document into a document library but I am not able to see any option for uploading multiple documents,  I am able to see only one option under "Upload" menu, i.e "upload Document". can any one please tell me why I am not able to see multiple documents upload option ??

Thanks and Regards

Prashanth J

 


Multiple file upload to the sharepoint document library using file upload control inside the gridvie

  

how to upload multiple files to the sharepoint document library using fileupload control inside the gridview.

form design is

<asp:GridView id="gridview1" runat="server"  autogenteratecolumn="false">

<asp:TemplateField HeaderText="3DFinal">

<ItemTemplate>

<asp:FileUpload id ="Fileupload" runat="Server"/>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField HeaderText="2DFinal">

<ItemTemplate>

<asp:FileUpload id ="Fileupload2" runat="Server"/>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField HeaderText="Final">

<ItemTemplate>

<asp:FileUpload id ="Fileupload3" runat="Server"/>

</ItemTemplate>

</asp:TemplateField>

</asp:GridView>

 

<asp:Button Id="Buuton1" runat="server" text="Save"/>

if i click save button files should go to my sharepoint document library.

if any one know pls help me...

 

thanks,

ANNT


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend