Git Product home page Git Product logo

Comments (6)

pipwerks avatar pipwerks commented on June 27, 2024

PDFObject already appends a hash to the URL to avoid quirks in IE; by hardcoding "#page=1" in your URL, it probably ends up as "#page=1#" which would be invalid ('malformed').

I suggest using the pdfOpenParams object to pass the page number:

var myPDF = new PDFObject({ url: 'pdf/overview.pdf', pdfOpenParams: { page: '1' } }).embed('pdf');

from pdfobject.

alypax avatar alypax commented on June 27, 2024

Thanks so much for your reply. That worked like a charm!! I wish I asked sooner instead of the hours and hours I spent trying to troubleshoot this! What a relief :)

from pdfobject.

pipwerks avatar pipwerks commented on June 27, 2024

No problem, happy to help

from pdfobject.

alypax avatar alypax commented on June 27, 2024

Appears there is an error in Chrome where it is not going to the correct page of the pdf with the above variable

from pdfobject.

pipwerks avatar pipwerks commented on June 27, 2024

Chrome's built-in PDF viewer doesn't support Open PDF Parameters, though it does support "page=". If it isn't working in Chrome (assuming the generated PDF URL is accurate), you'd need to check with the Chromium team. All PDFObject does is embed the PDF.

from pdfobject.

pipwerks avatar pipwerks commented on June 27, 2024

It appears Chrome's implementation of the page= function is broken -- it jumps to the page AFTER the specified page. If you specify page 5, it goes to page 6.

https://code.google.com/p/chromium/issues/detail?id=64309

from pdfobject.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.