Ask a Question related to ASP.NET General, Design and Development.
-
Carl Prothman [MVP] #1
Re: Open linked PDF-Files from a PDF-File
Paul,
Open up the PDF file using a FileStream, then read it in using a BinaryReader,
then replace the URL links in the file, then write the file out to the Response.
So something along the lines of:
' Open up the PDF file
Dim fileName As String = New String("d:\\work\\test.pdf")
Dim fileStream As System.IO.FileStream = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
Dim fileLength As Long = fileStream.Length
' Read the file in
Dim binaryReader As System.IO.BinaryReader = New System.IO.BinaryReader(fileStream)
Dim fileByteArray As Byte() = binaryReader.ReadBytes(CType(fileLength, Integer))
fileStream.Close()
' Replace URL
' ToDo... Use fileByteArray.BinarySearch()
' Write out the PDF file
Response.Clear()
Response.Buffer = False
Response.CacheControl = "public"
Response.ContentType = "application/pdf"
Response.AddHeader("Content-Length", fileLength.ToString())
Response.AddHeader("Content-Disposition", "in-line; filename=" & "test.pdf")
Response.BinaryWrite(fileByteArray)
Response.End()
--
Thanks,
Carl Prothman
Microsoft ASP.NET MVP
[url]http://www.able-consulting.com[/url]
"Paul Kuebler" <pkuebler@palfinger.com> wrote> Hello
>
> I send a PDF-File with
> string FilePath="PDFFiles\\Test1.pdf";
> Response.ContentType="Application/pdf";
> Response.WriteFile(FilePath);
> Response.Flush();
> Response.End();
> to the client browser. In this PDF-File
> are links to other PDF-Files. This PDF-files
> are on the server in the same directory as Test1.pdf.
> Is there a solution to open the selected
> PDF-File. The link path in Test1.pdf to the
> other PDF-files is only their filename.
>
> Thanks
> Paul
Carl Prothman [MVP] Guest
-
Cannot open Acrobat files with Foreign Characters in file name
Someone sent me some pdf files with Hebrew characters in the name. They do not open unless I rename them with English characters. He says he can open... -
Duplicate files open anytime I open a file
When I open an Illistratro file, two of the same file opens everytime. I browsed everyone of the subjects suggesting anything with the word... -
Can't open Illustrator 10 files with linked images
I'm getting the spinning cursor when trying to open Illustrator 10 files with linked images. This problem isn't happening with files containing... -
Illustrator CS files with large linked files results in large file size
If I place a large linked Photoshop 7 file (.psd or.eps), say 36 MB, in Illustrator CS and save without embedding the file it takes ages to save and... -
File.open{} , huge files and gc
I just came across a diuscussion about C++ smart pointers and Python's refcount GC. So I fall in the doubt: If I call File.open 'my_huge_file' {... -
Carl Prothman [MVP] #2
Re: Open linked PDF-Files from a PDF-File
"Paul Kuebler" <pkuebler@palfinger.com> wrote
?????????????????????????????????????????????????? ??????????????????????????????????????????????????
?????????????????????????????????????????????????? ??????????????????????????????????????????????????
?????????????????????????????????????????????????? ??????????????????????????????????????????????????
?????????????????????????????????????????????????? .?????????????????????????????????????????????????
?????????????????????????????????????????????????? ??????????????????????????????????????????????????
?????????????????????????????????????????????????? ??????????????????????????????????????????????????
?????????????????????????????????????????????????? ??????????????????????????????????????????????????
?????????????????????????????????????????????????? ??????????????????????????????????????????????????
?????????????????????????????????????????????????? ??????????????????????????????????????????????????
?????????????????????????????????????????????????? ??????????????????????????????????????????????????
?????????????????????????????????????????????????? ??????????????????????????????????????..?????????? ?
?????????????????????????????????????????????????? ??????????????????????????????????.???????????????
?????????????????????????????????????????????????? ??????????????????????????????????????????????????
?????????????????????????????????????????????????? ??????????????????????????????????????????????????
?????????????????????????????????????????????????? ??????????????????????
Paul,
If you have a question, then ask it. Otherwise please don't be rude...
--
Thanks,
Carl Prothman
Microsoft ASP.NET MVP
[url]http://www.able-consulting.com[/url]
Carl Prothman [MVP] Guest
-
Paul Kuebler #3
Re: Open linked PDF-Files from a PDF-File
?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ????????????????..???????????????????????????????? ?????????????????????????????????????????????????? ?????????????.???????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?
Paul Kuebler Guest
-
Paul Kuebler #4
Re: Open linked PDF-Files from a PDF-File
?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ????????>
Paul Kuebler Guest
-
Paul Kuebler #5
Open linked PDF-Files from a PDF-File
?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ??????????
Paul Kuebler Guest
-
Paul Kuebler #6
Open linked PDF-Files from a PDF-File
Sorry for this bad post, but I copied source-code into
the post, and the result are question marks!!
Paul?????????????????????????????????????????????????? ?????????>-----Original Message-----
>????????????????????????????????????????????????? ?????????
?????????????????????????????????????????????????? ?????????
?????????????????????????????????????????????????? ?????????
?????????????????????????????????????????????????? ?????????
?????????????????????????????????????????????????? ?????????
?????????????????????????????????????????????????? ?????????
?????????????????????????????????????????????????? ?????????
?????????????????????????????????????????????????? ?????????
??????????????????????????????>
>.
>Paul Kuebler Guest
-
Carl Prothman [MVP] #7
Re: Open linked PDF-Files from a PDF-File
"Paul Kuebler" <pkuebler@palfinger.com> wrote
Ahhh, I was wondering what you were doing! ;-)> Sorry for this bad post, but I copied source-code into
> the post, and the result are question marks!!
>
Try copying the code to Notepad, then copy from Notepad to here.
--
Thanks,
Carl Prothman
Microsoft ASP.NET MVP
[url]http://www.able-consulting.com[/url]
Carl Prothman [MVP] Guest
-
Paul Kuebler #8
Re: Open linked PDF-Files from a PDF-File
?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ????????????????????????????..???????????????????? ?????????????????????????????????????????????????? ?????????????????????????.???????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????
Paul Kuebler Guest
-
Carl Prothman [MVP] #9
Re: Open linked PDF-Files from a PDF-File
"Paul Kuebler" <pkuebler@palfinger.com> wrote
?????????????????????????????????????????????????? ????????????????????????????
Paul,
Which tool are you using to post to the newsgroups?
--
Thanks,
Carl Prothman
Microsoft ASP.NET MVP
[url]http://www.able-consulting.com[/url]
Carl Prothman [MVP] Guest



Reply With Quote

