de O2 Solutions - Tipo de producto: Componente / .NET Class / .NET Compact Framework / 100% Managed Code
How to divide a column in two equal parts?
Thanks
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 12-Jan-2012 07:51:17
Hello,
You draw your text in 2 equal textboxes so you visually create 2 equal columns.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: PDF4NET sabasharif17 [AB, Canada] 12-Jan-2012 09:09:54
Thanks For your response.
I created a column by using ColumnWidth. Now, I want to divide this width into two equal columns. How do I achieve it?
Thanks
RespondeRE: RE: RE: PDF4NET Adrian Marin (O2 Solutions) 13-Jan-2012 07:38:01
Hello,
PDF4NET does not include a property named ColumnWidth.
Can you give us more details?
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
How to set the margins and draw the margins?
And, is there any strategy to identify where should we draw vertical lines?
Responde
RE: PDF4NET Adrian Marin 12-Jan-2012 07:49:16
Hello,
The margins are where your application logic dictates. The page canvas allows free text drawing, you draw the text in a textbox and place it on a page. Please take a look at TextBoxes sample for more details.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
Where can I find Sample Code or Tutorial for Component Source PDF? Thanks
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 11-Jan-2012 10:00:35
Hello,
If you are referring to PDF4NET product, the install kit includes both the samples and the documentation.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
How do I draw CheckBox in PDF4NET?
Thanks
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 28-Dec-2011 14:39:53
Hello,
You need to use the PDFCheckBoxField class to add a checkbox to a PDF document. Please take a look at FormCreate sample, it shows how to create form fields with PDF4NET.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
Hello,
PDF File - Is there a way to find the x and y PDF points position for a specific piece of text in a PDF File using PDF4Net? I am working on to find the search text in a PDF page and highlight the same on the fly and shows it to the user with the highlighted text on the search keyword.
Thanks,
Gan
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 09-Dec-2011 08:45:11
Hello,
The SearchText method returns a collection of search results. Each search result has a collection of text runs (PDF fragments that compose the search result) and each text run has information about its position and size.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
Hi ,
I want to set the column width based on the string length.
example pdf4net string length is 7 . how to set the column width based on this string length.
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 01-Dec-2011 10:15:30
Hello,
You measure the string using the font's MeasureString method and then you set the box width to match the string width.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
I am trying to align the text.
I used TextAlign.topjustified.The text came up in the following format.The last line is not aligned properly. is there any other way?
library for embedding pdf documents creation in any .NET application. The pdf files
structure is library for embedding pdf documents creation in any .NET application. The pdf
files structure is
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 30-Nov-2011 12:02:51
Hello,
I assume the last line is also justified. You need to add a '\n' character at the end of the text and the last line will no longer be justified.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
How to set the left margin and right margin and make the string to fit with in left and right margin . If the string is lengthy then it should go to the next line.
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 17-Nov-2011 08:28:14
Hello,
PDF4NET does not use page margins, it can draw anywhere on the page. You need to use the DrawTextBox method if you want the text to wrap at a specified width.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
i am trying to write the following strings into pages .I don't know exactly the string length.After the company name, the location should come in the next line. How can i get the last line position so that i can set the next string position(topleft).
If the string is not fit in one page how can i set the next page.
Company :Logistics Pvt Limited Logistics Pvt Limited Logistics Pvt Limited Logistics
Pvt Limited Logistics Pvt Limited Logistics Pvt Limited Logistics Pvt Limited Logistics
Pvt Limited Logistics Pvt Limited Logistics Pvt Limited
Location : 70, marvelle , marvelle marvelle marvelle marvelle
marvelle marvelle marvelle marvelle
marvelle marvelle marvelle marvelle
page.Canvas.DrawTextBox(sCompanyText+sLocationText, fontText, null, brush, 30, 120,page.Width-30,page.Height-40,tfo);
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 17-Nov-2011 08:33:21
Hello,
Please take a look at MultiColumnTextAndImages sample for details about to flow text between pages.
Instead of DrawHTMLTextBox method you can use the DrawTextBox method.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
I'm trying to create a PDF document with the following html string but keep getting xml error The html start tag is different than the <TD> tag. This is my html
string longText = @"<TABLE><TR><TD>Domain/Workgroup Name</TD><TD>SCAP-DEV2</TD></TR><TR><TD >File Name (With Path)</TD><TD>c:
\PSR\Data1 - Copy.txt</TD></TR><TR><TD >Machine Name</TD><TD>sr-w2k8-ccs-64</TD></TR><TR><TD >PARENTDIRECTORYINT</TD><TD>c:\PSR</TD></TR></TABLE>";
double columnCount = 1;
double columnWidth = (612 - leftMargin - rightMargin);
double columnHeight = 792 - topMargin - bottomMargin;//792 - height of Letter size in points
PDFBrush blackBrush = new PDFBrush(new PDFRgbColor(0, 0, 0));
PDFFont font = new PDFFont(PDFFontFace.Helvetica, 12);
PDFDocument pdfDoc = new PDFDocument();
PDFTextFormatOptions tfo = new PDFTextFormatOptions();
tfo.Align = PDFTextAlign.TopJustified;
tfo.ClipText = PDFClipText.ClipWords;
int columnTextLength;
bool endOfText = false;
int startIndex = 0;
// start drawing text
while (!endOfText)
{
double leftOffset = leftMargin;
PDFPage page = pdfDoc.AddPage();
int i = 0;
while (i < columnCount)
{
//columnTextLength = page.Canvas.FitHtmlText(longText, startIndex, font, columnWidth, columnHeight);
// draw text above image
page.Canvas.DrawHTMLTextBox(longText, font, null, blackBrush,
leftOffset, topMargin, columnWidth, columnHeight, tfo, startIndex);
// move the index to the next fragment
startIndex = startIndex + columnTextLength;
if (startIndex >= longText.Length)
{
endOfText = true;
break;
}
i++;
}
}
// Save the document to disk
pdfDoc.Save(@"c:\myrepor1.pdf"); //SR
I want to know how to create a pdf doc with large html strings and without getting any error even if the htm string does not fit one page.
Responde
RE: PDF4NET / DrawHtmlTextBox error Adrian Marin (O2 Solutions) 04-Nov-2011 16:09:49
The DrawHTMLTextBox does not support all HTML tags, only a few text formatting tags are supported, such as b, i, u, font.
The HTML formatted text must also be XML well formed.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
I have a process where I am using PDF4NET to merge a bunch of pdf files. I have approx 4500 files that account for approx 366MB of data. I am calling MergeFiles passing a source file destination name, and an array of file locations to merge. This is causing OutOfMemory exceptions with the aspnet worker process. Is there a more efficient way to merge these files?
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 03-Nov-2011 09:09:42
Hello,
The MergeFiles creates the merged document in memory by default and this can cause the memory exceptions if the document is very large. The solution is to implement a merge process that takes each file, appends it to destination document, saves the appended pages and then goes to next file. In this way only a single file is kept in memory at a time.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Reply
RespondeRE: RE: PDF4NET cwatts [ON, Canada] 03-Nov-2011 14:33:33
I did try a solution where I reduced the number of items I passed into the Merge process, but I made it call still with roughly 500 each time. Are you saying that if I have 4500 PDFs to merge I should call Merge 4500 times, each time passing the new file path, and the file path to merge into, .... and that should reduce memory usage?
RespondeRE: RE: RE: PDF4NET Adrian Marin (O2 Solutions) 04-Nov-2011 16:09:14
A custom merge procedure can be implemented like this:
public void MergeFiles(string output, string[] input)
{
FileStream outputStream = new FileStream(output, FileMode.Create, FileAccess.ReadWrite, FileShare.None);
PDFDocument doc = new PDFDocument();
doc.BeginSave(outputStream);
for (int i = 0; i < input.Length; i++)
{
PDFFile file = PDFFile.FromFile(input[i]);
PDFImportedPage[] pages = file.ExtractPages();
file.Close();
int startPage = doc.Pages.Count;
for (int j = 0; j < pages.Length; j++)
{
doc.Pages.Add(pages[j]);
}
int endPage = doc.Pages.Count - 1;
for (int j = startPage; j <= endPage; j++)
{
doc.SavePage(j);
}
}
doc.EndSave();
outputStream.Flush();
}
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: RE: RE: PDF4NET cwatts [ON, Canada] 09-Nov-2011 22:23:31
doc.SavePage, doc.BeginSave, and doc.EndSave are not available as options in my version --> 2.6.2. Are there alternatives for me?
RespondeRE: RE: RE: RE: RE: PD... Adrian Marin (O2 Solutions) 10-Nov-2011 08:10:34
Hello,
These features are available only in latest version 4.3. PDF4NET 2.6.2 can merge PDF files only in memory.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: RE: RE: RE: RE... cwatts [ON, Canada] 02-Dec-2011 15:42:45
Who can I contact about getting that 4.3 version. I sent an email to support@componentsource.com but I didn't get any response.
RespondeRE: RE: RE: RE: RE: RE... Adrian Marin (O2 Solutions) 05-Dec-2011 08:50:36
Hello,
Please send an email to techsupport at o2sol dot com.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
I am trying to calculate the maximum font size for my content before writing it to the pdf.
while (lineWidth > pdfPg.Width - _wdthMarg | linesHeight > pdfPg.Height - _htMarg)
{
// adjust font size
newFntSize -= 1f;
// get values again to check against allowed sizes
textFont = new PDFFont(FontFace.Courier, newFntSize);
lineWidth = (float)textFont.MeasureString(line);
linesHeight = newFntSize * YLines;
}
When I create the pdfPg, I'm getting the default values of 612x792 for portrait. I adjust my font until it 'fits', but after writing out to the pdf and displaying it, the content only fills about 2/3 of the width and 1/2 of the height. I am trimming the content to eliminate whitespace at the end of the line.
I read in another post about how the size of the page is default until a document is loaded. Is the size default until content is written to it?
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 03-Aug-2011 08:21:26
Hello,
Can you send us (techsupport at o2sol dot com) sample code fragment that we can run and reproduce the problem? Also please send us your output PDF file.
The page size is fixed and it does not depend on the content drawn on it.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
I want know the size of a page of a pdf file.
I use O2S.Components.PDF4NET.PDFDocument.PageSize property but return a not correct value.
Also the properties PDF4NET.PDFPage.Height and PDF4NET.PDFPage.Width return a not correct value.
For example i have a file pdf. If i open this file on Acrobat Reader, i can view a tooltip that say that the dimensions of the page are:
width: 420
height: 297
It is a page A3.
When in my software i open this file pdf, these are the values ??of properties:
O2S.Components.PDF4NET.PDFDocument.PageSize: Letter
O2S.Components.PDF4NET.PDFDocument.PageWidth: 612
O2S.Components.PDF4NET.PDFDocument.PageHeight: 792
O2S.Components.PDF4NET.PDFPage.PageSize: A0
O2S.Components.PDF4NET.PDFPage.PageWidth: 612
O2S.Components.PDF4NET.PDFPage.PageHeight: 792
how can I know the size of the page that I can see on acrobat reader?
Responde
RE: PDF4NET How to know the size of page Adrian Marin (O2 Solutions) 25-Jul-2011 14:32:03
Hello,
Please send us (techsupport at o2sol dot com) the PDF file and we'll investigate it.
Thank you.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Reply
RespondeRE: RE: PDF4NET How to know the size ... montanari [Italy] 26-Jul-2011 15:02:40
have you received the files pdf?
have reproduced the problem?
thanks
RespondeRE: RE: RE: PDF4NET How to know ... Adrian Marin (O2 Solutions) 26-Jul-2011 15:05:28
Hello,
After you load the files in a PDFDocument, the Width and Height properties of the page will give you the values you want:
document.Pages[0].Width and document.Pages[0].Height.
The PageSize, PageWidth and PageHeight properties on the PDFDocument are default values to be used when creating new pages. Actual page width and height are given by corresponding page properties.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Reply
Reply
RespondeRE: RE: RE: RE: PDF4NET How... montanari [Italy] 27-Jul-2011 13:30:58
have you received my reply addressed to techsupport@o2sol.com?
RespondeRE: RE: RE: RE: RE: PD... Adrian Marin (O2 Solutions) 27-Jul-2011 13:41:11
Hello Luca,
Yes, we got your message and we replied to it.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: RE: RE: RE: RE... montanari [Italy] 28-Jul-2011 13:11:15
all work correctly thank you so much for the help.
thanks and greetings
Responde
Hi. I am using PDF4NET (version 4.3.0.10). I am adding a PDF textbox field using the VB code as below
Dim formField As New PDFTextBoxField("PDF_Field_Name")
While i am able to set properties like font-size and read-only to this textbox as below
formField.ReadOnly = True
formField.Widgets(0).Font.Size = 10
I am unable to set the font-style. I want the text in this textbox to be shown in "Arial" font. Can you please let me know how can i achieve this.
Your reply will be very helpful to me.
Thanks in adavance!!
Regards,
Vijay
Responde
RE: PDF Text Box field Font Adrian Marin (O2 Solutions) 01-Jun-2011 16:27:17
Hello,
You can set the font like this:
textboxField.Widgets[0].Font = new TrueTypeFont("arial.ttf", 12, true);
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
Does you product support converting word 2003 documents to PDF? I have PDF4Net and PDFView4NET
Responde
RE: PDF4NET - convert word docs to pdf Adrian Marin (O2 Solutions) 10-May-2011 07:52:23
Hello,
PDF4NET does not support this feature.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
Hello,
We are using PDF4Net in our project and please find below the code snippet :
Using pdfDoc As New PDFDocument(strm)
....
End Using
The memory before this statement execution is 56,000 K and once the staement is executed the memory increases to 1218,000K. We are opening a 450 MB PDF document from the stream and had even tried disposing the object manually as well and the memory is not coming down once the code moves out of this method.
Kindly advise me how to proceed on this.
Thanks,
Ganesan
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 03-May-2011 07:48:52
Hello,
The .NET Garbage Collector has a non-deterministic behavior, the exact moment when the memory is actually released is unknown.
Just for testing purposes, after the using block you can force the garbage collector to run by calling GC.Collect() and the memory will be freed immediately.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Reply
RespondeRE: RE: PDF4NET gsubramanian [CA, USA] 03-May-2011 21:12:30
Hello,
I had already tried GC.Collect() but no avail. The memory readings are not coming down.
Thanks
RespondeRE: RE: RE: PDF4NET gsubramanian [CA, USA] 04-May-2011 18:13:08
Hi Adrian,
Here is my project requirement and am looking for a solution to implement this:
Handling of huge PDF document using PDF4Net. During the implementation of the same, I am getting OutofMemory exception and looking for implementing it in a better way. My requirement is as follows:
• Opening a large PDF document (between 500 MB to 1 GB)
• Splitting it into individual pages
• Looping through each pages
• Doing some manipulation on the split page
• Adding the split page into a new document after the page manipulation.
• Once all pages manipulation is done, the new document will be saved into the hard drive.
Please advise me how can i avoid the OUtofMemory Exception in this case.
Thanks in Advance.
RespondeRE: RE: RE: RE: PDF4NET Adrian Marin (O2 Solutions) 05-May-2011 14:32:47
Hello,
This can be implemented using PDFFile.FromFile method to open the source file, extract only the pages you need using ExtractPages method, process them, add them to a new document and save the document.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: RE: RE: RE: PD... gsubramanian [CA, USA] 05-May-2011 17:07:44
Hello
I am already doing the same thing as per your suggestion
Please find below the code snippets which i am using for this:
pdfcodeFile = PDFFile.FromFile(localfilename)
Using pdfdocteststrm As IO.Stream = New IO.FileStream(saveAs, IO.FileMode.Create)
Using pdfDoctest As New PDFDocument
pdfDoctest.BeginSave(pdfdocteststrm)
For i As Integer = 0 To pageNum - 1
' extract the page
ip = pdfcodeFile.ExtractPage(i)
ip = LoadO2SAnnotations(userarray(0), userarray(1), userarray(2), i, False, redactionflag, ip)
pdfDoctest.Pages.Add(ip)
pdfDoctest.SavePage(i)
Next
pdfDoctest.EndSave()
pdfDoctest.Dispose()
End Using
End Using
My understanding here is I am opening a 450 MB file using pdfcodeFile which will be in memory. I am going to create a new document and keep adding each and every page of already opened document (after manipulation) to a new document and size of the new document keeps increasing and not sure at what point am getting OutofMemory Exception. Is it because of 2 similar size pdf files (bigger file) in memory creating issues?
Moreover, i am not getting OutofMemory exception all the times.
Please let me know if i am doing anything different.
Thanks,
RespondeRE: RE: RE: RE: RE: RE... Adrian Marin (O2 Solutions) 06-May-2011 14:29:05
Hello,
The code seems fine, can you send us the PDF file? You can send an email to our support department with a link to the file.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: RE: RE: RE: RE... gsubramanian [CA, USA] 09-May-2011 20:28:26
Hello Adrian,
The PDF document has been uploaded and the link to the same has been sent to the following support email id: support@o2sol.com. Can you please let me know once the file has been downloded so that we can remove it off from the link?
Kindly let me know if you have any findings on the issue. Please get back to us in case of any questions.
Thanks,
RespondeRE: RE: RE: RE: RE: RE... Adrian Marin (O2 Solutions) 10-May-2011 07:53:36
Hello,
We did not receive the email.
Please send it to techsupport @ o2sol . com
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: RE: RE: RE: RE... gsubramanian [CA, USA] 10-May-2011 17:28:31
Hello Adrian,
I have resend the email to the following email id as well: techsupport@o2sol.com. Kindly acknowledge the receipt of the same.
Thanks,
Responde
Using PDF4Net 3.3.3
Trying to remove a layer without much success.
doc=New PDFDocument(filename)
doc.layers.count is always 0, even when the document does have layers (as evidenced when opening the document with adobe reader)
with doc.layers being empty, I can't remove a layer.
What am I missing?
Thanks
Responde
RE: PDF4NET dave.yule [BC, Canada] 21-Apr-2011 18:13:06
Error in previous post:
doc.pages(0).canvas.layers.count is always 0......
RespondeRE: RE: PDF4NET Adrian Marin (O2 Solutions) 22-Apr-2011 09:22:15
Hello,
PDF4NET cannot remove layers from a PDF file. The Layers collection is used for creating layers only, it is not populated with existing layers in a PDF file.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
We have upgraded PDF4NET component from 3.3.6 to latest and we are using PDFDocument.FlattenFormFields() method in older version which is not available in the latest version. Can you please let us know the alternative method for that?.
Thanks & Regards
Veera
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 31-Mar-2011 09:55:46
Hello,
The method for flattening form fields is PDF4NET 4.3 is pdfdocument.Form.FlattenFormFields()
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
Hi
I am using O2SComponents ver 3.3.6.
I want to rotate the pdf page to 180 degrees.
Can anyone let me know how to do it?
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 30-Mar-2011 12:35:06
Hello,
PDF4NET 3.3.6 cannot rotate pages, you need to upgrade to latest version which supports this feature.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
Hello,
We have tried PDF4NET to Search Some text from the PDF file and then draw a shape around search occurrences.
There are some problems which we noticed:
- If we need to find occurences of [dev] from a pdf file then <searchText> method returns words like, development,developer and like wise along with word dev. Is there any way to define search preferences like whole word search?
- We are using search text rectangle from the collection return by <SearchText> function. But in some texts like [good] it fails to draw a rectangle around whole word. To be specific it missed out the lower part of [g].
Any help would be greatly appreciated.
Thanks and Regards,
Hiran
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 14-Mar-2011 15:37:35
Hello Hiran,
#1 - search preferences like whole word search are not support yet. The search text is found whether it is a whole word or part of a larger word.
#2 - The bounding box of text runs and search results uses the text baseline as bottom edge. This is why the lower part of g, p, falls outside. In the future we plan to add support for extended bounding boxes so the lower parts of these letters are also included.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
How do you get the (x, y) location of a PDFField? The O2S.Components.PDF4NET.dll version is 4.1.2.0. It used to be available in a much earlier version, but I can't find how to do it in this version.
Responde
Hi,
I am creating a dynamic PDF using PDF4NET in .NET and i am facing a problem when i am trying to set the border color programatically.
I created a new PDFTextBoxField and then was trying to apply border color to it. Following is the cod i wrote.
DirectCast(formField.Widgets(0).BorderColor, O2S.Components.PDF4NET.Graphics.PDFRgbColor).R = 0
DirectCast(formField.Widgets(0).BorderColor, O2S.Components.PDF4NET.Graphics.PDFRgbColor).G = 0
DirectCast(formField.Widgets(0).BorderColor, O2S.Components.PDF4NET.Graphics.PDFRgbColor).B = 0
I am getting object refernce error. I am able to assign other properties like font and font size etc. But the bodercolor is giving this error. Please help me.
Regards,
Nick
Responde
Hi forum…
I am working on an application that uses PDF4NET v. 4.1.0.0 to generate a consolidated PDF using multiple child PDF files. We have encountered a problem with this tool: sometimes it will not render one of the child files during the consolidated PDF generation. The child file generates the following message in a pop-up when going to that page:
There was a problem reading this document (20).
The other documents in this child file render properly, as do all the other children files. The problem child file renders properly when it is viewed by itself..
This is not an isolated problem, either. It has occurred multiple times (at least 3).
Is this a known problem? Does the tool have to use certain PDF files, such as ones created with particular versions of acrobat? We are using 4.1.0 currently, would upgrading to 4.1.3 fix this issue?
Responde
RE: PDF4NET support@componentsource.com 10-Feb-2011 18:09:07
Hi there,
Thank you for submitting your query on the PDF4NET Forum here at ComponentSource.
I run this query with one of the authors of O2S PDF4NET and they sent this information for you:
====
This problem can appear because of multiple causes, we need to see the file before having an exact answer.
You can also try the latest version 4.2.1 to see if the problem is fixed. If not, please send us the child PDF file that is not merged correctly and we’ll investigate it.
====
Please, feel free to contact us on support@componentsource.com if you need us.
Best regards,
Enrique Perez
ComponentSource Support
Responde
Im using O2S PDF4NET (trial version) and facing some problem when we search and extract the text from the pdf (using O2S.Components.PDF4NET.dll) as mentioned below
1. Words in Capital letters are splitting as two words (ex: word “APPLICANT” extracted from pdf as “A” and “PPLICANT”)
2. Words in bold letters are splitting as two words (ex: “Borrower” extracted from pdf as “Borr” and “ower”)
3. Space (“ “) was omitted while searching a text in pdf (ex: "Important Information for Refinancings of Loans" text searched as “ImportantInformationforRefinancingsofLoans”)
Trial version component detail:
File Name: O2S.Components.PDF4NET.dll
Product Version : 4.1.1
File Version : 4.1.1.26
Size : 1.79MB
Is this problem with trial version or exists in registered (latest)version also?
Responde
RE: PDF4NET problem support@componentsource.com 25-Jan-2011 17:32:54
Hello there,
Thank you for submitting your query here on the PDF4NET Forums at ComponentSource. I run your query with O2 Solutions and they sent the below information for you:
===
#1 & #2 – the problem is that the words you see on the page are not drawn as full words in the PDF page. They are drawn as separate string objects so PDF4NET does not know whether they are separate words or not.
#3 – the text does not contain actually space characters, the words are placed on the page at fixed positions so visually you have a page, but the page content does not include the space character. We’re working to improve the text extraction features in future versions of PDF4NET so these visual spaces are recognized and transformed into space characters.
===
I hope it helps,
Should you require any assistance then please, do not hesitate to contact us
Regards,
Enrique Perez
ComponentSource Support
Responde
We've been using PDF4NET for quite some time, but ran into a little peculiar issue. We use PDFPage.Canvas.DrawTextBox to draw text boxes on a pdf page, but noticed that it automatically removes starting white spaces. This is not a desired behavior for us. Is there an easy way around it?
Responde
RE: PDF4NET dongli [QC, Canada] 06-Jan-2011 21:02:36
nvm, just saw that I can pass a PDFTextFormatOptions object to that function which has the property KeepWhiteSpaces :)
RespondeRE: RE: PDF4NET vkmaheshkumar [India] 03-Feb-2012 12:19:16
Could you please provide a sample code snipet how to implement this? :-)
RespondeRE: RE: RE: PDF4NET Adrian Marin (O2 Solutions) 03-Feb-2012 16:13:15
Hello,
The DrawTextBox method has an overloaded version that accepts a PDFTextFormatOptions object as parameter.
Create a PDFTextFormatOptions object, set the KeepWhiteSpaces property to true and then call the DrawTextBox method and pass this object as parameter.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
Hi,
We have a problem with PDF4NET that is still present in the latest 4.1.3 version. George Smith emailed you about this in September and again at the end of October but got no reply. We are heading for a software release but this issue looks likely to throw us off schedule for all but the English releases.
Basically he is using the new .SavePage() method to force the PDF to be saved after each page. The created PDF is missing all of the accented characters in non-english languages. Using the .Save() method works OK but the PDF is too big for this to work in our application due to the resulting memory usage during generation.
We have a corporate license for v4.
Let me know if you want us to email you the example program again - this is the O2S example with minor modifications to use .SavePage() and clearly shows the problem.
Thanks,
Alastair Mutch
VP Product Development, Spacelabs.
Responde
RE: PDF4NET - problem with SavePage() on a... Adrian Marin (O2 Solutions) 15-Nov-2010 12:24:51
Hello Alastair,
I'm not aware of this problem, can you tell me who replied to your emails?
Also, if you can send us (directly to us or to ComponentSource support) a sample code fragment that we can run and reproduce the problem, it will help us locate it faster and fix it.
Thank you.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: PDF4NET - problem with SavePa... alastair.mutch [United Kingdom] 15-Nov-2010 13:41:00
Hi Adrian,
George got a receipt from after sending an email to support(AT)o2sol.com and got an automatic response. He did get help on some earlier issues on the same email address.
I'll forward on his email to techsupport(AT)o2sol.com
I've sent the code to Enrique at ComponentSource tech support this morning so you may get it from them shortly too.
Regards,
Alastair
Responde
Hi,
I'm using the PDF4Net library to apply watermark to existing PDF files. However, these watermarks can be deleted if the user opens in a PDF Editor. I tried calling the FlattenFormFields() method on the PDFForm object before saving, but it still does not make the watermark non-editable. What can I do to address this issue?
Thanks,
Prabin Varma
Responde
RE: How to make the Watermark non-editable Adrian Marin (O2 Solutions) 15-Nov-2010 12:21:34
Hello Prabin,
How do you draw the watermark on document's pages? The FlattenFormFields method has effect only on form fields. The watermarks, like any other graphics on the page, can be edited with a PDF editor like Adobe Acrobat. You can try to encrypt the document and specify in the document permissions that document editing is disabled.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
We have functionality within our application where we have added a button (via the PDF4NET product) to a a PDF page. This button performs a PDFSubmitFormAction which submits the aspx page. By adding the button to the PDF page and submitting the aspx page, we are able to capture and save all of the values in the PDF forms controls which have been prepopulated by our application and/or edited by the user. This functionality has always worked fine until the introduction of IE8 into the mix. With IE8 (and this seems to be regarding of whether the applicaiton is Win7 or XP), the page essentially freezes when attempting to reload after the submit.
The application always runs in IE. It always runs as a trusted site, so we can adjust IE settings as necessary to fix this. We have tried changing numerous IE settings but nothing has worked to date. Also, I've rules out anti-virus software because we have the same software running on workstations with IE7 and IE8 and the only workstations that have an issue are the ones with IE8 installed.
Has anybody run into this kind of problem, either with IE8 or with PDF4NET. Any suggestions?
Thanks
Tom
Responde
RE: PDF4NET Adrian Marin (O2 Solutions) 21-Oct-2010 14:37:13
Hello Tom,
This seems to be a problem with the Adobe PDF plugin for Internet Explorer. I suggest to put a breakpoint in the load event of the page that handles the form submission. If the page is not reached when clicking the submit button, then it is a problem with the PDF plugin, because at that moment only the PDF plugin has control over the PDF file. If the page is reached, then the data has been submitted with success and you can run through the code step by step to see if the page hangs in a PDF4NET call or it hangs somewhere else.
I hope this will help.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: PDF4NET thomas.sullivan [NC, USA] 25-Oct-2010 14:58:47
Hi Adrian,
I had already done what you suggested. In fact the page is successfully submitted. I am able to run completely throught the code successfully. The page hangs after all the code has completed and the page is attempting to re-display in IE. At that point, it hangs. It will eventually display completely, but it can take several minutes. (versus a few seconds during the initial display) If you check the view source of the page as it's attempting to reload, you can observer that it is only partially reloaded. One can observe some of the java script as it loads into the page. It hangs well before it is even attempting to redisplay the PDF form. It really seems to me that something in IE is preventling the reload.
Thanks in advance for any other suggestions that you might have.
Responde
PDF4NET contact.kkg [India] 10-Aug-2011 06:12:29
hi,
i am trying to save my pdf in database through window application. I have add one button on pdf to save, but when my pdf opened using window application then my save button does not work. so please tell me how it will work and save pdf.
regards
AASHISH BHAGAT
Responde
Hi all,
I'm creating a pdf from a crystal report which has tables and borders in it, while making use of PDF4NET. Upon printing the pdf,of the tables' borders don't appear (some do).
The only way I've figured out to 'resolve' this issue is by setting the printers properties to 'print background images'. Needless to say this isn't a preferred solution for my company as we're sending out client statements via email which often are printed by the clients themselves.
Is there a way to 'force' the background to be printed or alternatively eliminate the background by flattening any potential layers in the pdf? I've been looking in the help files and searching online for 2 days and can't find a solution.
To give you an idea as to what is additionally being done to the pdf:
1.) I add page numbering
2) Watermarking (text with 50% transparency) on canvas
3) Add company logos
4) OMR markings (images) for internal printing company
5) Merging pdf's - Appending additional pdf's to customer statement
I would appreciate any advice you could give.
Regards
Jacques
Responde
RE: PDF4NET - Printing support@componentsource.com 13-Sep-2010 08:45:31
Hello there,
Thank you for taking the time to submitting your question on the PDF4NET forum here at ComponentSource.
I run your query with the right people at O2 Solutions , the authors of PDF4NET and they sent the belo information for you:
====
There is nothing PDF4NET can do here. The problem appears when the PDF file is created by printing it to a PDF printer. At that moment the PDF file is created without background, so PDF4NET cannot do anything.
The solution would be that your customer creates the reports in other ways so the images are not seen as background and they are printed without additional settings.
====
I hope it helps.
Feel free to contact us on support@componentsource.com for any further clarification.
Regards,
Enrique Perez
ComponentSource Support
Responde
I need to convert a PDF to TIFF. Is it possible with PDF4NET?
best regards,
Michel.
Responde
My question is how can i set a font to a spesific PDF Field ??? my code is below code sample will be very helpfull . thanks
// Create the fonts to write the text
TrueTypeFont ttf = new TrueTypeFont("c:\\windows\\fonts\\arialuni.ttf", 12, true, true);
TrueTypeFont titleFont = new TrueTypeFont(ttf, 16);
string pdfTemplate = Server.MapPath("PDFTmpFile/FB_Activation_Form.pdf");
string newFile = Server.MapPath("PDFfiles/WebForm" + hdnApplicationNumber.Value + ".pdf");
// Create the pdf document
PDFDocument doc = new PDFDocument(pdfTemplate);
(doc.Form.Fields["FirstName"] as PDFTextBoxField).Text = txtFirstName.Text;
doc.Save(newFile);
Responde
Hi Guys,
I have problem in getting images from some pdf-documents by PDF4NET - bitmaps that PDF4NET returns for me are inverted. Could you please help me? What is a reason of the problem?
Responde
Hi,
I am a new user. I saw the sample files and noticed that column widths are hardcoded. I wanted to know if there is any other way to determine width other than actually seeing the output.
Also I have a column which is too big to fit in 1 line. How should I deal with this?
Thanks
Responde
Hello,
I am developing a software using C# . In this software i need to extract the coordinates of images from pdf file.
As i have opened it into C# using Pdf reader, so now i want the code to extract the coordinates,
So please help for this.
Thanks
Responde
Hi all
I am buiding an application with which a customer can fill an online order PDF document. The Customer has to fill one PDF document for each item. The customer can place orders for sevral items and print the PDF document for all items at the end.
When a customer fills the first PDF item, I store the PDFDocument object in session and then use the AddPage method of the PDFDocument object to append orders of subsequent items to the first PDF document.
When i flush the PDF document to the webpage and try to scroll through it, i get the error "An error exists on this page. Acrobat may not display the page correctly. please contact the person who created the PDF document to correct the problem"
The content on the PDF document is available as required but the above error is a problem to clients.
Please any ideas??????
Responde
Hi,
I am having a problem, when i make a textbox on the PDF form and set it property required=true, create the form (in code) and save it to disk, then edit the form and click the submit form button, it does not ensure that all the required fields are filled in.
However, if the field had text in and i deleted the text, then try and submit the form, then it will say it is required and stop the form submission
This is driving me insane, please help.
Many Thanks
Warren
Responde
How can i save pdfdocument into stream of bytes.
Note : I am using webservice which calling PDF4NET dll to create PDF document.
Responde
Hi' I've followed your example here (extract from help):
Sample
The following sample shows how to place the content of 4 pages on a single new page:
PDFFile mctiFile = PDFFile.FromFile( "multicolumntextandimages.pdf" );
// extract the content of first 4 pages
PDFImportedContent[] ic = mctiFile.ExtractPagesContent( "0-3" );
// create the new document
PDFDocument doc = new PDFDocument( );
// add a page to it
PDFPage page = doc.AddPage( );
.......................
My question is this: Is it possible to resize a pdf before inserting the extracted content to the final page??
Otherwise, an extremely nice component and easy to use :)
Best regards
Christoffer Munck
2proceed.com
Responde
I need to create PDF templates (I could use Acrobat for this) but I must be able to programmatically identify the graphics and text within the template using PDF4NET.
Can I do that?
For example, a page has a 300px X 500px graphic at a certain location on the page. Beside it is some text.
Can I locate the exact location and size of each graphic and then replace it with another one?
Responde
I created a button print in my Pdf document. I don't want It's possible it by using Print Menu of PopUp Menu . How could I do ?
Responde
Hello
I added a button and I would like to know how I can make so that it is not visible when I print the document. Also, I would like to know how I can prevent the popup from posting myself.
thanks
Responde
RE: PDF4NET Adrian Marin 05-Apr-2007 11:36:35
Hello,
You need to set the visibility status on button's normal appearance. Here it is the code:
button.NormalAppearance.VisibilityStatus = FieldVisibilityStatus.VisibleNonPrintable;
Can you please give us more details on this: "Also, I would like to know how I can prevent the popup from posting myself."?
Thank you.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: PDF4NET rcasanova [Canada] 11-Apr-2007 15:42:42
I meant I want that POPUP menu is disable. How to close the browser after having to print the document ?
RespondeRE: RE: RE: PDF4NET Adrian Marin [Romania] 17-Apr-2007 14:42:13
The popup menu cannot be disabled. Also, the browser window cannot be closed from a PDF file.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
I want to use another font, Tahoma. How can I use it?
Is anyone out there?
Responde
RE: PDF4NET chris.thomas [United Kingdom] 02-Mar-2007 15:43:28
Ah, no matter:
myFont2 = New O2S.Components.PDF4NET.Graphics.Fonts.TrueTypeFont("Tahoma", 16, True)
Responde
Hi there!
I'm creating several PDFPages in sequence, drawing text lines and some graphics, and saving it to disk. When viewing the pdf in acrobat, on some pages the text appears to be 'bold' and others it appears normal. It seems to be happening on pages where I'm drawing graphics (eg, I'm drawing graphics with page.Canvas.DrawImage on pages 1, 3, 4, and 5, and the text always appears heavy, and no graphics on pages 2 and 6, so the text always appears normal).
When the document is printed, there doesn't seem to be any noticable difference in the font weight, with all text appearing properly, in the normal font weight that I specified.
Is there anything I should be doing differently to prevent my users (and boss!) from thinking that some pages are in bold type? Has anyone else noticed this problem?
Thanks,
Chris.
Responde
RE: PDF4NET odd behaviour chris.thomas [United Kingdom] 23-Mar-2007 15:14:43
Hi. I still would appreciate someone shedding some light on this weird behaviour.
RespondeRE: RE: PDF4NET odd behaviour Adrian Marin 05-Apr-2007 11:40:39
Hello Chris,
The images shoud not affect the way the text is displayed. Can you send us a sample PDF file, so we can take a look at it? I'll be able to offer more information after we investigate the PDF file.
Thank you.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: RE: PDF4NET odd behaviour chris.thomas [United Kingdom] 05-Apr-2007 13:16:04
Hi Adrian, yes please! What email address should I use?
Chris.
RespondeRE: PDF4NET odd... Adrian Marin 05-Apr-2007 13:19:24
Hello Chris,
Please send the file to techsupport@o2sol.com.
Thank you.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: RE: PDF4NET odd... bs [Denmark] 13-Jun-2007 21:08:20
Was there a solution to this problem?
I'm having simimlar problems, and I'm looking for a solution. I can't recognize the pattern with rendering images giving the prob, just getting bold fonts where they should be regular.
RespondeRE: RE: RE: PDF4NET odd... Adrian Marin [Romania] 13-Jun-2007 21:19:54
A common cause of this problem, the text appearing to be bold, is because both the pen and the brush are used to draw the text. The pen is used to stroke the text outline and this gives the bold appearance. Just use null (Nothing in VB.NET) for the pen parameter in DrawText/DrawTextBox method and the text will be displayed fine. If this does not solve your problem, please send an email to techsupport@o2sol.com with a sample PDF file that shows the problem you reported and we'll investigate it.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
Hi,
When opening an existing PDF document, and just "Save As" with a new filename, all the existing javascript (pre-existing - not generated using PDF4Net) seems to be lost.
For example, if my PDF doc has a "Print" button with this code :
var pp = this.getPrintParams();
this.print(pp);
It doesn't work anymore after using pdf4net :
PDFDocument doc = new PDFDocument("Before.pdf");
//nothing else done !
doc.SaveToFile("After.pdf");
The javascript won't work using After.pdf (But it works perfectly using Before.pdf)
(Sorry for my poor english, i'm french)
Responde
RE: PDF4NET Adrian Marin 05-Apr-2007 11:43:52
Hello Eric,
This seems to be a bug in PDF4NET, although PDF4NET is designed to preserve the JavaScript code in the PDF files. Can you send us the Before.pdf file and we'll investigate this problem?
Thank you.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
Is it possible to obtain a strong name version of the PDF4NET dll? We purchased the PDF4NET last year but since then we have upgraded our project to be strong named for security, and now we cannot use PDF4NET.
Can you please assist us?
Thanks
Steve
Responde
RE: PDF4NET - strong name nazareno7 [USA] 26-May-2007 01:43:33
Do you have a copy of the strong named assemblies? Can you email me a copy to nazareno7@lycos.com? Thank you.
RespondeRE: RE: PDF4NET - strong name Adrian Marin [Romania] 28-May-2007 09:10:00
PDF4NET 3.0.1 includes strong named assemblies. Please download the updated library from your support account on O2 Solutions website (send an email to techsupport@o2sol.com if you do not remember the username/password) or from ComponentSource.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
RespondeRE: PDF4NET - strong name kbuchcik [Germany] 29-May-2007 17:19:50
The assembly for the Compact Framework of the evaluation version of PDF4NET 3.0.1 seems not to be strong named - the assembly for the normal Framework is. Could you also provide a strong named assembly for the Compact Framework in the evaluation version?
RespondeRE: RE: PDF4NET - strong name Adrian Marin [Romania] 29-May-2007 17:24:53
Hello,
Please send an email to techsupport@o2sol.com and we'll email you back a strong named assembly for .NetCF.
Thank you.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
hi, everybody..
here I would like to know that can I display the dwf Image on PDF Document using PDF4NET?
if yes then how do I do that?
Regards,
Lalit Patel
Responde
RE: PDF4NET O2 Solutions Techsupport 11-Aug-2005 12:49:22
Hi Lalit,
DWF files can not be added to PDF files using PDF4NET.
Kind regards,
Adrian Marin
Technical Support Engineer
O2 Solutions - precisely fit software
Responde
Is there anyway to take a multipage PDF and convert it to single file TIFF's using this. I would like to write a app. to look at my existing PDF files and convert them to single page TIFF's and save them into a SQL DB, so that I can call them from crystal reports.
Responde
Enhancement request: It would be very helpful to be able to copy a printer canvas to a pdf2net canvas, this way existing code can more easily make use of pdf2net without alot of extra code needing to be written.
Responde
Autor
Categoría principal
Productos relacionados
Categorias relacionadas
ComponentSource ofrece un único servicio global, utilizado por más de 1.000.000 de desarrolladores en todo el mundo.